2 ============LICENSE_START==========================================
4 ===================================================================
5 Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 ===================================================================
8 Unless otherwise specified, all software contained herein is licensed
9 under the Apache License, Version 2.0 (the “License”);
10 you may not use this software except in compliance with the License.
11 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
21 Unless otherwise specified, all documentation contained herein is licensed
22 under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
23 you may not use this documentation except in compliance with the License.
24 You may obtain a copy of the License at
26 https://creativecommons.org/licenses/by/4.0/
28 Unless required by applicable law or agreed to in writing, documentation
29 distributed under the License is distributed on an "AS IS" BASIS,
30 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31 See the License for the specific language governing permissions and
32 limitations under the License.
34 ============LICENSE_END============================================
36 ECOMP is a trademark and service mark of AT&T Intellectual Property.
38 <div class="widget-details-modal">
39 <div id="'widgets-details-title" class="title">Widget Details</div>
41 <div class="widget-properties-main" scroll-top="widgetDetails.scrollApi">
42 <form id="widgets-details-form" name="widgetForm" novalidate autocomplete="off">
43 <!-- We can remove this script once we get to Firefox version 47
44 autocomplete="off" won't work until v47 -->
45 <script type="text/javascript">
46 document.getElementById("appForm").reset();
48 <div class="item required">
49 <div class="item-label">Application Name</div>
50 <div class="custom-select-wrap">
51 <select id="widgets-details-select-app"
53 ng-model="widgetDetails.selectedApp"
54 ng-change="widgetDetails.updateSelectedApp();"
55 ng-options="app.name for app in widgetDetails.availableApps track by app.id"
56 ng-disabled="!widgetDetails.availableApps || !widgetDetails.availableApps.length"
59 <option id="widgets-details-select-app-disabled" value="" disabled class="widgets-details-select-app-disabled">Select application</option>
62 <div class="error-container" ng-show="widgetForm.app.$dirty">
63 <div ng-messages="widgetForm.app.$error" class="error-container">
64 <small id="widgets-details-select-app-error-required" class="err-message" ng-message="required">Application is required</small>
68 <div class="item required">
69 <div class="item-label">Widget Name</div>
70 <input id="widgets-details-input-name"
73 ng-model="widgetDetails.widget.name"
76 ng-pattern="/^[a-zA-Z0-9_\s\&]*$/"
79 <div class="error-container" ng-show="widgetDetails.conflictMessages.name">
80 <small id="widgets-details-input-name-conflict" class="err-message" ng-bind="widgetDetails.conflictMessages.name"></small>
82 <div class="error-container" ng-show="widgetForm.name.$dirty || widgetDetails.isEditMode">
83 <div ng-messages="widgetForm.name.$error" class="error-container">
84 <small id="widgets-details-input-name-required" class="err-message" ng-message="required">Widget Name is required</small>
85 <small id="widgets-details-input-name-pattern" class="err-message" ng-message="pattern">Widget Name must be letters, numbers, or underscore</small>
89 <div class="item required">
90 <div class="left-item">
91 <div class="item-label">Width</div>
92 <input id="widgets-details-input-width"
95 ng-model="widgetDetails.widget.width"
101 <div class="error-container" ng-show="widgetForm.width.$dirty || widgetDetails.isEditMode">
102 <div ng-messages="widgetForm.width.$error" class="error-container">
103 <small id="widgets-details-input-width-required" class="err-message" ng-message="required">Widget width is required</small>
104 <small id="widgets-details-input-min-width" class="err-message" ng-message="min">Minimum width is 300</small>
108 <div class="right-item required">
109 <div class="item-label">Height</div>
110 <input id="widgets-details-input-height"
113 ng-model="widgetDetails.widget.height"
119 <div class="error-container" ng-show="widgetForm.height.$dirty || widgetDetails.isEditMode">
120 <div ng-messages="widgetForm.height.$error" class="error-container">
121 <small id="widgets-details-input-height-required" class="err-message" ng-message="required">Widget height is required</small>
122 <small id="widgets-details-input-height-minimum" class="err-message" ng-message="min">Minimum height is 200</small>
127 <div class="item required">
128 <div class="item-label">URL</div>
129 <input id="widgets-details-input-URL"
132 ng-model="widgetDetails.widget.url"
135 ng-pattern="widgetDetails.ECOMP_URL_REGEX"
139 <div class="url-validation-button"
140 ng-class="{'disabled': widgetForm.url.$invalid}"
141 ng-click="(widgetForm.url.$invalid) || widgetDetails.validateUrl()">Validate URL
145 <div class="error-container" ng-show="widgetDetails.conflictMessages.url">
146 <small id="widgets-details-input-URL-conflict" class="err-message" ng-bind="widgetDetails.conflictMessages.url"></small>
148 <div class="error-container" ng-show="widgetForm.url.$dirty || widgetDetails.isEditMode">
149 <div ng-messages="widgetForm.url.$error" class="error-container">
150 <small id="widgets-details-input-URL-required" class="err-message" ng-message="required">Widget URL is required</small>
151 <small id="widgets-details-input-URL-pattern" class="err-message" ng-message="pattern">Incorrect URL pattern</small>
154 <div class="error-container" ng-show="widgetForm.url.$valid && !widgetDetails.conflictMessages.url">
155 <small class="err-message" ng-hide="widgetDetails.urlValidity.isValid" ng-bind="widgetDetails.urlValidity.message"></small>
156 <small class="valid-message" ng-show="widgetDetails.urlValidity.isValid" ng-bind="widgetDetails.urlValidity.message"></small>
164 <div class="dialog-control">
165 <span class="ecomp-save-spinner" ng-show="widgetDetails.isSaving"></span>
166 <div id="widgets-details-next-button" class="next-button"
167 ng-class="{disabled: widgetForm.$invalid}" ng-click="widgetDetails.saveChanges()">Save</div>
168 <div id="widgets-details-cancel-button" class="cancel-button" ng-click="closeThisDialog()">Cancel</div>