Sha256: 3177d2c1f2ca70a1c1eb5720c27c0979afe458cfd2465454d19d8e556922d028

Contents?: true

Size: 1.18 KB

Versions: 574

Compression:

Stored size: 1.18 KB

Contents

<h1>Reset Password for <%= "#{@edituser.first_name} #{@edituser.last_name}" %></h1>
<form action='/admin/users/<%= @edituser.id %>' method='put' id='password_form'>
<input type='hidden' name='authenticity_token' value='<%= form_authenticity_token %>' />
<p><input type='password' name='password'   id='password'   value="" placeholder='Password' /></p>
<p><input type='password' name='password2'  id='password2'  value="" placeholder='Confirm password' /></p>
<div id='message'></div>
<p>
<input type='button' value='Back' onclick="window.location='/admin/users/<%= @edituser.id %>/edit';" />
<input type='button' value='Update Password' onclick="update_password();" />
</p>

<% content_for :caboose_js do %>
<script type="text/javascript">

function update_password()
{
  $.ajax({
    url: '/admin/users/<%= @edituser.id %>',
    type: 'put',
    data: $('#password_form').serialize(), 
    success: function(resp) {
      if (resp.success)   $('#message').html("<p class='note success'>The password has been reset.</p>");
      if (resp.error)     $('#message').html("<p class='note error'>" + resp.error + "</p>");
      if (resp.redirect)  window.location = resp.redirect;
    }
  });
}

</script>
<% end %>

Version data entries

574 entries across 574 versions & 1 rubygems

Version Path
caboose-cms-0.7.17 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.16 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.15 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.14 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.13 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.12 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.11 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.10 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.9 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.8 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.7 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.6 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.5 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.4 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.3 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.2 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.1 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.36 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.35 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.34 app/views/caboose/users/edit_password.html.erb