Explorar o código

Fixed an issue where the Data Source reverts to LDAP for Select and Checkbox on New User Form field options

Problem description:

Go to Modules > Public > New User Registration > New User Profiles > default > New User Form

Add a new field, Select or Check Box type, select Options.
Change the Data Source from LDAP to Remote Rest API, click OK
Re-select Options, and notice that the Data Source has reverted to LDAP.

The log indicates:

configeditor-settings.js:903 Uncaught TypeError: Cannot set property 'checked' of null
at initFormElements (configeditor-settings.js:903)

Tested with IE/Win7 FFox/Win7 Crome/Win7 Safari/OSX Crome/OSX Fox/OSX,  all show the same result.
James Albright %!s(int64=7) %!d(string=hai) anos
pai
achega
b2a1a002da

+ 1 - 1
server/src/main/webapp/public/resources/js/configeditor-settings.js

@@ -899,7 +899,7 @@ FormTableHandler.showOptionsDialog = function(keyName, iteration) {
             });
         }
 
-        {
+        if (PWM_MAIN.getObject(inputID + "confirmationRequired") != null) {
             PWM_MAIN.getObject(inputID + "confirmationRequired").checked = currentValue['confirmationRequired'];
             PWM_MAIN.addEventHandler(inputID + "confirmationRequired", "change", function () {
                 currentValue['confirmationRequired'] = PWM_MAIN.getObject(inputID + "confirmationRequired").checked;