FIX: Group#visibility_level isn't shown in admin group edit page.

This commit is contained in:
Guo Xiang Tan 2017-07-31 16:33:40 +09:00
parent 358d245dd8
commit 83bb042311
2 changed files with 6 additions and 3 deletions

View File

@ -54,7 +54,11 @@
<div>
<label for="visiblity">{{i18n 'groups.visibility_levels.title'}}</label>
{{combo-box name="alias" valueAttribute="value" value=model.visibility_level content=visibilityLevelOptions}}
{{combo-box name="alias"
valueAttribute="value"
value=model.visibility_level
content=visibilityLevelOptions
castInteger=true}}
</div>
{{#unless model.automatic}}

View File

@ -122,8 +122,7 @@ const Group = RestModel.extend({
@observes("visibility_level")
_updatePublic() {
let visibility_level = parseInt(this.get('visibility_level'));
if (visibility_level !== 0) {
if (this.get('visibility_level') !== 0) {
this.set('public', false);
this.set('allow_membership_requests', false);
}