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.79 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.78 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.77 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.76 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.75 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.74 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.73 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.72 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.71 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.70 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.69 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.68 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.67 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.66 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.65 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.64 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.63 app/views/caboose/users/admin_edit_password.html.erb
caboose-cms-0.7.62 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.61 app/views/caboose/users/edit_password.html.erb
caboose-cms-0.7.60 app/views/caboose/users/edit_password.html.erb