trusty-cms 2.0.21.alpha → 2.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/controllers/admin/password_resets_controller.rb +6 -2
- data/app/mailers/password_mailer.rb +2 -0
- data/app/views/admin/password_resets/edit.html.haml +24 -20
- data/app/views/admin/password_resets/new.html.haml +18 -14
- data/app/views/password_mailer/password_reset.html.haml +7 -2
- data/lib/trusty_cms.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbc79bc42da160d18107b6fafe34bfc19002d072
|
4
|
+
data.tar.gz: dcc5d74e7c208b3466df33de59688048b6b0d8ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cd77d4f1670ca2af673a1084ed67354134f101543d8c0d551b4c51f2a3bacc3dd86782824cce800a7e1dfd0926a62d0b081f6800c2273d2392a584c08654e4c
|
7
|
+
data.tar.gz: 0fde4925450e19b85b9d237a7519731303ab7c3f5ede08df0861241a970b1c91bdd718ba5a3589aa7bcaf04a5608744402bcd061427c729476e24d88ac1c4477
|
data/Gemfile.lock
CHANGED
@@ -4,8 +4,12 @@ class Admin::PasswordResetsController < ApplicationController
|
|
4
4
|
|
5
5
|
def create
|
6
6
|
user = User.find_by_email(params[:email])
|
7
|
-
|
8
|
-
|
7
|
+
if user
|
8
|
+
user.send_password_reset
|
9
|
+
redirect_to welcome_path, :notice => "Email sent with password reset instructions."
|
10
|
+
else
|
11
|
+
redirect_to welcome_path, :notice => "Email not registered. Double check your spelling or seek out your Admin."
|
12
|
+
end
|
9
13
|
end
|
10
14
|
|
11
15
|
def edit
|
@@ -1,23 +1,27 @@
|
|
1
|
-
|
1
|
+
- body_classes << "single_form"
|
2
2
|
|
3
|
-
|
4
|
-
- if @user.errors.any?
|
5
|
-
.error_messages
|
6
|
-
%h2 Form is invalid
|
7
|
-
%ul
|
8
|
-
- for message in @user.errors.full_messages
|
9
|
-
%li= message
|
10
|
-
%p
|
11
|
-
%label{:for=>"password"}= t('password')
|
12
|
-
= f.password_field :password
|
13
|
-
%p
|
14
|
-
%label{:for=>"password_confirmation"}= t('password_confirmation')
|
15
|
-
= f.password_field :password_confirmation
|
16
|
-
.actions= f.submit "Update Password"
|
3
|
+
#single_form
|
17
4
|
|
18
|
-
%
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
5
|
+
%h3= t('reset_your_password')
|
6
|
+
|
7
|
+
= form_for @user, :url => admin_password_reset_path(params[:id]) do |f|
|
8
|
+
- if @user.errors.any?
|
9
|
+
.error_messages
|
10
|
+
%h2 Form is invalid
|
11
|
+
%ul
|
12
|
+
- for message in @user.errors.full_messages
|
13
|
+
%li= message
|
14
|
+
%p
|
15
|
+
%label{:for=>"password"}= t('password')
|
16
|
+
= f.password_field :password
|
17
|
+
%p
|
18
|
+
%label{:for=>"password_confirmation"}= t('password_confirmation')
|
19
|
+
= f.password_field :password_confirmation
|
20
|
+
.actions= f.submit "Update Password"
|
21
|
+
|
22
|
+
%p.version
|
23
|
+
= t('powered_by')
|
24
|
+
%a{ :href => "https://github.com/pgharts/trusty-cms" } TrustyCms CMS
|
25
|
+
= t('version')
|
26
|
+
= TrustyCms.loaded_via_gem? ? "#{TrustyCms::VERSION} (gem)." : "#{TrustyCms::VERSION}."
|
23
27
|
|
@@ -1,14 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
- body_classes << "single_form"
|
2
|
+
|
3
|
+
#single_form
|
4
|
+
|
5
|
+
%h3= t('reset_your_password')
|
6
|
+
|
7
|
+
= form_tag admin_password_resets_path, :method => :post do
|
8
|
+
%p
|
9
|
+
%label{:for=>"email"}= t('email')
|
10
|
+
= text_field_tag :email, params[:email], :class => 'textbox', :maxlength => 70, :size => 70
|
11
|
+
.actions
|
12
|
+
= submit_tag "Reset Password"
|
13
|
+
|
14
|
+
%p.version
|
15
|
+
= t('powered_by')
|
16
|
+
%a{ :href => "https://github.com/pgharts/trusty-cms" } TrustyCms CMS
|
17
|
+
= t('version')
|
18
|
+
= TrustyCms.loaded_via_gem? ? "#{TrustyCms::VERSION} (gem)." : "#{TrustyCms::VERSION}."
|
@@ -1,3 +1,8 @@
|
|
1
|
-
=
|
1
|
+
= "Hi, #{@user.name} -"
|
2
2
|
|
3
|
-
|
3
|
+
%p
|
4
|
+
We received a request to reset your password.
|
5
|
+
%p
|
6
|
+
= link_to('Click here to reset', edit_admin_password_reset_url(@user.password_reset_token))
|
7
|
+
%p
|
8
|
+
If you did not request your password to be reset, please alert your TrustyCMS Admin.
|
data/lib/trusty_cms.rb
CHANGED