1 <md-dialog class="list-dialog" aria-label="New List">
2 <form name="listForm" class="md-inline-form" novalidate>
3 <md-toolbar class="md-accent md-hue-2">
5 class="md-toolbar-tools"
7 layout-align="space-between center"
9 <span class="title">{{ vm.title | translate }}</span>
10 <md-button class="md-icon-button" ng-click="vm.closeDialog()">
12 md-font-icon="icon-close"
13 aria-label="Close dialog"
19 <md-dialog-content ms-scroll>
20 <div class="error-list">
22 ng-repeat="error in vm.errors"
25 layout-align="space-between center"
28 <span class="message">{{error.message}}</span>
29 <span class="type">({{error.type}})</span>
31 <md-button class="md-icon-button">
33 md-font-icon="icon-alert-box"
34 aria-label="alert error"
40 <md-input-container class="md-block">
41 <label translate="CONTACTMANAGER.NAME">Name</label>
45 ng-model="vm.list.name"
51 ng-messages="listForm['name'].$error"
52 ng-show="listForm['name'].$touched"
55 <div ng-message="required">
56 <span translate="CONTACTMANAGER.ERRORS.NAME_REQUIRED"
57 >Name field is required</span
62 <md-input-container class="md-block">
63 <label translate="CONTACTMANAGER.DESCRIPTION">Description</label>
64 <input type="text" name="description" ng-model="vm.list.description" />
67 ng-messages="listForm['description'].$error"
68 ng-show="listForm['description'].$touched"
71 <div ng-message="required">
72 <span translate="CONTACTMANAGER.ERRORS.DESCRIPTION_REQUIRED"
73 >Description field is required</span
79 <div class="error-list">
81 ng-repeat="error in vm.errors"
84 layout-align="space-between center"
87 <span class="message">{{error.message}}</span>
88 <span class="type">({{error.type}})</span>
90 <md-button class="md-icon-button">
92 md-font-icon="icon-alert-box"
93 aria-label="alert error"
103 layout-align="space-between center"
104 ng-if="!vm.crudPermissions.readOnly"
106 <div layout="row" layout-align="start center">
109 ng-if="vm.crudPermissions.canEdit && !vm.newList"
110 ng-click="vm.saveList()"
111 class="send-button md-accent md-raised"
112 ng-disabled="listForm.$invalid || listForm.$pristine"
114 translate="CONTACTMANAGER.SAVE"
115 translate-attr-aria-label="CONTACTMANAGER.SAVE"
122 ng-if="vm.crudPermissions.canEdit && vm.newList"
123 ng-click="vm.addNewList()"
124 class="send-button md-accent md-raised"
125 ng-disabled="listForm.$invalid"
127 translate="CONTACTMANAGER.ADD_LIST"
128 translate-attr-aria-label="CONTACTMANAGER.ADD_LIST"
135 class="md-icon-button"
136 ng-if="vm.crudPermissions.canDelete && !vm.newList"
137 ng-click="vm.deleteList($event)"
140 translate-attr-aria-label="CONTACTMANAGER.DELETE"
142 <md-icon md-font-icon="icon-delete"></md-icon>
144 ><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip