1 <md-dialog class="plugin-dialog" aria-label="New Plugin">
2 <form name="pluginForm" 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="MARKETPLACE.NAME">Name</label>
45 ng-model="vm.plugin.name"
51 ng-messages="pluginForm['name'].$error"
52 ng-show="pluginForm['name'].$touched"
55 <div ng-message="required">
56 <span translate="MARKETPLACE.ERRORS.NAME_REQUIRED"
57 >Name field is required</span
62 <md-input-container class="md-block">
63 <label translate="MARKETPLACE.TYPE">Type</label>
67 ng-model="vm.plugin.type"
68 ng-disabled="!vm.newPlugin"
72 ng-messages="pluginForm['type'].$error"
73 ng-show="pluginForm['type'].$touched"
76 <div ng-message="required">
77 <span translate="MARKETPLACE.ERRORS.TYPE_REQUIRED"
78 >Type field is required</span
83 <md-input-container class="md-block">
85 ng-model="vm.plugin.active"
87 ng-disabled="!vm.newPlugin"
88 ><span translate="MARKETPLACE.ACTIVE">Active</span></md-switch
91 <md-input-container class="md-block">
92 <label translate="MARKETPLACE.DESCRIPTION">Description</label>
96 ng-model="vm.plugin.description"
100 ng-messages="pluginForm['description'].$error"
101 ng-show="pluginForm['description'].$touched"
104 <div ng-message="required">
105 <span translate="MARKETPLACE.ERRORS.DESCRIPTION_REQUIRED"
106 >Description field is required</span
110 </md-input-container>
111 <md-input-container class="md-block">
112 <label translate="MARKETPLACE.ICON">Icon</label>
116 ng-model="vm.plugin.icon"
121 ng-messages="pluginForm['icon'].$error"
122 ng-show="pluginForm['icon'].$touched"
125 <div ng-message="required">
126 <span translate="MARKETPLACE.ERRORS.ICON_REQUIRED"
127 >Icon field is required</span
131 </md-input-container>
132 <md-input-container class="md-block">
133 <label translate="MARKETPLACE.SIDEBAR">Sidebar</label>
134 <md-select name="sidebar" ng-model="vm.plugin.sidebar" required>
135 <md-option ng-value="'always'">Always</md-option>
136 <md-option ng-value="'adminOnly'">Admin Only</md-option>
137 <md-option ng-value="'agentOnly'">Agent Only</md-option>
138 <md-option ng-value="'never'">Never</md-option>
141 ng-messages="pluginForm['sidebar'].$error"
142 ng-show="pluginForm['sidebar'].$touched"
145 <div ng-message="required">
146 <span translate="MARKETPLACE.ERRORS.SIDEBAR_REQUIRED"
147 >Sidebar field is required</span
151 </md-input-container>
153 ng-if="vm.plugin.sidebar === 'always' || vm.plugin.sidebar === 'adminOnly'"
156 <label translate="MARKETPLACE.ADMINURL">AdminUrl</label>
157 <input type="text" name="adminUrl" ng-model="vm.plugin.adminUrl" />
160 ng-messages="pluginForm['adminUrl'].$error"
161 ng-show="pluginForm['adminUrl'].$touched"
164 <div ng-message="required">
165 <span translate="MARKETPLACE.ERRORS.ADMINURL_REQUIRED"
166 >AdminUrl field is required</span
170 </md-input-container>
172 ng-if="vm.plugin.sidebar === 'always' || vm.plugin.sidebar === 'agentOnly'"
175 <label translate="MARKETPLACE.AGENTURL">AgentUrl</label>
176 <input type="text" name="agentUrl" ng-model="vm.plugin.agentUrl" />
179 ng-messages="pluginForm['agentUrl'].$error"
180 ng-show="pluginForm['agentUrl'].$touched"
183 <div ng-message="required">
184 <span translate="MARKETPLACE.ERRORS.AGENTURL_REQUIRED"
185 >AgentUrl field is required</span
189 </md-input-container>
190 <md-input-container ng-if="vm.plugin.type === 'script'" class="md-block">
191 <label translate="MARKETPLACE.SCRIPTNAME">ScriptName</label>
195 ng-model="vm.plugin.scriptName"
196 ng-disabled="!vm.newPlugin"
200 ng-messages="pluginForm['scriptName'].$error"
201 ng-show="pluginForm['scriptName'].$touched"
204 <div ng-message="required">
205 <span translate="MARKETPLACE.ERRORS.SCRIPTNAME_REQUIRED"
206 >ScriptName field is required</span
210 </md-input-container>
211 <md-input-container ng-if="vm.plugin.type === 'script'" class="md-block">
212 <label translate="MARKETPLACE.SCRIPTPATH">ScriptPath</label>
216 ng-model="vm.plugin.scriptPath"
221 ng-messages="pluginForm['scriptPath'].$error"
222 ng-show="pluginForm['scriptPath'].$touched"
225 <div ng-message="required">
226 <span translate="MARKETPLACE.ERRORS.SCRIPTPATH_REQUIRED"
227 >ScriptPath field is required</span
231 </md-input-container>
232 <md-input-container class="md-block">
233 <label translate="MARKETPLACE.VERSION">Version</label>
237 ng-model="vm.plugin.version"
238 ng-disabled="!vm.newPlugin"
242 ng-messages="pluginForm['version'].$error"
243 ng-show="pluginForm['version'].$touched"
246 <div ng-message="required">
247 <span translate="MARKETPLACE.ERRORS.VERSION_REQUIRED"
248 >Version field is required</span
252 </md-input-container>
254 <div class="error-list">
256 ng-repeat="error in vm.errors"
259 layout-align="space-between center"
262 <span class="message">{{error.message}}</span>
263 <span class="type">({{error.type}})</span>
265 <md-button class="md-icon-button">
267 md-font-icon="icon-alert-box"
268 aria-label="alert error"
278 layout-align="space-between center"
279 ng-if="!vm.crudPermissions.readOnly"
281 <div layout="row" layout-align="start center">
284 ng-if="vm.crudPermissions.canEdit && !vm.newPlugin"
285 ng-click="vm.savePlugin()"
286 class="send-button md-accent md-raised"
287 ng-disabled="pluginForm.$invalid || pluginForm.$pristine"
289 translate="MARKETPLACE.SAVE"
290 translate-attr-aria-label="MARKETPLACE.SAVE"
297 ng-if="vm.crudPermissions.canEdit && vm.newPlugin"
298 ng-click="vm.addNewPlugin()"
299 class="send-button md-accent md-raised"
300 ng-disabled="pluginForm.$invalid"
302 translate="MARKETPLACE.ADD_PLUGIN"
303 translate-attr-aria-label="MARKETPLACE.ADD_PLUGIN"
310 class="md-icon-button"
311 ng-if="vm.crudPermissions.canDelete && !vm.newPlugin"
312 ng-click="vm.deletePlugin($event)"
315 translate-attr-aria-label="MARKETPLACE.DELETE"
317 <md-icon md-font-icon="icon-delete"></md-icon>
319 ><span translate="MARKETPLACE.DELETE">DELETE</span></md-tooltip