This is for the AngularJS interface. This also prevents alerts with no note from being saved.
I think that the Angular interface isn't effected, it already seems to validate the required inputs.
Testing Notes:
0. Create a new workstation if item alert type has a default value.
1. Find an item and open it in the AngularJS Item Status (eg/staff/cat/item/3)
2. Action -> Add -> Add Item Alerts or "Item Alerts (Add)" add bottom of the page.
3. Try and create an alert with no alert type or with no note. Before the fix it would allow you to submit it, but no alert would be added because the DB would reject the request. After the fix the OK button is disabled until the required fields are filled in.
Here is a working branch with this fix: user/stompro/ lp1898069_ angularjs_ copy_alert_ prevent_ invalid_ save
https:/ /git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ stompro/ lp1898069_ angularjs_ copy_alert_ prevent_ invalid_ save
This is for the AngularJS interface. This also prevents alerts with no note from being saved.
I think that the Angular interface isn't effected, it already seems to validate the required inputs.
Testing Notes:
0. Create a new workstation if item alert type has a default value.
1. Find an item and open it in the AngularJS Item Status (eg/staff/ cat/item/ 3)
2. Action -> Add -> Add Item Alerts or "Item Alerts (Add)" add bottom of the page.
3. Try and create an alert with no alert type or with no note. Before the fix it would allow you to submit it, but no alert would be added because the DB would reject the request. After the fix the OK button is disabled until the required fields are filled in.