<div class="box box-primary"><div class="box-header"><h3 class="box-title">{{ domain.label }}</h3><div class="pull-right box-tools"><div class="btn-group"><label class="btn btn-info" x-ng-model="filters.language" x-btn-radio="'ENGLISH'">{{ 'MAIL_CONFIG.BOX_FORM.HEADER.LANGUAGE.ENGLISH' | translate }}</label><label class="btn btn-info" x-ng-model="filters.language" x-btn-radio="'FRENCH'">{{ 'MAIL_CONFIG.BOX_FORM.HEADER.LANGUAGE.FRENCH' | translate }}</label></div><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="mailConfigForm" role="form" novalidate x-ls-form-submit="update(true)" x-ls-form-attempt><fieldset><div class="box-body"><!-- Name --><div class="form-group"><label for="name">{{ 'MAIL_CONFIG.BOX_FORM.LABEL_NAME' | translate }}</label><input id="name" name="name" type="text" class="form-control" required x-ng-model="mailConfig.name"></div><!-- Visible --><div class="input-group"><span class="input-group-addon"><input id="visible" name="visible" type="checkbox" x-ng-model="mailConfig.visible"></span> <span class="form-control">{{ 'MAIL_CONFIG.BOX_FORM.LABEL_VISIBLE' | translate }}</span></div><div class="box-footer"><!-- Validation --><button type="button" id="delete" name="delete" class="btn btn-danger" x-ng-click="remove()">{{ 'MAIL_CONFIG.BOX_FORM.FORM_ACTIONS.BUTTON_DELETE' | translate }}</button> <button type="button" id="reset" name="reset" class="btn btn-warning" x-ng-click="reset()">{{ 'MAIL_CONFIG.BOX_FORM.FORM_ACTIONS.BUTTON_RESET' | translate }}</button> <button type="submit" id="submit" name="submit" class="btn btn-success">{{ 'MAIL_CONFIG.BOX_FORM.FORM_ACTIONS.BUTTON_SUBMIT' | translate }}</button><hr><!-- Mail layout text --><div class="form-group" x-ng-class="{'has-error': mailConfigForm.mailLayoutText.$invalid &&
                (mailConfigForm.mailLayoutText.$dirty || ls.mailConfigForm.attempted)}"><label for="mailLayoutText">{{ 'MAIL_CONFIG.BOX_FORM.LABEL_MAIL_LAYOUT_TEXT' | translate }}</label><select id="mailLayoutText" name="mailLayoutText" class="form-control" required x-ng-model="mailConfig.mailLayoutText" x-ng-change="update(false)" x-ng-options="mlt.uuid as mlt.name for mlt in mailLayouts | orderBy:'name' | filter:{plaintext: true}"></select></div><!-- Mail layout html --><div class="form-group" x-ng-class="{'has-error': mailConfigForm.mailLayoutHtml.$invalid &&
                (mailConfigForm.mailLayoutHtml.$dirty || ls.mailConfigForm.attempted)}"><label for="mailLayoutHtml">{{ 'MAIL_CONFIG.BOX_FORM.LABEL_MAIL_LAYOUT_HTML' | translate }}</label><select id="mailLayoutHtml" name="mailLayoutHtml" class="form-control" required x-ng-model="mailConfig.mailLayoutHtml" x-ng-change="update(false)" x-ng-options="mlh.uuid as mlh.name for mlh in mailLayouts | orderBy:'name' | filter:{plaintext: false}"></select></div><!-- Mail contents --><div class="table-responsive"><table class="table table-striped table-hover" x-ng-table="tableParams"><tr x-ng-repeat="mailContentLang in $data" class="not-linked" x-ui-sref="mailconfig.mailcontentlang({mailConfigId: $state.params.id, id: mailContentLang.uuid, domainId: $state.params.domainId})"><td style="cursor: pointer" data-title="'MAIL_CONFIG.BOX_FORM.TABLE.HEADER_MAIL_CONTENT_TYPE' | translate" sortable="'mailContentType'"><span>{{ mailContentLang.mailContentType }}</span><td style="cursor: pointer" data-title="'MAIL_CONFIG.BOX_FORM.TABLE.HEADER_MAIL_CONTENT_NAME' | translate" sortable="'mailContentName'"><span>{{ mailContentLang.mailContentName }}</span></table></div><!-- Mail footer --><div class="form-group" x-ng-class="{'has-error': mailConfigForm.mailFooterLang.$invalid &&
                (mailConfigForm.mailFooterLang.$dirty || ls.mailConfigForm.attempted)}"><label for="mailFooter">{{ 'MAIL_CONFIG.BOX_FORM.LABEL_MAIL_FOOTER_LANG' | translate }}</label><select id="mailFooter" name="mailFooterLang" class="form-control" required x-ng-model="mailConfig.mailFooterLangs[filters.language].mailFooter" x-ng-change="updateMailFooterLang(mailConfig.mailFooterLangs[filters.language])" x-ng-options="mfl.uuid as mfl.name for mfl in mailFooterLangs | orderBy:'name'"></select></div></div></div></fieldset></form></div>