From 040a51bc5f269e5e1734c4fcafe01c81be8071a4 Mon Sep 17 00:00:00 2001 From: did Date: Thu, 28 Jul 2011 21:11:06 +0200 Subject: [PATCH] when used with devise_cas_authenticable, it does make sense to ask for a password in the new account creation page --- app/views/admin/accounts/new.html.haml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/admin/accounts/new.html.haml b/app/views/admin/accounts/new.html.haml index 315f562a..720196e1 100644 --- a/app/views/admin/accounts/new.html.haml +++ b/app/views/admin/accounts/new.html.haml @@ -9,10 +9,13 @@ = f.foldable_inputs :name => :information do = f.input :name + - unless f.object.respond_to?(:password) + = f.input :email - = f.foldable_inputs :name => :credentials do - = f.input :email - = f.input :password, :input_html => { :autocomplete => "off" } - = f.input :password_confirmation, :input_html => { :autocomplete => "off" } + - if f.object.respond_to?(:password) + = f.foldable_inputs :name => :credentials do + = f.input :email + = f.input :password, :input_html => { :autocomplete => "off" } + = f.input :password_confirmation, :input_html => { :autocomplete => "off" } = render 'admin/shared/form_actions', :back_url => edit_admin_current_site_url, :button_label => :create \ No newline at end of file