Replace underscore with space when showing site setting names

This commit is contained in:
Neil Lalonde 2014-04-03 16:07:59 -04:00
parent 767048cc8d
commit dc3739d49f
4 changed files with 12 additions and 3 deletions

View File

@ -31,6 +31,15 @@ Discourse.SiteSetting = Discourse.Model.extend({
}.property('value'),
/**
The name of the setting. Basically, underscores in the setting key are replaced with spaces.
@property settingName
**/
settingName: function() {
return this.get('setting').replace(/\_/g, ' ');
}.property('setting'),
/**
Has the user changed the setting? If so we should save it.

View File

@ -1,5 +1,5 @@
<div class='setting-label'>
<h3>{{unbound setting}}</h3>
<h3>{{unbound settingName}}</h3>
</div>
<div class="setting-value">
<label>

View File

@ -1,5 +1,5 @@
<div class='setting-label'>
<h3>{{unbound setting}}</h3>
<h3>{{unbound settingName}}</h3>
</div>
<div class="setting-value">
{{combobox valueAttribute="value" content=validValues value=value none=allowsNone}}

View File

@ -1,5 +1,5 @@
<div class='setting-label'>
<h3>{{unbound setting}}</h3>
<h3>{{unbound settingName}}</h3>
</div>
<div class="setting-value">
{{textField value=value classNames="input-setting-string"}}