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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a70dc8977477fc05f0c0f564bc8c16f4ceb5af1
4
- data.tar.gz: 6aadac44daf584414af090b62ce6b8e1fee405ac
3
+ metadata.gz: cbc79bc42da160d18107b6fafe34bfc19002d072
4
+ data.tar.gz: dcc5d74e7c208b3466df33de59688048b6b0d8ad
5
5
  SHA512:
6
- metadata.gz: 39b212b91013312d84f24890b0f54295987f3500f1989bdf2c45c118c361d1308f4ca70691f4f4f8630968f4336b6d29d33330269eade03ac8a3e235a1bc1ab8
7
- data.tar.gz: fb688c23a8a656026905e7e01b0697f3e074f93e77bb42192e45ad752525fbdb115f8cef2784323e1f0e8c81437c9dc66c0c2f97acdf0657a10fd5e279e2e756
6
+ metadata.gz: 3cd77d4f1670ca2af673a1084ed67354134f101543d8c0d551b4c51f2a3bacc3dd86782824cce800a7e1dfd0926a62d0b081f6800c2273d2392a584c08654e4c
7
+ data.tar.gz: 0fde4925450e19b85b9d237a7519731303ab7c3f5ede08df0861241a970b1c91bdd718ba5a3589aa7bcaf04a5608744402bcd061427c729476e24d88ac1c4477
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trusty-cms (2.0.21.alpha)
4
+ trusty-cms (2.0.21)
5
5
  RedCloth (~> 4.3.2)
6
6
  acts_as_tree (~> 2.1)
7
7
  bundler (~> 1.7)
@@ -4,8 +4,12 @@ class Admin::PasswordResetsController < ApplicationController
4
4
 
5
5
  def create
6
6
  user = User.find_by_email(params[:email])
7
- user.send_password_reset if user
8
- redirect_to welcome_path, :notice => "Email sent with password reset instructions."
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,5 +1,7 @@
1
1
  class PasswordMailer < ActionMailer::Base
2
2
 
3
+ default :from => ENV['ORG_FROM_EMAIL'] ||= "admin@trustycms.com"
4
+
3
5
  def password_reset(user)
4
6
  @user = user
5
7
  mail :to => user.email, :subject => "Password Reset for TrustyCMS"
@@ -1,23 +1,27 @@
1
- %h1= t('reset_your_password')
1
+ - body_classes << "single_form"
2
2
 
3
- = form_for @user, :url => admin_password_reset_path(params[:id]) do |f|
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
- %p.version
19
- = t('powered_by')
20
- %a{ :href => "https://github.com/pgharts/trusty-cms" } TrustyCms CMS
21
- = t('version')
22
- = TrustyCms.loaded_via_gem? ? "#{TrustyCms::VERSION} (gem)." : "#{TrustyCms::VERSION}."
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
- %h1= t('reset_your_password')
2
-
3
- = form_tag admin_password_resets_path, :method => :post do
4
- %p
5
- %label{:for=>"email"}= t('email')
6
- = text_field_tag :email, params[:email], :class => 'textbox', :maxlength => 70, :size => 70
7
- .actions
8
- = submit_tag "Reset Password"
9
-
10
- %p.version
11
- = t('powered_by')
12
- %a{ :href => "https://github.com/pgharts/trusty-cms" } TrustyCms CMS
13
- = t('version')
14
- = TrustyCms.loaded_via_gem? ? "#{TrustyCms::VERSION} (gem)." : "#{TrustyCms::VERSION}."
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
- = link_to('Reset Your Password', edit_admin_password_reset_url(@user.password_reset_token))
1
+ = "Hi, #{@user.name} -"
2
2
 
3
- If you did not request your password to be reset, please alert your TrustyCMS Admin.
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
@@ -2,6 +2,6 @@ TRUSTY_CMS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..")) unle
2
2
 
3
3
  unless defined? TrustyCms::VERSION
4
4
  module TrustyCms
5
- VERSION = "2.0.21.alpha"
5
+ VERSION = "2.0.21"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusty-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.21.alpha
4
+ version: 2.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - TrustyCms CMS dev team