// SMS: 7/23/2014 Changed to support vLab // $form = new HTML_QuickForm("signup_register_personal_form", "post", basename($_SERVER['PHP_SELF'])."?ctg=signup".(isset($_GET['ldap']) ? '&ldap=1' : ''), "", "class = 'indexForm'", true); $form = new HTML_QuickForm_vLab("signup_register_personal_form", "post", basename($_SERVER['PHP_SELF']) . "?ctg=signup" . (isset($_GET['ldap']) ? '&ldap=1' : ''), "", "class = 'indexForm'", true); $form->setIsSignupForm(true); $form->setIsProfileForm(false); // SMS End Change $form->removeAttribute('name'); // SMS: 7/23/2014 Changed to support vLab // $form -> registerRule('checkParameter', 'callback', 'eF_checkParameter'); //Register this rule for checking user input with our function, eF_checkParameter $form->registerRule('checkParameter', 'callback', 'eF_checkParameter_vLab'); //Register this rule for checking user input with our function, eF_checkParameter_vLab $form->registerRule('checkNotExist', 'callback', 'eF_checkNotExist'); //This rule is using our function, eF_checkNotExist, to ensure that no duplicate values are inserted in unique fields, such as login and email $form->registerRule('checkRule', 'callback', 'eF_checkRule'); //Register this rule for checking user input with our function, eF_checkParameter $form->addElement('text', 'login', _LOGIN, isset($_GET['ldap']) ? 'class = "inputText inactiveElement" readonly' : 'class = "inputText"'); $form->addRule('login', _THEFIELD . ' ' . _LOGIN . ' ' . _ISMANDATORY, 'required', null, 'client'); $form->addRule('login', _THEFIELD . ' "' . _LOGIN . '" ' . _MUSTBESMALLERTHAN . ' 50 ' . mb_strtolower(_CHARACTERS), 'maxlength', 50, 'client'); $form->addRule('login', _THEFIELD . ' ' . _LOGIN . ' ' . _HASINVALIDCHARACTERS . '. ' . _ONLYALLOWEDCHARACTERSLOGIN, 'checkParameter', 'login'); $form->addRule('login', _THELOGIN . ' "' . $form->exportValue('login') . '" ' . _ALREADYEXISTS, 'checkNotExist', 'login'); // SMS: 7/23/2014 Changed to support vLab // $form -> addElement(isset($_GET['ldap']) ? 'text' : 'password', 'password', _PASSWORD, 'class = "inputText"'); $form->addElement(isset($_GET['ldap']) ? 'text' : 'password', 'password', _PASSWORD, 'class = "inputText"'); $form->addElement(isset($_GET['ldap']) ? 'text' : 'password', 'passrepeat', _REPEATPASSWORD, 'class = "inputText"'); // SMS: 7/23/2014 Changed to support vLab // $form -> addRule('password', _THEFIELD.' '._PASSWORD.' '._ISMANDATORY, 'required', null, 'client'); $form->addRule('password', _THEFIELD . ' ' . _PASSWORD . ' ' . _ISMANDATORY, 'required', null, 'client'); $form->addRule('passrepeat', _THEFIELD . ' ' . _REPEATPASSWORD . ' ' . _ISMANDATORY, 'required', null, 'client'); // SMS: 7/23/2014 Changed to support vLab // $form -> addRule(array('password', 'passrepeat'), _PASSWORDSDONOTMATCH, 'compare', null, 'client'); $form->addRule('password', str_replace("%x", $GLOBALS['configuration']['password_length'], _PASSWORDMUSTBE6CHARACTERS), 'minlength', $GLOBALS['configuration']['password_length'], 'client');
} else { if (!EfrontUser::isOptionVisible('change_pass')) { $constrainAccess[] = 'password'; } } } } } } } // Modified by Masoud Sadjadi on June 30, 2014 to allow a Company field with just one line input // $form = new HTML_QuickForm("user_form", "post", basename($_SERVER['PHP_SELF'])."?ctg=personal&user="******"&op=profile".(isset($_GET['add_user']) ? '&add_user=1' : ''), "", null, true); // require_once(''); $form = new HTML_QuickForm_vLab("user_form", "post", basename($_SERVER['PHP_SELF']) . "?ctg=personal&user="******"&op=profile" . (isset($_GET['add_user']) ? '&add_user=1' : ''), "", null, true); // End modification by Masoud Sadjadi $form->addElement('static', '', '<img src = "view_file.php?file=' . urlencode($avatar['path']) . '" alt = "' . $editedUser->user['login'] . '" title = "' . $editedUser->user['login'] . '"/>'); if (!in_array('file_upload', $constrainAccess) && $constrainAccess != 'all') { $form->addElement('file', 'file_upload', _IMAGEFILE, 'class = "inputText"'); $form->addElement("static", "file_upload_text", _EACHFILESIZEMUSTBESMALLERTHAN . ' <b>' . FileSystemTree::getUploadMaxSize() . '</b> ' . _KB); $form->addElement("static", "sidenote", '(<a href = "' . basename($_SERVER['PHP_SELF']) . '?ctg=personal&user='******'login'] . '&op=profile&show_avatars_list=1&popup=1" target = "POPUP_FRAME" onclick = "eF_js_showDivPopup(event, \'' . _VIEWLIST . '\', 2)">' . _VIEWLIST . '</a>)'); $form->addElement('select', 'system_avatar', _ORSELECTONEFROMLIST, $systemAvatars, "id = 'select_avatar'"); } $form->addElement('text', 'login', _LOGIN, 'class = "inputText"'); if (!in_array('password', $constrainAccess) && $constrainAccess != 'all') { $form->addElement("static", "sidenote", _BLANKTOLEAVEUNCHANGED); $passwordElement = $form->addElement('password', 'password', _PASSWORD, 'autocomplete="off" class = "inputText"'); $form->addElement("static", "", str_replace("%x", $GLOBALS['configuration']['password_length'], _PASSWORDMUSTBE6CHARACTERS)); $passrepeatElement = $form->addElement('password', 'passrepeat', _REPEATPASSWORD, 'class = "inputText "'); } $form->addElement('text', 'name', _FIRSTNAME, 'class = "inputText"'); $form->addElement('text', 'surname', _LASTNAME, 'class = "inputText"');