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