webstaff serials: spt OU now defaults to WS OU
authorGalen Charlton <gmc@equinoxinitiative.org>
Fri, 7 Jul 2017 21:02:01 +0000 (17:02 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Fri, 7 Jul 2017 21:02:01 +0000 (17:02 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/web/js/ui/default/staff/admin/serials/pattern_template.js

index c20956f..1585bf4 100644 (file)
@@ -29,7 +29,7 @@ function($scope , $q , $timeout , $location , $window , $uibModal , egCore , egG
         if (arguments.length == 1) {
             templ = '<eg-edit-fm-record idl-class="spt" mode="update" record-id="id" on-save="ok" on-cancel="cancel" custom-field-templates="customFieldTemplates"></eg-edit-fm-record>';
         } else {
-            templ = '<eg-edit-fm-record idl-class="spt" mode="create" on-save="ok" on-cancel="cancel" custom-field-templates="customFieldTemplates"></eg-edit-fm-record>';
+            templ = '<eg-edit-fm-record idl-class="spt" mode="create" on-save="ok" on-cancel="cancel" custom-field-templates="customFieldTemplates" org-default-allowed="owning_lib"></eg-edit-fm-record>';
         }
         gridControls = $scope.gridControls;
         $uibModal.open({
@@ -68,7 +68,10 @@ function($scope , $q , $timeout , $location , $window , $uibModal , egCore , egG
                             handlers : {
                                 openPatternEditorDialog : $scope.openPatternEditorDialog
                             },
-                            template : '<button class="btn btn-default" ng-click="field.handlers.openPatternEditorDialog(rec_flat)">Pattern Wizard</button>' // FIXME i18n
+                            template : '<button class="btn btn-default" ng-click="field.handlers.openPatternEditorDialog(rec_flat)">Pattern Wizard</button>' + // FIXME i18n
+                                       // using a required hidden input as a way to ensure that
+                                       // the pattern wizard has been used
+                                       '<input type="hidden" required ng-model="rec_flat[field.name]">'
                         }
                     }