174 lines
5.1 KiB
Handlebars
174 lines
5.1 KiB
Handlebars
<form class="form-horizontal">
|
|
|
|
<div>
|
|
{{#if model.automatic}}
|
|
<h3>{{model.name}}</h3>
|
|
{{else}}
|
|
<label for="name">{{i18n 'groups.name'}}</label>
|
|
{{text-field name="name" value=model.name placeholderKey="groups.name_placeholder"}}
|
|
{{/if}}
|
|
</div>
|
|
|
|
{{#unless model.automatic}}
|
|
<div>
|
|
<label for='full_name'>{{i18n 'groups.edit.full_name'}}</label>
|
|
{{input type='text' name='full_name' value=model.full_name class='group-edit-full-name'}}
|
|
</div>
|
|
|
|
<div>
|
|
<label for="bio">{{i18n 'groups.bio'}}</label>
|
|
{{d-editor value=model.bio_raw}}
|
|
</div>
|
|
|
|
{{#if model.hasOwners}}
|
|
<div>
|
|
<label for='owner-list'>{{i18n 'admin.groups.group_owners'}}</label>
|
|
<div class="ac-wrap clearfix" id='owner-list'>
|
|
{{#each model.owners as |member|}}
|
|
{{group-member member=member removeAction="removeOwner"}}
|
|
{{/each}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div>
|
|
<label for="owner-selector">{{i18n 'admin.groups.add_owners'}}</label>
|
|
|
|
{{user-selector usernames=model.ownerUsernames
|
|
placeholderKey="admin.groups.selector_placeholder"
|
|
id="owner-selector"}}
|
|
|
|
{{#if model.id}}
|
|
{{d-button
|
|
action="addOwners"
|
|
class="add"
|
|
icon="plus"
|
|
label="admin.groups.add"}}
|
|
{{/if}}
|
|
</div>
|
|
{{/unless}}
|
|
|
|
<div>
|
|
{{group-members-input model=model addButton=model.id}}
|
|
</div>
|
|
|
|
<div>
|
|
<label for="visiblity">{{i18n 'groups.visibility_levels.title'}}</label>
|
|
{{combo-box name="alias"
|
|
valueAttribute="value"
|
|
value=model.visibility_level
|
|
content=visibilityLevelOptions
|
|
castInteger=true}}
|
|
</div>
|
|
|
|
{{#unless model.automatic}}
|
|
<div>
|
|
<label>
|
|
{{input type="checkbox"
|
|
checked=model.public_admission
|
|
disabled=disablePublicSetting}}
|
|
|
|
{{i18n 'groups.public_admission'}}
|
|
</label>
|
|
</div>
|
|
|
|
<div>
|
|
<label>
|
|
{{input type='checkbox'
|
|
checked=model.public_exit}}
|
|
|
|
{{i18n 'groups.public_exit'}}
|
|
</label>
|
|
</div>
|
|
|
|
<div>
|
|
<label>
|
|
{{input type="checkbox"
|
|
checked=model.allow_membership_requests
|
|
disabled=disableMembershipRequestSetting}}
|
|
|
|
{{i18n 'groups.allow_membership_requests'}}
|
|
</label>
|
|
</div>
|
|
|
|
{{#if model.allow_membership_requests}}
|
|
<div>
|
|
<label for="membership-request-template">
|
|
{{i18n 'groups.membership_request_template'}}
|
|
</label>
|
|
|
|
{{expanding-text-area name="membership-request-template"
|
|
value=model.membership_request_template}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div>
|
|
<label>
|
|
{{input type="checkbox" checked=model.primary_group}}
|
|
{{i18n 'admin.groups.primary_group'}}
|
|
</label>
|
|
</div>
|
|
{{/unless}}
|
|
|
|
<div>
|
|
<label for="alias">{{i18n 'groups.alias_levels.mentionable'}}</label>
|
|
{{combo-box name="alias" valueAttribute="value" value=model.mentionable_level content=aliasLevelOptions}}
|
|
</div>
|
|
|
|
<div>
|
|
<label for="alias">{{i18n 'groups.alias_levels.messageable'}}</label>
|
|
{{combo-box name="alias" valueAttribute="value" value=model.messageable_level content=aliasLevelOptions}}
|
|
</div>
|
|
|
|
<div>
|
|
<label>{{i18n 'groups.notification_level'}}</label>
|
|
{{notifications-button i18nPrefix='groups.notifications' value=model.default_notification_level}}
|
|
<div class='clearfix'></div>
|
|
</div>
|
|
|
|
{{#unless model.automatic}}
|
|
<div>
|
|
<label for="automatic_membership">{{i18n 'admin.groups.automatic_membership_email_domains'}}</label>
|
|
{{list-setting name="automatic_membership" settingValue=model.emailDomains}}
|
|
<label>
|
|
{{input type="checkbox" checked=model.automatic_membership_retroactive}}
|
|
{{i18n 'admin.groups.automatic_membership_retroactive'}}
|
|
</label>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="title">
|
|
{{i18n 'admin.groups.default_title'}}
|
|
</label>
|
|
{{input value=model.title}}
|
|
</div>
|
|
|
|
<div>
|
|
<label for="grant_trust_level">{{i18n 'groups.trust_levels.title'}}</label>
|
|
{{combo-box name="grant_trust_level" valueAttribute="value" value=model.grant_trust_level content=trustLevelOptions}}
|
|
</div>
|
|
|
|
{{#if siteSettings.email_in}}
|
|
<label for="incoming_email">{{i18n 'admin.groups.incoming_email'}}</label>
|
|
{{text-field name="incoming_email" value=model.incoming_email placeholderKey="admin.groups.incoming_email_placeholder"}}
|
|
{{plugin-outlet name="group-email-in" args=(hash model=model)}}
|
|
{{/if}}
|
|
{{/unless}}
|
|
|
|
{{#unless model.automatic}}
|
|
{{group-flair-inputs model=model}}
|
|
{{/unless}}
|
|
|
|
{{plugin-outlet name="group-edit" args=(hash group=model)}}
|
|
|
|
<div class='buttons'>
|
|
<button {{action "save"}} disabled={{disableSave}} class='btn btn-primary'>{{i18n 'admin.customize.save'}}</button>
|
|
{{#unless model.automatic}}
|
|
<button {{action "destroy"}} class='btn btn-danger'>{{d-icon "trash-o"}}{{i18n 'admin.customize.delete'}}</button>
|
|
{{/unless}}
|
|
|
|
<span class="saving {{unless savingStatus 'hidden'}}">{{savingStatus}}</span>
|
|
</div>
|
|
|
|
</form>
|