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

Version Path
caboose-cms-0.5.61 app/views/caboose/login/index.html.erb
caboose-cms-0.5.60 app/views/caboose/login/index.html.erb
caboose-cms-0.5.59 app/views/caboose/login/index.html.erb
caboose-cms-0.5.58 app/views/caboose/login/index.html.erb
caboose-cms-0.5.57 app/views/caboose/login/index.html.erb
caboose-cms-0.5.56 app/views/caboose/login/index.html.erb
caboose-cms-0.5.55 app/views/caboose/login/index.html.erb
caboose-cms-0.5.54 app/views/caboose/login/index.html.erb
caboose-cms-0.5.53 app/views/caboose/login/index.html.erb
caboose-cms-0.5.52 app/views/caboose/login/index.html.erb
caboose-cms-0.5.51 app/views/caboose/login/index.html.erb
caboose-cms-0.5.50 app/views/caboose/login/index.html.erb
caboose-cms-0.5.49 app/views/caboose/login/index.html.erb
caboose-cms-0.5.48 app/views/caboose/login/index.html.erb
caboose-cms-0.5.47 app/views/caboose/login/index.html.erb
caboose-cms-0.5.46 app/views/caboose/login/index.html.erb
caboose-cms-0.5.45 app/views/caboose/login/index.html.erb
caboose-cms-0.5.44 app/views/caboose/login/index.html.erb
caboose-cms-0.5.43 app/views/caboose/login/index.html.erb
caboose-cms-0.5.42 app/views/caboose/login/index.html.erb