Sha256: 4c3d32be6c8be6bbfe27bf4df9c641aa189e96cff7cbc9cab671d248453d7aac

Contents?: true

Size: 1.18 KB

Versions: 73

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 %>';" />
<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

73 entries across 73 versions & 1 rubygems

Version Path
caboose-cms-0.8.67 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.66 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.65 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.64 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.63 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.62 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.61 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.60 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.59 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.58 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.57 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.56 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.55 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.54 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.53 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.52 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.51 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.50 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.49 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.8.48 app/views/caboose/users/admin_edit_password.html.erb