Sha256: 9605fbba9dade9fd6ea3b280630e1e2df9b6b01167c48917efec61cfc5aafd17
Contents?: true
Size: 1.5 KB
Versions: 61
Compression:
Stored size: 1.5 KB
Contents
<%= render :partial => 'caboose/users/admin_header' %> <h2>Reset Password for <%= "#{@edituser.first_name} #{@edituser.last_name}" %></h2> <form action='/admin/users/<%= @edituser.id %>' method='put' id='password_form'> <input type='hidden' name='authenticity_token' value='<%= form_authenticity_token %>' /> <div class="field"> <label for="password">Password</label> <input type='password' name='password' id='password' style="width:250px;" value="" /> </div> <div class="field"> <label for="password2">Confirm Password</label> <input type='password' name='password2' id='password2' style="width:250px;" value="" /> </div> <div id='message'></div> <p><input type='button' value='Update Password' onclick="update_password();" /></p> <%= render :partial => 'caboose/users/admin_footer' %> <% content_for :caboose_css do %> <style> .field { margin-bottom: 15px; } .field label { display: block; margin-bottom: 4px; font-size: 13px; } </style> <% end %> <% 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
61 entries across 61 versions & 1 rubygems