mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-18 03:25:31 -05:00
FEATURE: allow title overridable
This commit is contained in:
parent
367d699247
commit
ebf385aedc
3 changed files with 6 additions and 2 deletions
|
@ -102,7 +102,7 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<span>
|
<span>
|
||||||
{{input type="checkbox" checked=allow_title disabled=readOnly}}
|
{{input type="checkbox" checked=allow_title}}
|
||||||
{{i18n admin.badges.allow_title}}
|
{{i18n admin.badges.allow_title}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -213,6 +213,10 @@ SQL
|
||||||
self.name ||= val
|
self.name ||= val
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def default_allow_title=(val)
|
||||||
|
self.allow_title ||= val
|
||||||
|
end
|
||||||
|
|
||||||
def default_badge_grouping_id=(val)
|
def default_badge_grouping_id=(val)
|
||||||
# allow to correct orphans
|
# allow to correct orphans
|
||||||
if !self.badge_grouping_id || self.badge_grouping_id < 0
|
if !self.badge_grouping_id || self.badge_grouping_id < 0
|
||||||
|
|
|
@ -55,7 +55,7 @@ trust_level_badges.each do |spec|
|
||||||
b.trigger = Badge::Trigger::TrustLevelChange
|
b.trigger = Badge::Trigger::TrustLevelChange
|
||||||
|
|
||||||
# allow title for leader and elder
|
# allow title for leader and elder
|
||||||
b.allow_title = spec[:id] > 2
|
b.default_allow_title = spec[:id] > 2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue