diff options
author | jessib <jessib@riseup.net> | 2013-12-05 11:11:39 -0800 |
---|---|---|
committer | jessib <jessib@riseup.net> | 2013-12-05 11:11:39 -0800 |
commit | 6ebf095bc553345a3e0b8c48cadc3e1440c59ca5 (patch) | |
tree | ed8c1d2787cec6203e629dfa847dd63cdb2d1f56 | |
parent | 7d4a9658c29cad526cfe5c952f71109e8eb304e7 (diff) |
We won't want service levels in production mode, and have it so this initial service level code won't break anything if it isn't set in the config.
-rw-r--r-- | config/defaults.yml | 1 | ||||
-rw-r--r-- | users/app/views/users/_edit.html.haml | 27 |
2 files changed, 14 insertions, 14 deletions
diff --git a/config/defaults.yml b/config/defaults.yml index c986d01..4530d47 100644 --- a/config/defaults.yml +++ b/config/defaults.yml @@ -88,7 +88,6 @@ production: <<: *downloads <<: *cert_options <<: *common - <<: *service_levels admins: [] domain: example.net payment: [] diff --git a/users/app/views/users/_edit.html.haml b/users/app/views/users/_edit.html.haml index 897c54b..0b36d6e 100644 --- a/users/app/views/users/_edit.html.haml +++ b/users/app/views/users/_edit.html.haml @@ -42,19 +42,20 @@ -# -# SERVICE LEVEL -# -- form_options = {:html => {:class => user_form_class('form-horizontal'), :id => 'update_service_level', :data => {token: session[:token]}}, :validate => true} -= simple_form_for @user, form_options do |f| - %legend= t(:service_level) - - if @user != current_user - = t(:desired_service_level) - = f.select :desired_service_level_code, ServiceLevel.authenticated_select_options, :selected => @user.desired_service_level.id - - if @user != current_user - %p - = t(:effective_service_level) - = f.select :effective_service_level_code, ServiceLevel.authenticated_select_options, :selected => @user.effective_service_level.id - .control-group - .controls - = f.submit t(:save), :class => 'btn', :data => {"loading-text" => "Saving..."} +- if APP_CONFIG[:service_levels] + - form_options = {:html => {:class => user_form_class('form-horizontal'), :id => 'update_service_level', :data => {token: session[:token]}}, :validate => true} + = simple_form_for @user, form_options do |f| + %legend= t(:service_level) + - if @user != current_user + = t(:desired_service_level) + = f.select :desired_service_level_code, ServiceLevel.authenticated_select_options, :selected => @user.desired_service_level.id + - if @user != current_user + %p + = t(:effective_service_level) + = f.select :effective_service_level_code, ServiceLevel.authenticated_select_options, :selected => @user.effective_service_level.id + .control-group + .controls + = f.submit t(:save), :class => 'btn', :data => {"loading-text" => "Saving..."} -# -# DESTROY ACCOUNT -# |