LP#1719967 - Add alert message field to volcopy editor
authorCesar Velez <cesar.velez@equinoxinitiative.org>
Thu, 12 Oct 2017 21:31:37 +0000 (17:31 -0400)
committerKathy Lussier <klussier@masslnc.org>
Wed, 18 Oct 2017 16:04:56 +0000 (12:04 -0400)
As 1676608 was deferred to 3.1, this adds a copy alert_message
field, to the volcopy editor. The defaults tab "Alerts" checkbox has
been replaced by "Alert Message" and this new field will be active until replaced by
the changes of 3.1.

Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2
Open-ILS/src/templates/staff/cat/volcopy/t_defaults.tt2
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index d67c833..4916745 100644 (file)
@@ -98,7 +98,7 @@
             <b>[% l('Status') %]</b>
         </div>
         <div class="col-md-4">
-            <b>[% l('Statistical Categories') %]</b>
+            <b>[% l('Copy Alert') %]</b>
         </div>
     </div>
 
                 <div class="col-md-6">
                     <b>[% l('Reference?') %]</b>
                 </div>
+                
             </div>
 
             <div class="row">
         </div>
 
         <div class="col-md-4">
+            
+            <div class="row" >
+                <div class="col-xs-12">
+                    <div class="row">
+                        <div class="nullable col-xs-12">
+                            <input class="form-control" type="text" ng-model="working.alert_message"
+                                ng-disabled="!defaults.attributes.alert_message" placeholder="Alert message" />
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+            <div class="row pad-vert"></div>
             <div class="row">
                 <div class="col-xs-12">
-                    <select class="form-control" ng-disabled="!defaults.statcats"
-                        ng-model="working.statcat_filter"
-                        ng-options="o.id() as o.shortname() for o in statcat_filter_list">
-                      <option value="">[% l('Filter by Library') %]</option>
-                    </select>
+                    <div class="row bg-info">
+                        <div class="col-xs-12">
+                            <b>Statistical Categories</b>
+                        </div>
+                    </div>
+                    <div class="row">
+                           <select class="form-control" ng-disabled="!defaults.statcats"
+                               ng-model="working.statcat_filter"
+                               ng-options="o.id() as o.shortname() for o in statcat_filter_list">
+                             <option value="">[% l('Filter by Library') %]</option>
+                           </select>
+                    </div>
                 </div>
             </div>
 
                     </div>
                 </div>
             </div>
+
         </div>
 
     </div>
index 44b328b..d959594 100644 (file)
                 </div>
                 <div class="col-xs-6">
                     <label>
-                        <input type="checkbox" ng-change="saveDefaults()" ng-model="defaults.attributes.alerts"/>
-                        [% l('Alerts') %]
+                        <input type="checkbox" ng-change="saveDefaults()" ng-model="defaults.attributes.alert_message"/>
+                        <!-- <input type="checkbox" ng-change="saveDefaults()" ng-model="defaults.attributes.alerts"/> -->
+                        [% l('Alert Message') %]
                     </label>
                 </div>
             </div>
index e7d9f00..5626129 100644 (file)
@@ -833,7 +833,8 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
             location : true,
             holdable : true,
             age_protect : true,
-            floating : true
+            floating : true,
+            alert_message : true
         }
     };
 
@@ -1576,6 +1577,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
         createSimpleUpdateWatcher('mint_condition');
         createSimpleUpdateWatcher('opac_visible');
         createSimpleUpdateWatcher('ref');
+        createSimpleUpdateWatcher('alert_message');
 
         $scope.saveCompletedCopies = function (and_exit) {
             var cnHash = {};
@@ -2011,6 +2013,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
                 createSimpleUpdateWatcher('mint_condition');
                 createSimpleUpdateWatcher('opac_visible');
                 createSimpleUpdateWatcher('ref');
+                createSimpleUpdateWatcher('alert_message');
 
                 $scope.suffix_list = [];
                 itemSvc.get_suffixes(egCore.auth.user().ws_ou()).then(function(list){