2015-01-06 01:51:45 +08:00
|
|
|
<form class="form-horizontal">
|
2014-04-24 01:25:02 +08:00
|
|
|
|
2015-01-06 01:51:45 +08:00
|
|
|
<div>
|
2015-08-13 22:01:29 +08:00
|
|
|
{{#if model.automatic}}
|
|
|
|
<h3>{{model.name}}</h3>
|
2015-01-06 01:51:45 +08:00
|
|
|
{{else}}
|
|
|
|
<label for="name">{{i18n 'admin.groups.name'}}</label>
|
2015-08-13 22:01:29 +08:00
|
|
|
{{text-field name="name" value=model.name placeholderKey="admin.groups.name_placeholder"}}
|
2015-01-06 01:51:45 +08:00
|
|
|
{{/if}}
|
2014-04-24 01:25:02 +08:00
|
|
|
</div>
|
2015-01-06 01:51:45 +08:00
|
|
|
|
2015-08-13 22:01:29 +08:00
|
|
|
{{#if model.id}}
|
2016-04-01 05:33:25 +08:00
|
|
|
{{#unless model.automatic}}
|
|
|
|
{{#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"}}
|
|
|
|
{{d-button action="addOwners" class="add" icon="plus" label="admin.groups.add"}}
|
|
|
|
</div>
|
|
|
|
{{/unless}}
|
2015-01-06 01:51:45 +08:00
|
|
|
<div>
|
2015-08-13 22:01:29 +08:00
|
|
|
<label>{{i18n 'admin.groups.group_members'}} ({{model.user_count}})</label>
|
2015-01-06 01:51:45 +08:00
|
|
|
<div>
|
2015-09-15 03:54:34 +08:00
|
|
|
<a class="previous {{if showingFirst 'disabled'}}" {{action "previous"}}>{{fa-icon "fast-backward"}}</a>
|
2015-01-06 01:51:45 +08:00
|
|
|
{{currentPage}}/{{totalPages}}
|
2015-09-15 03:54:34 +08:00
|
|
|
<a class="next {{if showingLast 'disabled'}}" {{action "next"}}>{{fa-icon "fast-forward"}}</a>
|
2015-01-06 01:51:45 +08:00
|
|
|
</div>
|
|
|
|
<div class="ac-wrap clearfix">
|
2015-08-13 22:01:29 +08:00
|
|
|
{{#each model.members as |member|}}
|
|
|
|
{{group-member member=member automatic=model.automatic removeAction="removeMember"}}
|
|
|
|
{{/each}}
|
2015-01-06 01:51:45 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2015-08-13 22:01:29 +08:00
|
|
|
{{#unless model.automatic}}
|
2015-01-06 01:51:45 +08:00
|
|
|
<div>
|
|
|
|
<label for="user-selector">{{i18n 'admin.groups.add_members'}}</label>
|
2015-08-13 22:01:29 +08:00
|
|
|
{{user-selector usernames=model.usernames placeholderKey="admin.groups.selector_placeholder" id="user-selector"}}
|
2015-09-15 03:54:34 +08:00
|
|
|
{{d-button action="addMembers" class="add" icon="plus" label="admin.groups.add"}}
|
2015-01-06 01:51:45 +08:00
|
|
|
</div>
|
|
|
|
{{/unless}}
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<label>
|
2015-08-13 22:01:29 +08:00
|
|
|
{{input type="checkbox" checked=model.visible}}
|
2015-01-06 01:51:45 +08:00
|
|
|
{{i18n 'groups.visible'}}
|
|
|
|
</label>
|
2014-04-24 01:25:02 +08:00
|
|
|
</div>
|
2015-01-06 01:51:45 +08:00
|
|
|
|
2015-08-13 22:01:29 +08:00
|
|
|
{{#unless model.automatic}}
|
2015-04-10 10:17:28 +08:00
|
|
|
<div>
|
|
|
|
<label for="primary_group">
|
2015-08-13 22:01:29 +08:00
|
|
|
{{input type="checkbox" checked=model.primary_group}}
|
2015-04-10 10:17:28 +08:00
|
|
|
{{i18n 'admin.groups.primary_group'}}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
{{/unless}}
|
|
|
|
|
2015-01-06 01:51:45 +08:00
|
|
|
<div>
|
|
|
|
<label for="alias">{{i18n 'groups.alias_levels.title'}}</label>
|
2015-08-13 22:01:29 +08:00
|
|
|
{{combo-box name="alias" valueAttribute="value" value=model.alias_level content=aliasLevelOptions}}
|
2014-04-24 01:25:02 +08:00
|
|
|
</div>
|
2015-01-06 01:51:45 +08:00
|
|
|
|
2015-08-13 22:01:29 +08:00
|
|
|
{{#unless model.automatic}}
|
2015-01-24 01:25:43 +08:00
|
|
|
<div>
|
|
|
|
<label for="automatic_membership">{{i18n 'admin.groups.automatic_membership_email_domains'}}</label>
|
2015-08-13 22:01:29 +08:00
|
|
|
{{list-setting name="automatic_membership" settingValue=model.emailDomains}}
|
2015-01-24 01:25:43 +08:00
|
|
|
<label>
|
2015-08-13 22:01:29 +08:00
|
|
|
{{input type="checkbox" checked=model.automatic_membership_retroactive}}
|
2015-01-24 01:25:43 +08:00
|
|
|
{{i18n 'admin.groups.automatic_membership_retroactive'}}
|
|
|
|
</label>
|
|
|
|
</div>
|
2015-04-10 10:17:28 +08:00
|
|
|
|
|
|
|
<div>
|
|
|
|
<label for="title">
|
|
|
|
{{i18n 'admin.groups.default_title'}}
|
|
|
|
</label>
|
2015-08-13 22:01:29 +08:00
|
|
|
{{input value=model.title}}
|
2015-04-10 10:17:28 +08:00
|
|
|
</div>
|
2015-09-02 04:52:05 +08:00
|
|
|
|
|
|
|
<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>
|
2016-04-01 05:33:25 +08:00
|
|
|
|
|
|
|
{{#if siteSettings.email_in}}
|
|
|
|
<div>
|
|
|
|
<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"}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2015-01-24 01:25:43 +08:00
|
|
|
{{/unless}}
|
|
|
|
|
2015-01-06 01:51:45 +08:00
|
|
|
<div class='buttons'>
|
|
|
|
<button {{action "save"}} {{bind-attr disabled="disableSave"}} class='btn btn-primary'>{{i18n 'admin.customize.save'}}</button>
|
2015-08-13 22:01:29 +08:00
|
|
|
{{#unless model.automatic}}
|
2015-01-06 01:51:45 +08:00
|
|
|
<button {{action "destroy"}} class='btn btn-danger'>{{fa-icon "trash-o"}}{{i18n 'admin.customize.delete'}}</button>
|
|
|
|
{{/unless}}
|
2016-04-01 05:33:25 +08:00
|
|
|
<span {{bind-attr class=":saving savingStatus::hidden"}}>{{savingStatus}}</span>
|
2015-01-06 01:51:45 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|