<div class="box box-primary"><div class="box-header"><h3 class="box-title">{{ 'UPLOAD_PROPOSITION_FILTER.BOX_FORM.TITLE' | translate }}</h3><div class="pull-right box-tools"><div class="btn-group"><button class="btn btn-cancel btn-sm" tooltip="{{'COMMON.BASIC_FORM.BUTTON_CLOSE' | translate}}" x-ng-click="cancel()"><i class="fa fa-bars"></i></button></div></div></div><form class="form" name="uploadPropositionFilterForm" role="form" novalidate x-ls-form-submit="submit()" x-ls-form-attempt><fieldset><div class="box-body"><!-- Name --><div class="form-group" x-ng-class="{'has-error': uploadPropositionFilterForm.name.$invalid &&
             (uploadPropositionFilterForm.name.$dirty || ls.uploadPropositionFilterForm.attempted)}"><label for="name">{{ 'UPLOAD_PROPOSITION_FILTER.BOX_FORM.LABEL_NAME' | translate }}</label><input type="text" name="name" id="name" class="form-control" required x-ng-model="filter.name"></div><div class="form-group"><label for="status">{{ 'UPLOAD_PROPOSITION_FILTER.BOX_FORM.LABEL_STATUS' | translate }}</label><div class="input-group"><span class="input-group-addon"><input type="checkbox" x-ng-model="filter.enable"></span> <span class="form-control" x-ng-if="filter.enable">{{ 'UPLOAD_PROPOSITION_FILTER.BOX_FORM.LABEL_ENABLED' | translate }}</span> <span class="form-control" x-ng-if="!filter.enable">{{ 'UPLOAD_PROPOSITION_FILTER.BOX_FORM.LABEL_DISABLED' | translate }}</span></div></div><!-- Rules --><div class="form-group"><label for="rules">{{ 'UPLOAD_PROPOSITION_FILTER.BOX_FORM.LABEL_RULES' | translate }}</label><div x-ng-repeat="m in matchTypes"><div class="input-group"><span class="input-group-addon"><input type="radio" x-ng-model="filter.match" value="{{m}}"></span> <span class="form-control">{{ 'COMMON.ENUM.UPLOAD_PROPOSITION_MATCH_TYPE.' + m | translate }}</span></div></div><div x-ng-show="filter.match != 'TRUE'"><br><button type="button" name="add_rule" class="btn btn-success" x-ng-click="addRule()">{{ 'UPLOAD_PROPOSITION_FILTER.BOX_FORM.BUTTON_ADD_RULE' | translate }}</button><div class="form-inline" x-ng-repeat="rule in filter.uploadPropositionRules"><div class="form-group" x-ng-class="{'has-error': (uploadPropositionFilterForm.rule1.$invalid &&
                        (uploadPropositionFilterForm.rule1.$dirty || ls.uploadPropositionFilterForm.attempted)) ||
                        uploadPropositionFilterForm.rule2.$invalid &&
                        (uploadPropositionFilterForm.rule2.$dirty || ls.uploadPropositionFilterForm.attempted)}"><br><select name="rule1" class="form-control" required x-ng-model="rule.field" x-ng-options="f as 'COMMON.ENUM.UPLOAD_PROPOSITION_RULE_TYPE.' + f | translate for f in fieldTypes | orderBy:'toString()'"></select><select name="rule2" class="form-control" required x-ng-model="rule.operator" x-ng-options="o as 'COMMON.ENUM.UPLOAD_PROPOSITION_OPERATOR_TYPE.' + o | translate for o in operatorTypes | orderBy:'toString()'"></select><div class="form-group"><input type="text" class="form-control" required x-ng-model="rule.value"></div><button type="button" class="btn btn-xs btn-danger" x-ng-click="deleteRule($index)"><i class="fa fa-times"></i></button></div></div></div></div><!-- Actions --><div class="form-group" x-ng-class="{'has-error': uploadPropositionFilterForm.action.$invalid &&
             (uploadPropositionFilterForm.action.$dirty || ls.uploadPropositionFilterForm.attempted)}"><label for="action">{{ 'UPLOAD_PROPOSITION_FILTER.BOX_FORM.LABEL_ACTION' | translate }}</label><select name="action" id="action" class="form-control" required x-ng-model="filter.uploadPropositionActions[0].action" x-ng-options="a as 'COMMON.ENUM.UPLOAD_PROPOSITION_ACTION_TYPE.' + a | translate for a in actionTypes | orderBy:'toString()'"></select></div></div><div class="clearfix"></div><div class="box-footer"><!-- Validation --><button id="delete" name="delete" type="button" class="btn btn-danger" x-ng-show="state==='edit'" x-ng-click="remove()">{{ 'UPLOAD_PROPOSITION_FILTER.BOX_FORM.FORM_ACTIONS.BUTTON_DELETE' | translate }}</button> <button type="button" id="reset" name="reset" class="btn btn-warning" x-ng-click="reset()">{{ 'UPLOAD_PROPOSITION_FILTER.BOX_FORM.FORM_ACTIONS.BUTTON_RESET' | translate }}</button> <button type="submit" id="submit" name="submit" class="btn btn-success">{{ 'UPLOAD_PROPOSITION_FILTER.BOX_FORM.FORM_ACTIONS.BUTTON_SUBMIT' | translate }}</button></div></fieldset></form></div>