Sha256: 334a346132cf0ea253b87f06c4047c80151842d553bb3882b758bfdd5a5623a9

Contents?: true

Size: 1.58 KB

Versions: 23

Compression:

Stored size: 1.58 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_css do %>
<style type="text/css">
#modal_content input[type="checkbox"] { position: relative; }
</style>
<% end %>
<% 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

23 entries across 23 versions & 1 rubygems

Version Path
caboose-cms-0.3.32 app/views/caboose/login/index.html.erb
caboose-cms-0.3.31 app/views/caboose/login/index.html.erb
caboose-cms-0.3.30 app/views/caboose/login/index.html.erb
caboose-cms-0.3.29 app/views/caboose/login/index.html.erb
caboose-cms-0.3.28 app/views/caboose/login/index.html.erb
caboose-cms-0.3.27 app/views/caboose/login/index.html.erb
caboose-cms-0.3.26 app/views/caboose/login/index.html.erb
caboose-cms-0.3.25 app/views/caboose/login/index.html.erb
caboose-cms-0.3.24 app/views/caboose/login/index.html.erb
caboose-cms-0.3.23 app/views/caboose/login/index.html.erb
caboose-cms-0.3.22 app/views/caboose/login/index.html.erb
caboose-cms-0.3.20 app/views/caboose/login/index.html.erb
caboose-cms-0.3.19 app/views/caboose/login/index.html.erb
caboose-cms-0.3.17 app/views/caboose/login/index.html.erb
caboose-cms-0.3.16 app/views/caboose/login/index.html.erb
caboose-cms-0.3.15 app/views/caboose/login/index.html.erb
caboose-cms-0.3.14 app/views/caboose/login/index.html.erb
caboose-cms-0.3.13 app/views/caboose/login/index.html.erb
caboose-cms-0.3.12 app/views/caboose/login/index.html.erb
caboose-cms-0.3.11 app/views/caboose/login/index.html.erb