diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-24 13:02:08 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-24 13:02:08 +0100 |
commit | 5c9968de4770ef2383ce62a3f9e21054aa9e1db7 (patch) | |
tree | d668c8513605957561aa5d2165881cb5e65690fd /app/views/sip_accounts | |
parent | d22a57f659fdb0f2c9ecf751d1e41a81430b289e (diff) |
Better user experience for SipAccount#new.
Diffstat (limited to 'app/views/sip_accounts')
-rw-r--r-- | app/views/sip_accounts/_form_core.html.haml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/views/sip_accounts/_form_core.html.haml b/app/views/sip_accounts/_form_core.html.haml index 495ae84..1b96d27 100644 --- a/app/views/sip_accounts/_form_core.html.haml +++ b/app/views/sip_accounts/_form_core.html.haml @@ -1,7 +1,11 @@ .inputs - = f.input :auth_name, :as => :string, :label => t('sip_accounts.form.auth_name.label'), :hint => conditional_hint('sip_accounts.form.auth_name.hint') - = f.input :password, :as => :string, :label => t('sip_accounts.form.password.label'), :hint => conditional_hint('sip_accounts.form.password.hint') = f.input :caller_name, :as => :string, :label => t('sip_accounts.form.caller_name.label'), :hint => conditional_hint('sip_accounts.form.caller_name.hint'), :autofocus => true + - if @sip_account && @sip_account.new_record? + = f.hidden_field :auth_name + = f.hidden_field :password + - else + = f.input :auth_name, :as => :string, :label => t('sip_accounts.form.auth_name.label'), :hint => conditional_hint('sip_accounts.form.auth_name.hint') + = f.input :password, :as => :string, :label => t('sip_accounts.form.password.label'), :hint => conditional_hint('sip_accounts.form.password.hint') = f.input :voicemail_pin, :as => :string, :label => t('sip_accounts.form.voicemail_pin.label'), :hint => conditional_hint('sip_accounts.form.voicemail_pin.hint') = f.input :call_waiting, :label => t('sip_accounts.form.call_waiting.label'), :hint => conditional_hint('sip_accounts.form.call_waiting.hint') = f.input :clir, :label => t('sip_accounts.form.clir.label'), :hint => conditional_hint('sip_accounts.form.clir.hint') |