summaryrefslogtreecommitdiff
path: root/users/app/views
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2013-12-03 12:17:51 -0800
committerjessib <jessib@riseup.net>2013-12-03 12:17:51 -0800
commit35761333404e3cc2c93bca23036d0fd8e47fd10b (patch)
tree5a35ce7c97acca76302955750cfb4b6772bf0f83 /users/app/views
parent2a2ffd46bf4e6009f2957fb4e4abdedbfa7e3245 (diff)
Add ServiceLevel class to wrap config and give accessors. Has some hacky parts, but seems like okay generic start for now.
Diffstat (limited to 'users/app/views')
-rw-r--r--users/app/views/users/_edit.html.haml6
1 files changed, 4 insertions, 2 deletions
diff --git a/users/app/views/users/_edit.html.haml b/users/app/views/users/_edit.html.haml
index d5a0ff1..d2c2d95 100644
--- a/users/app/views/users/_edit.html.haml
+++ b/users/app/views/users/_edit.html.haml
@@ -47,11 +47,13 @@
%legend= t(:service_level)
- if @user != current_user
= t(:desired_service_level)
- = f.select :desired_service_level, [[APP_CONFIG[:service_levels][1][:description], 1],[APP_CONFIG[:service_levels][2][:description], 2]], :selected => @user.desired_service_level || APP_CONFIG[:default_service_level]
+ - sl1 = ServiceLevel.new({level: 1}) #ugly but okay for now
+ - sl2 = ServiceLevel.new({level: 2})
+ = f.select :desired_service_level_code, [[sl1.description, sl1.level],[sl2.description, sl2.level]], :selected => @user.desired_service_level.level
- if @user != current_user
%p
= t(:effective_service_level)
- = f.select :effective_service_level, [[APP_CONFIG[:service_levels][1][:description], 1],[APP_CONFIG[:service_levels][2][:description], 2]], :selected => @user.effective_service_level || APP_CONFIG[:default_service_level]
+ = f.select :effective_service_level_code, [[sl1.description, sl1.level],[sl2.description, sl2.level]], :selected => @user.effective_service_level.level
.control-group
.controls
= f.submit t(:save), :class => 'btn', :data => {"loading-text" => "Saving..."}