Sha256: c00282fcfe3e8fd1de364b65743ddefa4fb4b3347746ce9ed654806338fad829
Contents?: true
Size: 1.44 KB
Versions: 16
Compression:
Stored size: 1.44 KB
Contents
<form action='/login' method='post' id='login_form'> <p class='other_options'> <a href='/register?return_url=<%= @return_url %>'>Need to register?</a> </p> <h1>Login</h1> <input type='hidden' name='return_url' value='<%= @return_url %>' /> <input type='text' name='username' id='username' placeholder='Login or email' /> <input type='password' name='password' id='password' placeholder='Password' /> <input type='checkbox' name='remember' id='remember' value='1' checked='true' /> Remember me <div id='message'></div> <p> <input type='button' id='btn_cancel' value='Cancel' onclick="parent.$.fn.colorbox.close();" /> <input type='submit' id='btn_login' value='Login' onclick='login(); return false;' /> </p> </form> <% content_for :caboose_js do %> <script type='text/javascript'> var modal = new CabooseModal(400); function login() { modal.autosize("<p class='loading'>Logging in...</p>"); $.ajax({ url: '/login', type: 'post', data: $('#login_form').serialize(), success: function(resp) { if (resp.error) modal.autosize("<p class='note error'>" + resp.error + "</p>"); else if (resp.redirect != false) <%= @modal ? "" : "parent." %>window.location = resp.redirect; else parent.location.reload(true); }, error: function() { modal.autosize("<p class='note error'>Error</p>"); } }); } </script> <% end %> <%= content_for :caboose_css do %> <%= stylesheet_link_tag "caboose/login", :media => "all" %> <% end %>
Version data entries
16 entries across 16 versions & 1 rubygems