views: convert mod dashboard + admin user edit page to simple form.

Fixes bug with the user level select dropdown on the mod dashboard page
missing the builder level.
This commit is contained in:
evazion
2019-08-18 11:20:14 -05:00
parent d7d4a63e69
commit 576b4feb3b
6 changed files with 15 additions and 74 deletions

View File

@@ -1,13 +0,0 @@
module Admin::UsersHelper
def user_level_select(object, field)
options = [
["Member", User::Levels::MEMBER],
["Gold", User::Levels::GOLD],
["Platinum", User::Levels::PLATINUM],
["Builder", User::Levels::BUILDER],
["Moderator", User::Levels::MODERATOR],
["Admin", User::Levels::ADMIN]
]
select(object, field, options)
end
end

View File

@@ -1,16 +0,0 @@
module Moderator
module DashboardsHelper
def user_level_select_tag(name, options = {})
choices = [
["", ""],
["Member", 20],
["Gold", 30],
["Platinum", 31],
["Moderator", 40],
["Admin", 50]
]
select_tag(name, options_for_select(choices, params[name].to_i), options)
end
end
end