<div ng-controller="Admin.SecurityEmailTemplatesController">
    <form name="securityEmailTemplatesForm">
    <div class="pull-right well">
        <div class="btn-group">
            <button class="btn btn-xs btn-link" ng-click="save()" ng-disabled="emailReceiverConfiguration.user_case == emailReceiverConfiguration.user_complaint">
                <i class="fa fa-save"></i>
                <span translate>admin.security.emailTemplates.settings.btnSave</span>
            </button>
        </div>
    </div>
    <panel-view header="Email Settings" collapsible="false">
        <div class="well-sm">
            <div class="row">
                <div class="checkbox">
                    <label>
                        <input type="checkbox" id="enableCaseFromEmail" ng-model="emailReceiverConfiguration.enableCase">
                        <span translate>admin.security.emailTemplates.settings.enableCase</span>
                    </label>
                </div>
                <div class="col-lg-4 form-group">
                    <label for="emailCaseFile" translate>
                        admin.security.emailTemplates.settings.emailCaseFile.label
                    </label>
                    <input ng-model="emailReceiverConfiguration.user_case" type="email" name="emailReceiverConfigurationUserCase"
                            placeholder="{{'admin.security.emailTemplates.settings.email.placeholder' | translate}}" class="form-control">
                    <span class="alert alert-danger col-sm-12" ng-show="securityEmailTemplatesForm.emailReceiverConfigurationUserCase.$touched &&
                    emailReceiverConfiguration.user_case == emailReceiverConfiguration.user_complaint" translate>admin.security.emailTemplates.settings.emailCaseFile.label.error</span>
                </div>
                <div class="col-lg-4 form-group">
                    <label for="passEmailCaseFile" translate>
                        admin.security.emailTemplates.settings.password.label
                    </label>
                    <input ng-model="emailReceiverConfiguration.pass_case" type="password"
                            placeholder="{{'admin.security.emailTemplates.settings.password.placeholder' | translate}}"
                            class="form-control">
                </div>
            </div>
            <div class="row">
                <div class="checkbox">
                    <label>
                        <input type="checkbox" id="enableComplaintFromEmail" ng-model="emailReceiverConfiguration.enableComplaint">
                        <span translate>admin.security.emailTemplates.settings.enableComplaint</span>
                    </label>
                </div>
                <div class="col-lg-4 form-group">
                    <label for="emailComplaint" translate>
                        admin.security.emailTemplates.settings.emailComplaint.label
                    </label>
                    <input ng-model="emailReceiverConfiguration.user_complaint" type="email" name="emailReceiverConfigurationUserComplaint"
                           placeholder="{{'admin.security.emailTemplates.settings.email.placeholder' | translate}}" class="form-control">
                    <span class="alert alert-danger col-sm-12" ng-show="securityEmailTemplatesForm.emailReceiverConfigurationUserComplaint.$touched
                    && emailReceiverConfiguration.user_complaint == emailReceiverConfiguration.user_case " translate>admin.security.emailTemplates.settings.emailComplaint.label.error</span>
                </div>
                <div class="col-lg-4 form-group">
                    <label for="passEmailComplaint" translate>
                        admin.security.emailTemplates.settings.password.label
                    </label>
                    <input ng-model="emailReceiverConfiguration.pass_complaint" type="password"
                           placeholder="{{'admin.security.emailTemplates.settings.password.placeholder' | translate}}"
                           class="form-control">
                </div>
            </div>
        </div>
    </panel-view>
    <div class="pull-right well">
        <div class="btn-group">
            <button class="btn btn-xs btn-link" ng-click="save()">
                <i class="fa fa-save"></i>
                <span translate>admin.security.emailTemplates.settings.btnSave</span>
            </button>
        </div>
    </div>
    <panel-view header="{{'admin.security.emailTemplates.bursting.configuration.header' | translate}}" collapsible="false">
        <div class="well-sm">
            <div class="row">
                <div class="checkbox">
                    <label>
                        <input type="checkbox" id="burstOutEmailAttachments" ng-model="emailReceiverConfiguration.enableBurstingAttachments">
                        <span translate>admin.security.emailTemplates.bursting.configuration.label</span>
                    </label>
                </div>
            </div>
        </div>
    </panel-view>
    </form>
</div>
