<div class="box box-primary"><div class="box-header"><h3 class="box-title">{{ 'THREADS.BOX_FORM.TITLE' | translate }}</h3><div class="pull-right box-tools"><button class="btn btn-maroon btn-sm" tooltip="{{'COMMON.BASIC_FORM.BUTTON_CLOSE' | translate}}" x-ng-click="cancel()"><i class="fa fa-bars"></i></button></div></div><form class="form" name="threadForm" novalidate x-ls-form-submit="submit()" x-ls-form-attempt><fieldset><div class="box-body"><!-- Name --><div class="form-group"><label for="name">{{ 'THREADS.BOX_FORM.LABEL_NAME' | translate }}</label><input id="name" name="name" type="text" class="form-control" required x-ng-model="thread.name"></div><div class="section-fieldset"><h4 class="ng-binding">{{ 'THREADS.BOX_MEMBERS_LIST.TITLE' | translate }}</h4><div class="clearfix"></div><p class="ng-binding">{{ 'THREADS.BOX_MEMBERS_LIST.DESCRIPTION' | translate }}</p><div class="form-group"><div class="input-append"><input type="text" class="form-control" placeholder="{{ 'THREADS.BOX_MEMBERS_LIST.PLACEHOLDER_ADD_MEMBER' | translate }}" x-ng-model="userToAdd" x-typeahead-min-length="3" x-typeahead-wait-ms="30" x-typeahead-loading="searching" x-typeahead-on-select="addMember(userToAdd)" x-typeahead="u for u in autocompleteUsers($viewValue) | filter:$viewValue" x-typeahead-template-url="user_representation"> <span class="add-on"><i class="icon icon-plus"></i></span></div></div><div class="form-group"><div class="table-responsive"><table class="table" x-ng-table="tableParams"><tr x-ng-repeat="threadMember in $data" class="not-linked" x-ng-click="edit(threadMember)"><td data-title="'THREADS.BOX_MEMBERS_LIST.TABLE.HEADER_FIRST_NAME' | translate" sortable="'firstName'"><span>{{threadMember.firstName}}</span><td data-title="'THREADS.BOX_MEMBERS_LIST.TABLE.HEADER_LAST_NAME' | translate" sortable="'lastName'"><span>{{threadMember.lastName}}</span><td class="col-sm-1" data-title="'THREADS.BOX_MEMBERS_LIST.TABLE.HEADER_READ_ONLY' | translate" sortable="'readonly'"><input type="checkbox" x-ng-model="threadMember.readonly" x-ng-disabled="threadMember.admin" x-ng-checked="!threadMember.admin && threadMember.readonly" x-ng-change="updateMember(threadMember)"><td class="col-sm-1" data-title="'THREADS.BOX_MEMBERS_LIST.TABLE.HEADER_ADMIN' | translate" sortable="'admin'"><input type="checkbox" x-ng-model="threadMember.admin" x-ng-change="updateMember(threadMember)"><td class="col-sm-2" data-title="'THREADS.BOX_MEMBERS_LIST.TABLE.HEADER_ACTIONS' | translate"><button class="btn btn-danger" type="button" x-ng-show="confirm === undefined" x-ng-click="confirm = $index">{{'THREADS.BOX_MEMBERS_LIST.TABLE.BUTTON_DELETE_MEMBER' | translate}}</button> <button class="btn" type="button" x-ng-show="confirm === $index" x-ng-click="confirm = undefined">{{'THREADS.BOX_MEMBERS_LIST.TABLE.BUTTON_DELETE_MEMBER_NO' | translate}}</button> <button class="btn btn-danger" type="button" x-ng-show="confirm === $index" x-ng-click="deleteMember(threadMember)">{{'THREADS.BOX_MEMBERS_LIST.TABLE.BUTTON_DELETE_MEMBER_YES' | translate}}</button></table></div></div><div class="box-footer"><!-- Validation --><div class="control-group"><div class="controls"><button id="delete" name="delete" type="button" class="btn btn-danger" x-ng-click="remove()">{{ 'THREADS.BOX_FORM.FORM_ACTIONS.BUTTON_DELETE' | translate }}</button> <button type="button" id="reset" name="reset" class="btn btn-warning" x-ng-click="reset()">{{ 'THREADS.BOX_FORM.FORM_ACTIONS.BUTTON_RESET' | translate }}</button> <button type="submit" id="submit" name="submit" class="btn btn-success">{{ 'THREADS.BOX_FORM.FORM_ACTIONS.BUTTON_SUBMIT' | translate }}</button></div></div></div></div></div></fieldset></form></div><!-- USER LIST --><script type="text/ng-template" id="user_representation"><a>
    <span bind-html-unsafe="match.model.firstName | typeaheadHighlight:query"></span>&nbsp;
    <span bind-html-unsafe="match.model.lastName | typeaheadHighlight:query"></span>&nbsp;&lt;
    <span bind-html-unsafe="match.model.mail | typeaheadHighlight:query"></span>&gt;
  </a></script>