Support for `value_list` in site settings

This commit is contained in:
Robin Ward 2015-09-01 11:54:16 -04:00
parent a7eabade19
commit b41b176bc6
3 changed files with 16 additions and 2 deletions

View File

@ -4,7 +4,7 @@ import SiteSetting from 'admin/models/site-setting';
import { propertyNotEqual } from 'discourse/lib/computed';
import computed from 'ember-addons/ember-computed-decorators';
const CustomTypes = ['bool', 'enum', 'list', 'url_list', 'host_list', 'category_list'];
const CustomTypes = ['bool', 'enum', 'list', 'url_list', 'host_list', 'category_list', 'value_list'];
export default Ember.Component.extend(BufferedContent, ScrollTop, {
classNameBindings: [':row', ':setting', 'setting.overridden', 'typeClass'],

View File

@ -0,0 +1,3 @@
{{value-list values=value}}
{{setting-validation-message message=validationMessage}}
<div class='desc'>{{{unbound setting.description}}}</div>

View File

@ -21,7 +21,18 @@ module SiteSettingExtension
end
def types
@types ||= Enum.new(:string, :time, :fixnum, :float, :bool, :null, :enum, :list, :url_list, :host_list, :category_list)
@types ||= Enum.new(:string,
:time,
:fixnum,
:float,
:bool,
:null,
:enum,
:list,
:url_list,
:host_list,
:category_list,
:value_list)
end
def mutex