Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?= $this->Js->link('Edit',
- array('controller' => 'employees', 'action' => 'personal_details_edit',$employee['Employee']['id']),
- array( 'update' => '#personal_details_update',
- 'evalScripts' => true,
- 'before' => $this->Js->get('#busy-indicator')->effect('fadeIn', array('buffer' => false)),
- 'complete' => $this->Js->get('#busy-indicator')->effect('fadeOut', array('buffer' => false)),
- )
- );
- echo $this->Js->writeBuffer();?>
- <? //serialize the form element to submit
- $data = $this->Js->get('#employee_personal_edit')->serializeForm(
- array(
- 'isForm' => true,
- 'inline' => true)
- );
- // Submit the serialize data on submit click
- $this->Js->get('#employee_personal_edit')->event(
- 'submit',
- $this->Js->request(
- array('action' => 'personal_details_edit'),
- array(
- 'update' => '#personal_details_update', // element to update
- // after form submission
- 'data' => $data,
- 'async' => true,
- 'dataExpression'=>true,
- 'method' => 'POST',
- )
- )
- );
- echo $this->Js->writeBuffer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement