UX: Allow site settings to display as textareas if they like
This commit is contained in:
parent
cdb3706025
commit
29d529020b
|
@ -1,3 +1,8 @@
|
|||
{{text-field value=value classNames="input-setting-string"}}
|
||||
{{#if setting.textarea}}
|
||||
{{textarea value=value classNames="input-setting-textarea"}}
|
||||
{{else}}
|
||||
{{text-field value=value classNames="input-setting-string"}}
|
||||
{{/if}}
|
||||
|
||||
{{setting-validation-message message=validationMessage}}
|
||||
<div class='desc'>{{{unbound setting.description}}}</div>
|
||||
|
|
|
@ -461,7 +461,7 @@ td.flaggers td {
|
|||
.setting-controls {
|
||||
float: left;
|
||||
}
|
||||
.input-setting-string {
|
||||
.input-setting-string, .input-setting-textarea {
|
||||
box-sizing: border-box;
|
||||
height: 30px;
|
||||
width: 100%;
|
||||
|
@ -469,6 +469,9 @@ td.flaggers td {
|
|||
width: 100%;
|
||||
}
|
||||
}
|
||||
.input-setting-textarea {
|
||||
height: 150px;
|
||||
}
|
||||
.input-setting-list {
|
||||
@media (max-width: $mobile-breakpoint) {
|
||||
width: 100%;
|
||||
|
@ -531,7 +534,7 @@ td.flaggers td {
|
|||
}
|
||||
|
||||
.setting.overridden.string {
|
||||
input[type=text] {
|
||||
input[type=text], textarea {
|
||||
background-color: dark-light-diff($highlight, $secondary, 50%, -60%);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -195,6 +195,8 @@ module SiteSettingExtension
|
|||
opts.merge!({valid_values: choices[s].map{|c| {name: c, value: c}}, translate_names: false})
|
||||
end
|
||||
|
||||
opts[:textarea] = true if static_types[s] == :textarea
|
||||
|
||||
opts[:choices] = choices[s] if choices.has_key? s
|
||||
opts
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue