Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
</ul>
</div>
<div class="col-md-4 pull-right">
- <select class="form-control" ng-model="args.penalty">
- <option ng-selected="args.penalty = ''" value="">[% l('Penalty Type') %]</option>
+ <select class="form-control" ng-model="args.custom_penalty">
+ <option disabled="disabled" ng-selected="args.custom_penalty = ''" value="">[% l('Penalty Type') %]</option>
<option ng-repeat="penalty in penalties"
- ng-selected="args.penalty = penalty.id"
+ ng-selected="args.custom_penalty = penalty.id"
value="{{penalty.id()}}">{{penalty.label()}}</option>
</select>
</div>
pen.usr(user_id);
pen.org_unit(egCore.auth.user().ws_ou());
pen.note(args.note);
- pen.standing_penalty(args.penalty);
+ if (args.custom_penalty) {
+ pen.standing_penalty(args.custom_penalty);
+ } else {
+ pen.standing_penalty(args.penalty);
+ }
pen.staff(egCore.auth.user().id());
pen.set_date('now');
return egCore.pcrud.create(pen);