<div class="modal-header"><h3 class="modal-title">{{ 'MAIL_LAYOUT.MODAL_FORM.TITLE' | translate }}</h3></div><form class="form" name="mailLayoutForm" role="form" novalidate x-ls-form-submit="create(model)" x-ls-form-attempt><fieldset><div class="modal-body"><!-- Name --><div class="form-group" x-ng-class="{'has-error': mailLayoutForm.name.$invalid &&
            (mailLayoutForm.name.$dirty || ls.mailLayoutForm.attempted)}"><label for="name">{{ 'MAIL_LAYOUT.MODAL_FORM.LABEL_NAME' | translate }}</label><input id="name" name="name" type="text" class="form-control" required x-ng-model="mailLayout.name"></div><!-- Model --><fieldset><legend>{{ 'MAIL_LAYOUT.MODAL_FORM.LABEL_MODEL' | translate }}</legend><!-- Domain --><div class="form-group" x-ng-class="{'has-error': mailLayoutForm.domain.$invalid &&
              (mailLayoutForm.domain.$dirty || ls.mailLayoutForm.attempted)}"><label for="domain">{{ 'MAIL_LAYOUT.MODAL_FORM.LABEL_DOMAIN' | translate }}</label><select id="domain" name="domain" class="form-control" required x-ng-model="domain" x-ng-change="reloadModels(domain)" x-ng-options="d.identifier for d in domains | orderBy:'identifier'"></select></div><!-- Model --><div class="form-group" x-ng-show="domain" x-ng-class="{'has-error': mailLayoutForm.model.$invalid &&
              (mailLayoutForm.model.$dirty || ls.mailLayoutForm.attempted)}"><label for="model">{{ 'MAIL_LAYOUT.MODAL_FORM.LABEL_MODEL' | translate }}</label><select id="model" name="model" class="form-control" required x-ng-model="model" x-ng-options="m.name for m in models | orderBy:'name'"></select></div></fieldset></div><div class="modal-footer"><button type="button" class="btn btn-default" x-ng-click="cancel()">{{ 'MAIL_LAYOUT.MODAL_FORM.FORM_ACTIONS.BUTTON_CANCEL' | translate }}</button> <button type="submit" class="btn btn-primary">{{ 'MAIL_LAYOUT.MODAL_FORM.FORM_ACTIONS.BUTTON_SUBMIT' | translate }}</button></div></fieldset></form>