Advertisement
Guest User

Šablona - přihlašovací stránka

a guest
Jun 6th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. {block #content}
  2.  
  3. <h1>Přihlášení</h1>
  4.  
  5. {snippet signInForm}
  6. {control signInForm}
  7. {/snippet}
  8.  
  9. <script type="text/javascript">
  10.  
  11. $(function() {
  12. focusElementsById(new Array("frmsignInForm-username", "frmsignInForm-password"));
  13. });
  14.  
  15.  
  16. $.nette.ext('login_form', {
  17. load: function () {
  18. $('form[name="login_form"]').off('submit').on('submit', function (e) {
  19. $(this).netteAjax(e, {
  20. beforeSend: function () {
  21. showAjaxSpinner("Přihlašování uživatele.");
  22. deactivateButton("frmsignInForm-login", "Přihlašuji...");
  23. },
  24.  
  25. success: function(payload) {
  26. if (payload.error === false) {
  27. showAjaxSpinner("Přesměrování na herní stránku.");
  28. document.location = {link :Game:user:overview};
  29. } else {
  30. hideAjaxSpinner();
  31. }
  32. }
  33. });
  34. });
  35. }
  36. });
  37.  
  38.  
  39. </script>
  40.  
  41. {/block}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement