Sha256: b0b079dddd2fa4e05382e04278be9331d71e75d8fe6144f514f732b5f686bdbb
Contents?: true
Size: 1.33 KB
Versions: 2
Compression:
Stored size: 1.33 KB
Contents
<form action='/login' method='post' id='login_form'> <p class='other_options'> <a href='/register'>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' /> <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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
caboose-cms-0.2.11 | app/views/caboose/login/index.html.erb |
caboose-cms-0.2.8 | app/views/caboose/login/index.html.erb |