Sha256: 83abf2c4f185a3e2d2320addf538163a3341e4bb401f9a0c29f8a2844e7038ba
Contents?: true
Size: 1.96 KB
Versions: 234
Compression:
Stored size: 1.96 KB
Contents
<form action="/login" method="post" id="login-form"> <div class="header"> <img src="/assets/caboose/caboose_logo.png" alt="Caboose"> <h1>caboose</h1> <p>Coo Coo Ca Choo</p> </div> <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" /> <label> <input type="checkbox" name="remember" id="remember" value="1" checked="true" /> Remember me </label> <ul id="login-options"> <li><a href="/register?return_url=<%= @return_url %>" class='register'>Need to register?</a></li> <li><a href="/login/forgot-password?return_url=<%= @return_url %>" class='forgot'>Forgot your password?</a></li> </ul> <div id="message"></div> <p class="buttons"> <input type="button" class="btn" value="Cancel" onclick="parent.$.fn.colorbox.close();" /> <input type="submit" class="btn" value="Login" onclick='login(); return false;' /> </p> </form> <%= content_for :caboose_css do %> <%= stylesheet_link_tag "caboose/login", media: "all" %> <style type="text/css"> #modal_content input[type=checkbox] { position: relative; } </style> <% end %> <% content_for :caboose_js do %> <script type="text/javascript"> var modal = false; $(window).load(function() { 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(response) { if (response.error) modal.autosize("<p class='note error'>" + response.error + "</p>"); else if (response.redirect != false) { if (response.modal) window.location = response.redirect; else parent.window.location = response.redirect; } else parent.location.reload(true); }, error: function() { modal.autosize("<p class='note error'>Error</p>"); } }); } </script> <% end %>
Version data entries
234 entries across 234 versions & 1 rubygems