http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14590 Bug ID: 14590 Summary: Checkboxes should be disabled without valid contact information in messaging preferences Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: larit@student.uef.fi QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Currently, in Patron message preferences, it is possible to set message transport type without valid contact information (e.g. send sms even if patron does not have a phone number set). This is very problematic for us since we have several Borrowers with misconfigured messaging preferences, and that causes issues, like Borrowers not knowing they have Items waiting for pickup. This makes customers angry and our librarians sad, not to mention the technical staff. Reasons for this are myriad but one big challenge is misconfigured messaging preferences, both in OPAC and the staff client. I have listed messaging preferences that would need to require valid contact information: #1 SMS (this requires valid SMSnumber) #2 Phone (this requires valid phone) #3 Email (this requires valid email) Validations will be done both client-side and server-side. I am working on the following plan: Server-side validation - In C4::Form::MessagingPreferences::handle_form_action(), check for each parameter (SMSnumber, phone, email) to see if they are provided. - If the parameter is provided, allow message_transport_types to contain said transport method for this message. - If the parameter is not provided, remove the said transport method for this message from message_transport_types. Client-side validation - Has to be done in both OPAC and staff client. - With JavaScript, check the contents of each contact field (SMSnumber, phone, email). - If the contact field is invalid or empty, remove all checks from messaging preferences checkboxes for this transport type. Also disable these checkboxes. - Once the contact field becomes valid on input event, enable checkboxes for this transport type and restore any previously stored state (e.g. we just want to change phone number without setting all messaging preferences again). -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.