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.6.33 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.32 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.31 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.30 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.29 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.28 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.27 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.26 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.25 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.24 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.23 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.22 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.21 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.20 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.19 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.18 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.17 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.16 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.15 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.6.14 app/views/caboose/users/edit_password.html.erb