caboose-cms 0.7.64 → 0.7.65
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 +4 -4
- data/app/views/caboose/my_account/index.html.erb +42 -1
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ccb5c519df7b520cbf41122e4768e8fc06a1ba0e
|
|
4
|
+
data.tar.gz: da612de0190d79d7e4a49d6d6e989148ae496b51
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe3237ee49c22f0086ef9afc3be2e604407165a52d486fe241df619659e420e397bbe2ef7a84352f634017e756b2306c3be7fce335b5410c6c265963fae0e502
|
|
7
|
+
data.tar.gz: 59c93fb8805052064e0c520027fb77786f0e7126db18f60297539140bd37d670517e9b96ec999f351aff510c7d3993ac80c8f2e5669caf9cf006aa8b3e5e668a
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
<p><div id='user_<%= @user.id %>_last_name' ></div></p>
|
|
6
6
|
<p><div id='user_<%= @user.id %>_email' ></div></p>
|
|
7
7
|
<p><div id='user_<%= @user.id %>_phone' ></div></p>
|
|
8
|
-
<div id='
|
|
8
|
+
<div id='message2'></div>
|
|
9
9
|
<p>
|
|
10
|
+
<input type='button' value='Reset Password' class='btn' onclick="reset_user_password();" />
|
|
10
11
|
<% if @site.use_store %>
|
|
11
12
|
<input type='button' value='Order History' class='btn' onclick="window.location='/my-account/orders';" />
|
|
12
13
|
<% end %>
|
|
@@ -38,6 +39,46 @@ $(document).ready(function() {
|
|
|
38
39
|
});
|
|
39
40
|
});
|
|
40
41
|
|
|
42
|
+
function reset_user_password(pass1, pass2)
|
|
43
|
+
{
|
|
44
|
+
if (!pass1)
|
|
45
|
+
{
|
|
46
|
+
var p = $('<p/>').addClass('note warning')
|
|
47
|
+
.append("Please enter your password:<br /><br />")
|
|
48
|
+
.append($('<input/>').attr('type', 'password').attr('id', 'pass1').css('width', '200px')).append(' ')
|
|
49
|
+
.append($('<input/>').attr('type', 'button').val('Continue').click(function(e) { reset_user_password($('#pass1').val()); }))
|
|
50
|
+
.append("<br /><br />Passwords must be 8 characters long.");
|
|
51
|
+
$('#message2').empty().append(p);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (!pass2)
|
|
55
|
+
{
|
|
56
|
+
var p = $('<p/>').addClass('note warning')
|
|
57
|
+
.append("Please enter it again to confirm:<br /><br />")
|
|
58
|
+
.append($('<input/>').attr('type', 'password').attr('id', 'pass2').css('width', '200px')).append(' ')
|
|
59
|
+
.append($('<input/>').attr('type', 'button').val('Continue').click(function(e) { reset_user_password(pass1, $('#pass2').val()); }))
|
|
60
|
+
.append("<br /><br />Passwords must be 8 characters long.");
|
|
61
|
+
$('#message2').empty().append(p);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
$('#message2').html("<p class='loading'>Setting password...</p>");
|
|
65
|
+
$.ajax({
|
|
66
|
+
url: '/my-account',
|
|
67
|
+
type: 'put',
|
|
68
|
+
data: {
|
|
69
|
+
password: pass1,
|
|
70
|
+
confirm: pass2
|
|
71
|
+
},
|
|
72
|
+
success: function(resp) {
|
|
73
|
+
if (resp.error) $('#message2').html("<p class='note error'>" + resp.error + "</p>");
|
|
74
|
+
if (resp.success) {
|
|
75
|
+
$('#message2').html("<p class='note success'>The password has been successfully updated.</p>");
|
|
76
|
+
setTimeout(function() { $('#message2').empty(); }, 3000);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
41
82
|
</script>
|
|
42
83
|
<% end %>
|
|
43
84
|
<%= content_for :caboose_css do %>
|
data/lib/caboose/version.rb
CHANGED
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.7.
|
|
4
|
+
version: 0.7.65
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- William Barry
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-04-
|
|
11
|
+
date: 2016-04-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pg
|