From 46231f0f1d2d8aad0712ba98a6368af138a8561c Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 13 Jun 2013 20:16:48 +0300 Subject: [PATCH] Fix password set form and infinite loop --- app/controllers/passwords_controller.rb | 2 ++ app/views/passwords/new.html.haml | 15 +++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/controllers/passwords_controller.rb b/app/controllers/passwords_controller.rb index 1663131..73b06f7 100644 --- a/app/controllers/passwords_controller.rb +++ b/app/controllers/passwords_controller.rb @@ -1,6 +1,8 @@ class PasswordsController < ApplicationController layout 'navless' + skip_before_filter :check_password_expiration + before_filter :set_user before_filter :set_title diff --git a/app/views/passwords/new.html.haml b/app/views/passwords/new.html.haml index 769a47a..c924241 100644 --- a/app/views/passwords/new.html.haml +++ b/app/views/passwords/new.html.haml @@ -1,10 +1,9 @@ -%h3.page_title Setup your new password - -%br - -= form_for @user, url: profile_password_path, method: :put do |f| - .padded - %p.slead After successful password update you will be redirected to dashboard += form_for @user, url: profile_password_path, method: :post do |f| + .light-well.padded + %p.slead + Please set new password before proceed. + %br + After successful password update you will be redirected to login screen -if @user.errors.any? .alert.alert-error %ul @@ -20,4 +19,4 @@ = f.password_field :password_confirmation, required: true .clearfix .input - = f.submit 'Save password', class: "btn btn-save" + = f.submit 'Set new password', class: "btn btn-create" -- libgit2 0.21.2