--- /dev/null
+BEGIN;
+
+insert into config.org_unit_setting_type(name, grp, label, description, datatype, fm_class) values
+('circ.hide_patron_strict_barcode', 'gui',
+ oils_i18n_gettext('circ.hide_patron_strict_barcode',
+ 'Hide Strict Barcode checkbox on patron checkout/checkin/renew screens',
+ 'coust','label'),
+ oils_i18n_gettext('circ.hide_patron_strict_barcode',
+ 'The Strict Barcode checkbox will be hidden on the checkout, checkin and renew screens. This setting hides the strict barcode checkbox eliminating accidental clicks.',
+ 'coust','description'),
+ 'bool',null);
+
+COMMIT;
\ No newline at end of file
<input type="submit" class="btn btn-default" value="[% l('Submit') %]"/>
</div>
</form>
- <div class="checkbox">
+ <div ng-if="!hide_strict_barcode_checkbox" class="checkbox">
<label>
<input ng-model="strict_barcode" type="checkbox"
ng-change="onStrictBarcodeChange()"/>
</div>
</form>
- <div class="checkbox">
+ <div ng-if="!hide_strict_barcode_checkbox" class="checkbox">
<label>
<input ng-model="strict_barcode" type="checkbox"
ng-change="onStrictBarcodeChange()"/>
ng-disabled="outOfRange" value="[% l('Submit') %]"/>
</div>
</form>
- <div class="checkbox">
+ <div ng-if="!hide_strict_barcode_checkbox" class="checkbox">
<label>
<input ng-model="strict_barcode" type="checkbox"
ng-change="onStrictBarcodeChange()"/>
<button class="btn btn-warning" ng-click="clear('checkout')">[% l('Clear') %]</button>
</div>
<div class="col-md-4">
- <input id="do_check_co" type="checkbox" ng-model="strict_barcode" ng-click="changeCheck()"></input>
- <label for="do_check_co">[% l('Strict Barcode') %]</label>
+ <input ng-if="!hide_strict_barcode_checkbox" id="do_check_co" type="checkbox" ng-model="strict_barcode" ng-click="changeCheck()"></input>
+ <label ng-if="!hide_strict_barcode_checkbox" for="do_check_co">[% l('Strict Barcode') %]</label>
</div>
<div class="col-md-6">
<input id="do_print_co" type="checkbox" ng-model="do_print" ng-click="changePrint()"></input>
<button class="btn btn-warning" ng-click="clear('renew')">[% l('Clear') %]</button>
</div>
<div class="col-md-4">
- <input id="do_check_r" type="checkbox" ng-model="strict_barcode" ng-click="changeCheck()"></input>
- <label for="do_check_r">[% l('Strict Barcode') %]</label>
+ <input ng-if="!hide_strict_barcode_checkbox" id="do_check_r" type="checkbox" ng-model="strict_barcode" ng-click="changeCheck()"></input>
+ <label ng-if="!hide_strict_barcode_checkbox" for="do_check_r">[% l('Strict Barcode') %]</label>
</div>
<div class="col-md-6">
<input id="do_print_r" type="checkbox" ng-model="do_print" ng-click="changePrint()"></input>
<button class="btn btn-warning" ng-click="clear('in_house_use')">[% l('Clear') %]</button>
</div>
<div class="col-md-4">
- <input id="do_check_ihu" type="checkbox" ng-model="strict_barcode" ng-click="changeCheck()"></input>
- <label for="do_check_ihu">[% l('Strict Barcode') %]</label>
+ <input ng-if="!hide_strict_barcode_checkbox" id="do_check_ihu" type="checkbox" ng-model="strict_barcode" ng-click="changeCheck()"></input>
+ <label ng-if="!hide_strict_barcode_checkbox" for="do_check_ihu">[% l('Strict Barcode') %]</label>
</div>
<div class="col-md-6">
<input id="do_print_ihu" type="checkbox" ng-model="do_print" ng-click="changePrint()"></input>
<button class="btn btn-warning" ng-click="clear('checkin')">[% l('Clear') %]</button>
</div>
<div class="col-md-4">
- <input id="do_check_ci" type="checkbox" ng-model="strict_barcode" ng-click="changeCheck()"></input>
- <label for="do_check_ci">[% l('Strict Barcode') %]</label>
+ <input ng-if="!hide_strict_barcode_checkbox" id="do_check_ci" type="checkbox" ng-model="strict_barcode" ng-click="changeCheck()"></input>
+ <label ng-if="!hide_strict_barcode_checkbox" for="do_check_ci">[% l('Strict Barcode') %]</label>
</div>
<div class="col-md-6">
<input id="do_print_ci" type="checkbox" ng-model="do_print" ng-click="changePrint()"></input>
// TODO: add this to the setting batch lookup below
egCore.hatch.getItem('circ.checkin.strict_barcode')
.then(function(sb){ $scope.strict_barcode = sb });
-
+ egCore.org.settings('ui.circ.hide_patron_strict_barcode')
+ .then(function(setting) {
+ $scope.hide_strict_barcode_checkbox = setting['ui.circ.hide_patron_strict_barcode'];
+ if($scope.hide_strict_barcode_checkbox) $scope.strict_barcode = false;
+ egCore.hatch.setItem('ui.circ.hide_patron_strict_barcode', $scope.hide_strict_barcode_checkbox);
+ });
egCore.org.settings([
'ui.circ.suppress_checkin_popups' // add other settings as needed
]).then(function(set) {
egCore.hatch.getItem('circ.checkout.strict_barcode')
.then(function(sb){ $scope.strict_barcode = sb });
+ egCore.org.settings('ui.circ.hide_patron_strict_barcode')
+ .then(function(setting) {
+ $scope.hide_strict_barcode_checkbox = setting['ui.circ.hide_patron_strict_barcode'];
+ if($scope.hide_strict_barcode_checkbox) $scope.strict_barcode = false;
+ egCore.hatch.setItem('ui.circ.hide_patron_strict_barcode', $scope.hide_strict_barcode_checkbox);
+ });
// avoid multiple, in-flight attempts on the same barcode
var pending_barcodes = {};
$scope.gridDataProvider.prepend();
var options = {check_barcode : $scope.strict_barcode};
-
egCirc.checkout(params, options).then(
function(co_resp) {
// update stats locally so we don't have to fetch them w/
egCore.hatch.getItem('circ.renew.strict_barcode')
.then(function(sb){ $scope.strict_barcode = sb });
+ egCore.org.settings('ui.circ.hide_patron_strict_barcode')
+ .then(function(setting) {
+ $scope.hide_strict_barcode_checkbox = setting['ui.circ.hide_patron_strict_barcode'];
+ if($scope.hide_strict_barcode_checkbox) $scope.strict_barcode = false;
+ egCore.hatch.setItem('ui.circ.hide_patron_strict_barcode', $scope.hide_strict_barcode_checkbox);
+ });
$scope.focusBarcode = true;
$scope.outOfRange = false;
$scope.minDate = new Date(now);
if (setting !== undefined) $scope.do_check_changed = true;
});
+ $scope.hide_strict_barcode_checkbox = Boolean(JSON.parse(window.localStorage.getItem('ui.circ.hide_patron_strict_barcode')));
egCore.hatch.getWorkstations()
.then(function(all) {
if (all && all.length) {