1 <md-dialog class="customDashboard-dialog" aria-label="New CustomDashboard">
2 <form name="customDashboardForm" 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="TOOLS.NAME">Name</label>
45 ng-model="vm.customDashboard.name"
51 ng-messages="customDashboardForm['name'].$error"
52 ng-show="customDashboardForm['name'].$touched"
55 <div ng-message="required">
56 <span translate="TOOLS.ERRORS.NAME_REQUIRED"
57 >Name field is required</span
62 <md-input-container class="md-block">
63 <label translate="TOOLS.DESCRIPTION">Description</label>
67 ng-model="vm.customDashboard.description"
71 ng-messages="customDashboardForm['description'].$error"
72 ng-show="customDashboardForm['description'].$touched"
75 <div ng-message="required">
76 <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED"
77 >Description field is required</span
83 <div class="error-list">
85 ng-repeat="error in vm.errors"
88 layout-align="space-between center"
91 <span class="message">{{error.message}}</span>
92 <span class="type">({{error.type}})</span>
94 <md-button class="md-icon-button">
96 md-font-icon="icon-alert-box"
97 aria-label="alert error"
107 layout-align="space-between center"
108 ng-if="!vm.crudPermissions.readOnly"
110 <div layout="row" layout-align="start center">
113 ng-if="vm.crudPermissions.canEdit && !vm.newCustomDashboard"
114 ng-click="vm.saveCustomDashboard()"
115 class="send-button md-accent md-raised"
116 ng-disabled="customDashboardForm.$invalid || customDashboardForm.$pristine"
118 translate="TOOLS.SAVE"
119 translate-attr-aria-label="TOOLS.SAVE"
126 ng-if="vm.crudPermissions.canEdit && vm.newCustomDashboard"
127 ng-click="vm.addNewCustomDashboard()"
128 class="send-button md-accent md-raised"
129 ng-disabled="customDashboardForm.$invalid"
131 translate="TOOLS.ADD_CUSTOMDASHBOARD"
132 translate-attr-aria-label="TOOLS.ADD_CUSTOMDASHBOARD"
139 class="md-icon-button"
140 ng-if="vm.crudPermissions.canDelete && !vm.newCustomDashboard"
141 ng-click="vm.deleteCustomDashboard($event)"
144 translate-attr-aria-label="TOOLS.DELETE"
146 <md-icon md-font-icon="icon-delete"></md-icon>
147 <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>