<h4 class="modal-title">
[% l('Barcode "{{precatArgs.copy_barcode}}" was mis-scanned or is a non-cataloged item.') %]
</h4>
+ <div ng-show="!can_create_precats" class="alert alert-warning">
+ [% l('You do not have permission to create a pre-cataloged item with this barcode.') %]
+ </div>
</div>
<div class="modal-body">
<div class="form-group">
<label for="precat-title">[% l('Title') %]</label>
<input type="text" class="form-control" focus-me='focusMe' required
+ ng-disabled="!can_create_precats"
id="precat-title" ng-model="precatArgs.dummy_title" placeholder="[% l('Title...') %]"/>
</div>
<div class="form-group">
<label for="precat-author">[% l('Author') %]</label>
<input type="text" class="form-control" id="precat-author"
+ ng-disabled="!can_create_precats"
ng-model="precatArgs.dummy_author" placeholder="[% l('Author...') %]"/>
</div>
<div class="form-group">
<label for="precat-isbn">[% l('ISBN') %]</label>
<input type="text" class="form-control" id="precat-isbn"
+ ng-disabled="!can_create_precats"
ng-keydown="preventSubmit($event)"
ng-model="precatArgs.dummy_isbn" placeholder="[% l('ISBN...') %]"/>
</div>
<div class="form-group">
<label for="precat-circmod">[% l('Circulation Modifier') %]</label>
<select class="form-control" id="precat-circmod"
+ ng-disabled="!can_create_precats"
ng-model="precatArgs.circ_modifier">
<option value=""></option>
<option ng-repeat="mod in circModifiers | orderBy:'name()'"
</div>
</div>
<div class="modal-footer">
- <div ng-show="!can_create_precats" class="alert alert-warning">
- [% l('You do not have permission to complete this action.') %]
- </div>
- <input type="submit" class="btn btn-primary" value="[% l('Precat Checkout') %]"/>
+ <input type="submit" class="btn btn-primary" value="[% l('Precat Checkout') %]"
+ ng-disabled="!can_create_precats"
+ />
<button class="btn btn-warning" ng-click="cancel()"
ng-class="{disabled : actionPending}">[% l('Cancel') %]</button>
</div>
--- /dev/null
+New Permission: CREATE_PRECAT
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This permission is required to create (or re-create) a pre-cataloged item
+through the "Barcode ??? was mis-scanned or is a non-cataloged item."
+dialog. All form elements in the pre-cat dialog other than the Cancel
+button will be disabled if the current user lacks the CREATE_PRECAT
+permission when an uncataloged (or already pre-cataloged item) is scanned.
+This permission is not needed to renew pre-cataloged items.
+
+The upgrade script for this feature will insert the permission into every
+permission group that has the STAFF_LOGIN permission, so out-of-the-box no
+behavior will change.