Sha256: 1a6389d2f604c3ec356613ec8d1d3038d2b7faea83c255b1550f3f174cbf6a74

Contents?: true

Size: 1.35 KB

Versions: 43

Compression:

Stored size: 1.35 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' />
<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

43 entries across 43 versions & 1 rubygems

Version Path
caboose-cms-0.2.93 app/views/caboose/login/index.html.erb
caboose-cms-0.2.92 app/views/caboose/login/index.html.erb
caboose-cms-0.2.91 app/views/caboose/login/index.html.erb
caboose-cms-0.2.90 app/views/caboose/login/index.html.erb
caboose-cms-0.2.89 app/views/caboose/login/index.html.erb
caboose-cms-0.2.88 app/views/caboose/login/index.html.erb
caboose-cms-0.2.87 app/views/caboose/login/index.html.erb
caboose-cms-0.2.86 app/views/caboose/login/index.html.erb
caboose-cms-0.2.85 app/views/caboose/login/index.html.erb
caboose-cms-0.2.84 app/views/caboose/login/index.html.erb
caboose-cms-0.2.83 app/views/caboose/login/index.html.erb
caboose-cms-0.2.82 app/views/caboose/login/index.html.erb
caboose-cms-0.2.81 app/views/caboose/login/index.html.erb
caboose-cms-0.2.80 app/views/caboose/login/index.html.erb
caboose-cms-0.2.79 app/views/caboose/login/index.html.erb
caboose-cms-0.2.78 app/views/caboose/login/index.html.erb
caboose-cms-0.2.71 app/views/caboose/login/index.html.erb
caboose-cms-0.2.70 app/views/caboose/login/index.html.erb
caboose-cms-0.2.68 app/views/caboose/login/index.html.erb
caboose-cms-0.2.67 app/views/caboose/login/index.html.erb