summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/views/phones/_form_core.html.haml3
-rw-r--r--app/views/phones/new.html.haml6
-rw-r--r--config/locales/views/phones/de.yml1
-rw-r--r--config/locales/views/phones/en.yml1
4 files changed, 10 insertions, 1 deletions
diff --git a/app/views/phones/_form_core.html.haml b/app/views/phones/_form_core.html.haml
index 20ea054..fd69690 100644
--- a/app/views/phones/_form_core.html.haml
+++ b/app/views/phones/_form_core.html.haml
@@ -1,10 +1,11 @@
.inputs
- = f.input :mac_address, :label => t('phones.form.mac_address.label'), :hint => conditional_hint('phones.form.mac_address.hint')
+ = f.input :mac_address, :label => t('phones.form.mac_address.label'), :hint => conditional_hint('phones.form.mac_address.hint'), :autofocus => 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
diff --git a/app/views/phones/new.html.haml b/app/views/phones/new.html.haml
index 61923cc..ae0a539 100644
--- a/app/views/phones/new.html.haml
+++ b/app/views/phones/new.html.haml
@@ -1,3 +1,9 @@
- title t("phones.new.page_title")
+- if !@fallback_sip_accounts.any? && can?(:create, current_user.current_tenant.sip_accounts.build)
+ %p
+ = t("phones.new.you_need_to_have_at_least_one_available_fallback_sip_account_for_hotdesking")
+ = link_to t("sip_accounts.index.actions.create_for", :resource => current_user.current_tenant), new_tenant_sip_account_path(current_user.current_tenant)
+
= render "form"
+
diff --git a/config/locales/views/phones/de.yml b/config/locales/views/phones/de.yml
index 2b655bd..e8221a9 100644
--- a/config/locales/views/phones/de.yml
+++ b/config/locales/views/phones/de.yml
@@ -42,6 +42,7 @@ de:
new:
page_title: 'Neues Telefon'
actions:
+ you_need_to_have_at_least_one_available_fallback_sip_account_for_hotdesking: 'Sie benötigen mindestens einen nicht benutzen SIP-Account, damit die Option für Hotdesking in diesem Formular angezeigt wird. '
edit:
page_title: 'Telefondaten bearbeiten'
form:
diff --git a/config/locales/views/phones/en.yml b/config/locales/views/phones/en.yml
index a441e34..ecd5a91 100644
--- a/config/locales/views/phones/en.yml
+++ b/config/locales/views/phones/en.yml
@@ -42,6 +42,7 @@ en:
new:
page_title: 'New phone'
actions:
+ you_need_to_have_at_least_one_available_fallback_sip_account_for_hotdesking: 'You need to have at least one unconnected SIP account to see a hotdesking option in this form. '
edit:
page_title: 'Editing Phone'
form: