summaryrefslogtreecommitdiff
path: root/app/views/phones/_form_core.html.haml
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-28 19:31:31 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-28 19:31:31 +0100
commit3b07751150c0cd70eee4e750dd7a3670120a8675 (patch)
tree6107e30015715160fa4a7e35d5fd0761631dc864 /app/views/phones/_form_core.html.haml
parentb2e5168b917202ebd71f3032f125691ef1fd062f (diff)
Fallback SIP Accounts are only shown when the hotdeskable field is checked.
Diffstat (limited to 'app/views/phones/_form_core.html.haml')
-rw-r--r--app/views/phones/_form_core.html.haml8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/views/phones/_form_core.html.haml b/app/views/phones/_form_core.html.haml
index 96e53e6..20ea054 100644
--- a/app/views/phones/_form_core.html.haml
+++ b/app/views/phones/_form_core.html.haml
@@ -1,8 +1,10 @@
.inputs
= f.input :mac_address, :label => t('phones.form.mac_address.label'), :hint => conditional_hint('phones.form.mac_address.hint')
- = f.association :phone_model, :label => t('phones.form.phone_model_id.label'), :hint => conditional_hint('phones.form.phone_model_id.hint')
- = f.input :hot_deskable, :label => t('phones.form.hot_deskable.label'), :hint => conditional_hint('phones.form.hot_deskable.hint')
- = f.association :fallback_sip_account, :collection => @fallback_sip_accounts, :label => t('phones.form.fallback_sip_account_id.label'), :hint => conditional_hint('phones.form.fallback_sip_account_id.hint'), :include_blank => true
+ = f.association :phone_model, :label => t('phones.form.phone_model_id.label'), :hint => conditional_hint('phones.form.phone_model_id.hint'), :include_blank => false
+ - if @fallback_sip_accounts.any?
+ = f.input :hot_deskable, :label => t('phones.form.hot_deskable.label'), :hint => conditional_hint('phones.form.hot_deskable.hint')
+ .fallback_sip_account_dropdown
+ = f.association :fallback_sip_account, :collection => @fallback_sip_accounts, :label => t('phones.form.fallback_sip_account_id.label'), :hint => conditional_hint('phones.form.fallback_sip_account_id.hint'), :include_blank => false
- if defined? NIGHTLY_REBOOT_OF_PHONES && NIGHTLY_REBOOT_OF_PHONES == true
= f.input :nightly_reboot, :label => t('phones.form.nightly_reboot.label'), :hint => conditional_hint('phones.form.nightly_reboot.hint')
- if defined? PROVISIONING_KEY_LENGTH && PROVISIONING_KEY_LENGTH > 0