Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. <?= $this->Js->link('Edit',
  2. array('controller' => 'employees', 'action' => 'personal_details_edit',$employee['Employee']['id']),
  3. array( 'update' => '#personal_details_update',
  4. 'evalScripts' => true,
  5. 'before' => $this->Js->get('#busy-indicator')->effect('fadeIn', array('buffer' => false)),
  6. 'complete' => $this->Js->get('#busy-indicator')->effect('fadeOut', array('buffer' => false)),
  7. )
  8. );
  9. echo $this->Js->writeBuffer();?>
  10.  
  11. <? //serialize the form element to submit
  12.  
  13. $data = $this->Js->get('#employee_personal_edit')->serializeForm(
  14. array(
  15. 'isForm' => true,
  16. 'inline' => true)
  17. );
  18.  
  19. // Submit the serialize data on submit click
  20. $this->Js->get('#employee_personal_edit')->event(
  21. 'submit',
  22. $this->Js->request(
  23. array('action' => 'personal_details_edit'),
  24. array(
  25. 'update' => '#personal_details_update', // element to update
  26. // after form submission
  27. 'data' => $data,
  28. 'async' => true,
  29. 'dataExpression'=>true,
  30. 'method' => 'POST',
  31.  
  32.  
  33. )
  34. )
  35. );
  36. echo $this->Js->writeBuffer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement