Prevent validation issue with undefined settings
authorJeff Godin <jgodin@tadl.org>
Tue, 23 Jun 2015 14:35:11 +0000 (10:35 -0400)
committerJeff Godin <jgodin@tadl.org>
Sun, 22 May 2016 05:09:24 +0000 (01:09 -0400)
Prevent a validation issue that was affecting new user
registrations.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/web/js/ui/default/actor/user/register.js

index a88ef42..eba8f68 100644 (file)
@@ -992,6 +992,9 @@ function uEditDrawSettingRow(tbody, dividerRow, template, stype) {
             var tb = new dijit.form.TextBox({scrollOnFocus:false}, getByName(row, 'widget'));
             tb.attr('value', userSettings[stype.name()]);
             tb.isValid = function() {
+                if (!this.value) {
+                    return true;
+                }
                 if (this.value.match(/^\s*$/) || this.value.match(/^\d{3}-\d{3}-\d{4}$/)) {
                     return true;
                 }