summaryrefslogtreecommitdiff
path: root/app/views/phones
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-03-04 05:34:43 -0500
committerPeter Kozak <spag@golwen.net>2013-03-04 05:34:43 -0500
commit8042e6c314737feab61209e0b8b26ddba5c7e763 (patch)
tree816e71769b4107ec00d7ffd29636af3ca762669b /app/views/phones
parent716a7dc8e7838fe397b6d9ca2a52f6d8b2ff52a9 (diff)
display provisioning key activity flag
Diffstat (limited to 'app/views/phones')
-rw-r--r--app/views/phones/_form_core.html.haml2
-rw-r--r--app/views/phones/show.html.haml11
2 files changed, 6 insertions, 7 deletions
diff --git a/app/views/phones/_form_core.html.haml b/app/views/phones/_form_core.html.haml
index 31f3c24..e093899 100644
--- a/app/views/phones/_form_core.html.haml
+++ b/app/views/phones/_form_core.html.haml
@@ -11,5 +11,5 @@
- if defined? GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') && GsParameter.get('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 GsParameter.get('PROVISIONING_KEY_LENGTH') == 0
+ - if @phone && @phone.provisioning_key_active
= f.input :provisioning_key_active, :label => t('phones.form.provisioning_key_active.label'), :hint => conditional_hint('phones.form.provisioning_key_active.hint')
diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml
index e9b8b21..1996d48 100644
--- a/app/views/phones/show.html.haml
+++ b/app/views/phones/show.html.haml
@@ -34,12 +34,11 @@
%td
= @phone.nightly_reboot == true ? t('simple_form.yes') : t('simple_form.no')
- - if GsParameter.get('PROVISIONING_KEY_LENGTH') == 0
- %tr
- %td
- %strong= t('phones.show.provisioning_key_active') + ":"
- %td
- = @phone.provisioning_key_active == true ? t('simple_form.yes') : t('simple_form.no')
+ %tr
+ %td
+ %strong= t('phones.show.provisioning_key_active') + ":"
+ %td
+ = @phone.provisioning_key_active == true ? t('simple_form.yes') : t('simple_form.no')
%tr{:class => (@phone.ip_address.blank? ? 'warning' : '')}
%td