lp1642035: Editing User Hold Preferences
authorJason Boyer <jboyer@library.in.gov>
Wed, 31 May 2017 19:29:46 +0000 (15:29 -0400)
committerJason Boyer <jboyer@library.in.gov>
Wed, 31 May 2017 20:36:31 +0000 (16:36 -0400)
commit03f72e4afaab07a000e57262808d9931469651fc
tree4dc94e1a8aa4ccf8beb8fa044c8b792bb28b8858
parentfc9b7ea11520aaf9f188e682daa9066d91870a1c
lp1642035: Editing User Hold Preferences

The JS for hold notification values was replacing rather
than concatenating so only the furthest-right true value
would be saved. And because an ng-if directive creates
a child scope[1], the hold_notify_sms primitive could
never be true. Changed hold_notify_* to an object to
avoid this.

An ng-model directive was added to enable
opac.default_sms_notify but opac.default_sms_carrier
will still require some work to enable / replace.

[1]:https://github.com/angular/angular.js/wiki/Understanding-Scopes

Testing:

pre-patch:
Try to do anything with default sms number, fail.
Try to set more than one of phone + email notification, fail.
Try to set sms notification to anything, fail.

post-patch:
Default sms notify value is populated and can be changed.
All 8 possible combinations of hold notify options can be set.

Still can't set opac.default_sms_carrier value, needs additional work.

Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js