2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 <script type="text/ng-template" id="add_RainyDayDict_popup.html">
21 <div class="modal" tabindex="-1">
22 <div class="modal-dialog modal-lg">
23 <div class="modal-content">
24 <div class="modal-header ng-scope in">
25 <h2 class="font-showcase-font-name" style="color: #157bb2">{{label}}</h2>
27 <form name="formdata" ng-submit="saveDecisionTreatments(editRainyDayTreatment);" novalidate>
28 <div class="modal-body ng-scope ng-isolate-scope in">
29 <div class="form-group row">
30 <div class="form-group col-sm-6" ng-class="{ 'has-error' : formdata.bbid.$invalid && !formdata.bbid.$pristine }">
31 <label>Building Block ID:<sup><b>*</b></sup></label><br>
32 <input class="form-control" type="text" ng-model="editRainyDayTreatment.bbid" name="bbid" required />
33 <p ng-show="formdata.bbid.$invalid && !formdata.bbid.$pristine" class="help-block">Building Block ID is required.</p>
36 <div class="form-group row">
37 <div class="form-group col-sm-6" ng-class="{ 'has-error' : formdata.workstep.$invalid && !formdata.workstep.$pristine }">
38 <label>Work Step:<sup><b>*</b></sup></label><br>
39 <input type="text" ng-model="editRainyDayTreatment.workstep" class="form-control" />
40 <p ng-show="formdata.workstep.$invalid && !formdata.workstep.$pristine" class="help-block">Work Step is required.</p>
43 <div class="form-group row">
44 <div class="form-group col-sm-4">
45 <label>Allowed Treatments<sup><b>*</b></sup></label><br>
46 <button type="button" class="btn btn-secondary btn-small" ng-click="addNewTreatment()"><i class="fa fa-plus"></i></button>
49 <div class="form-group">
50 <div data-ng-repeat="choice in treatments">
51 <div class="form-group row">
52 <div class="form-group col-sm-5" ng-class="{ 'has-error' : formdata.treatment.$invalid && !formdata.treatment.$pristine }">
53 <input type="text" class="form-control" ng-model="choice.treatment" maxlength="30" name="treatment" required />
54 <p ng-show="formdata.treatment.$invalid && !formdata.treatment.$pristine" class="help-block">Treatment Value is required.</p>
56 <div class="form-group col-sm-1">
57 <button type="button" class="btn btn-secondary btn-small" ng-show="$last" ng-click="removeTreatment()"><i class="fa fa-minus"></i></button>
63 <div class="modal-footer">
64 <button class="btn btn-success" type="submit" ng-disabled="formdata.$invalid">Save</button>
65 <button type="button" class="btn btn-default" ng-click="$dismiss('cancel')">Close</button>