</eg-combobox>
</div>
</li>
+ <li class="list-group-item">
+ <button class="btn btn-success" (click)="placeHolds()"
+ [disabled]="!user || placeHoldsClicked" i18n>Place Hold(s)</button>
+
+ <button class="btn btn-outline-dark ml-2" (click)="reset()" i18n>Reset</button>
+ </li>
</ul><!-- col -->
</div><!-- row -->
</div><!--card -->
</div><!-- col -->
- <div class="row mt-2">
- <div class="col-lg-3">
- <button class="btn btn-success" (click)="placeHolds()"
- [disabled]="!user || placeHoldsClicked" i18n>Place Hold(s)</button>
- </div>
- </div>
</form>
<div class="row"><div class="col-lg-12"><hr/></div></div>
this.smsCarriers = [];
}
- ngOnInit() {
-
- // Respond to changes in hold type. This currently assumes hold
- // types only toggle post-init between copy-level types (C,R,F)
- // and no other params (e.g. target) change with it. If other
- // types require tracking, additional data collection may be needed.
- this.route.paramMap.subscribe(
- (params: ParamMap) => this.holdType = params.get('type'));
+ reset() {
+ this.user = null;
+ this.userBarcode = null;
this.holdType = this.route.snapshot.params['type'];
this.holdTargets = this.route.snapshot.queryParams['target'];
this.holdFor = this.route.snapshot.queryParams['holdFor'] || 'patron';
return ctx;
});
+ this.resetForm();
+
if (this.holdFor === 'staff' || this.userBarcode) {
this.holdForChanged();
}
this.getTargetMeta();
+ this.placeHoldsClicked = false;
+ }
+
+ ngOnInit() {
+
+ // Respond to changes in hold type. This currently assumes hold
+ // types only toggle post-init between copy-level types (C,R,F)
+ // and no other params (e.g. target) change with it. If other
+ // types require tracking, additional data collection may be needed.
+ this.route.paramMap.subscribe(
+ (params: ParamMap) => this.holdType = params.get('type'));
+
+ this.reset();
this.org.settings(['sms.enable', 'circ.holds.max_duplicate_holds'])
.then(sets => {