caboose-cms 0.3.26 → 0.3.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDNkYTYwNmRiNjA3ZWUwZTcwMjI2NGIxMzk1MjYyMzYwZTk2YjcwMw==
4
+ NDk0NDBiM2RjNGVlNTZmMjQwY2U1ZmQxODJhZGQ4ZjY2YjJiNzc1Zg==
5
5
  data.tar.gz: !binary |-
6
- MjQ4NGYxOGUxZTRlMGNhODU0NDZiYTY5NDY0MzUyNzYzZWU3NDdkMg==
6
+ NmU3ZjVmMzgyNTk2MDA1Y2JjZWJjZmEwMDRlYWQxOWNhYWY0ZjBlOA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZTZlYTU4YTM0MmI2YjFhMTNjZmJkYWYzNDE5MWI5MGVmYjViNWI0OGNmNWZh
10
- OGI2MGFjMzQ4NjlhOThiODVjNGM4ZjJlZGZkMjc0ZjA4YzE1OTc3YzcyZDQz
11
- NTNkNjY1NmViMTY0MTUxNjkwZmUzYjI0MTQ4YmQzYzFlYWVmMmM=
9
+ OTZjMzVkMWUwNDY2ZGQzMmEzOTg3MjZlNzBhN2JkNmQzNTc5ZTA5ZjY5MmJk
10
+ ZDk1NzRmNWJmMGM0Y2VmNzg1Y2Y2NTAwZmE0YTUxZjhmNDIxNTQ0MmVlOTA1
11
+ MzUzZDYxMmYxOGI2YjdmMDMwZTMxNjUxZTU4MDdlMGE2NTNkNzY=
12
12
  data.tar.gz: !binary |-
13
- OTA0ZmM4Nzc0OGE0ZjJkNmQxNjY1NTVjNGVhNjc2OTY0NDVjNTE2Y2U0YWFh
14
- ZTA2ODA2Y2FmZmVhNDc0ZTM1ZmUwMDI5MTZjNmM1OTM0YjUzMmM5NzZkYmE4
15
- MGM4ZWUwYjgwNjVhMjk5NzgyZDgwYTRkOGJlMmJjYmZjNjRmNzc=
13
+ ZTdiOWFhNTQ2MTMyNDRlZmVhOTFjZWM3M2I0MTE3NDMwZGE3NTMwYTFjZTk0
14
+ MTkyMWJiZGM4MWI1ZTJlYzI3MWQ5ZTA0MWRjYmI4YzRkMTNlY2U4YzlmMjg5
15
+ NWM0MjAwMjNkNmUyN2I3OTY0NTgyNDgxMDU4MjE3ODkwMWI3NmE=
@@ -124,7 +124,7 @@ module Caboose
124
124
  when "first_name", "last_name", "username", "email"
125
125
  user[name.to_sym] = value
126
126
  when "password"
127
- confirm = params[:confirm]
127
+ confirm = params[:password2]
128
128
  if (value != confirm)
129
129
  resp.error = "Passwords do not match.";
130
130
  save = false
@@ -1,34 +1,31 @@
1
1
 
2
2
  <h1>Reset Password for <%= "#{@edituser.first_name} #{@edituser.last_name}" %></h1>
3
+ <form action='/admin/users/<%= @edituser.id %>' method='put' id='password_form'>
4
+ <input type='hidden' name='authenticity_token' value='<%= form_authenticity_token %>' />
3
5
  <p><input type='password' name='password' id='password' value="" placeholder='Password' /></p>
4
6
  <p><input type='password' name='password2' id='password2' value="" placeholder='Confirm password' /></p>
5
7
  <div id='message'></div>
6
- <div id='controls'>
8
+ <p>
7
9
  <input type='button' value='Back' onclick="window.location='/admin/users/<%= @edituser.id %>/edit';" />
8
- <input type='button' value='Update Password' onclick="updatePassword();" />
9
- </div>
10
+ <input type='button' value='Update Password' onclick="update_password();" />
11
+ </p>
10
12
 
11
13
  <% content_for :caboose_js do %>
12
14
  <script type="text/javascript">
13
- var modal = false;
14
- $(document).ready(function() {
15
- modal = new CabooseModal(500);
16
- });
17
15
 
18
- function updatePassword()
16
+ function update_password()
19
17
  {
20
18
  $.ajax({
21
- url: '/admin/users/update-password',
22
- type: 'post',
19
+ url: '/admin/users/<%= @edituser.id %>',
20
+ type: 'put',
21
+ data: $('#password_form').serialize(),
23
22
  success: function(resp) {
24
- if (resp.success)
25
- modal.autosize("<p class='note success'>" + resp.success + "</p>");
26
- if (resp.error)
27
- modal.autosize("<p class='note success'>" + resp.error + "</p>");
28
- if (resp.redirect)
29
- window.location = resp.redirect;
23
+ if (resp.success) $('#message').html("<p class='note success'>The password has been reset.</p>");
24
+ if (resp.error) $('#message').html("<p class='note error'>" + resp.error + "</p>");
25
+ if (resp.redirect) window.location = resp.redirect;
30
26
  }
31
27
  });
32
28
  }
29
+
33
30
  </script>
34
31
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.3.26'
2
+ VERSION = '0.3.27'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.26
4
+ version: 0.3.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-29 00:00:00.000000000 Z
11
+ date: 2014-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails