Permalink
Browse files

Show restart app option when creating an env var only when app is sta…

…rted
  • Loading branch information...
1 parent cd6bd16 commit b4d87faa16dc7b5bfa1e6e37ad586498da7f7ce3 @frodenas frodenas committed Feb 14, 2012
Showing with 7 additions and 6 deletions.
  1. +7 −6 app/views/apps/envvars/_app_envvar_new.html.haml
@@ -21,10 +21,11 @@
%td
= text_field_tag :var_value, nil, :size => 30, :placeholder => t('apps.envvars.value_placeholder')
.form-field-error
- %tr
- %td
- = sprite_tag("help", :alt => "?", :class=> "help", :title => t('apps.envvars.restart_app_help'))
- = label_tag "restart", t('apps.envvars.restart_app') + ":"
- %td
- = check_box_tag :restart, true, true
+ - if @app[:state] == "STARTED"
+ %tr
+ %td
+ = sprite_tag("help", :alt => "?", :class=> "help", :title => t('apps.envvars.restart_app_help'))
+ = label_tag "restart", t('apps.envvars.restart_app') + ":"
+ %td
+ = check_box_tag :restart, true, true
.modalBox-submit= submit_tag t('apps.envvars.add_envvar')

0 comments on commit b4d87fa

Please sign in to comment.