re base code
[sdc.git] / catalog-ui / src / app / view-models / admin-dashboard / add-category-modal / add-category-modal-view.html
1 <ng1-modal modal="modalInstance"
2            type="classic"
3            class="i-sdc-admin-add-category-modal modal-type-confirmation"
4            header-translate="CREATE_CATEGORY_MODAL_HEADER"
5            buttons="footerButtons"
6            header-translate-values="{'modelType': '{{modelType}}' }"
7            show-close-button="true"
8            hide-background="false"
9 >
10
11     <form novalidate class="w-sdc-form" name="forms.editForm">
12
13             <div class="w-sdc-form-column">
14                 <div class="i-sdc-form-item"
15                      data-ng-class="{error:(editForm.categoryName.$dirty && editForm.categoryName.$invalid)}">
16                     <label class="i-sdc-form-label required" translate="CREATE_CATEGORY_MODAL_CATEGORY_NAME"
17                            translate-values="{'modelType': '{{modelType}}' }"></label>
18                     <input class="i-sdc-form-input"
19                            data-ng-model="category.name"
20                            data-ng-model-options="{ debounce: 200 }"
21                            type="text"
22                            name="categoryName"
23                            required="required"
24                            data-ng-minlength="4"
25                            data-ng-pattern="namePattern"
26                            maxlength="25"
27                            autofocus />
28
29                     <div class="input-error" data-ng-show="forms.editForm.categoryName.$dirty && forms.editForm.categoryName.$invalid">
30                         <span ng-show="forms.editForm.categoryName.$error.required" translate="CREATE_CATEGORY_MODAL_REQUIRED" translate-values="{'modelType': '{{modelType}}' }"></span>
31                         <span ng-show="forms.editForm.categoryName.$error.minlength" translate="CREATE_CATEGORY_MODAL_MINLENGTH" translate-values="{'minlength': '4', 'modelType': '{{modelType}}' }"></span>
32                         <span ng-show="forms.editForm.categoryName.$error.pattern" translate="CREATE_CATEGORY_MODAL_PATTERN" translate-values="{'modelType': '{{modelType}}' }"></span>
33                     </div>
34
35                 </div>
36
37             </div>
38
39         </form>
40
41 </ng1-modal>