Ejemplo n.º 1
0
         }
     }
     #cpp#endif
 }
 #cpp#endif
 $smarty->assign("T_CTG", "signup");
 // 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
Ejemplo n.º 2
0
$languages = EfrontSystem::getLanguages(true, true);
if ($GLOBALS['configuration']['onelanguage']) {
    $languages = array($GLOBALS['configuration']['default_language'] => $languages[$GLOBALS['configuration']['default_language']]);
}
$form->addElement('select', 'languages_NAME', _LANGUAGE, $languages);
$form->addElement("select", "timezone", _TIMEZONE, eF_getTimezones(), 'class = "inputText" style="width:20em"');
if ($GLOBALS['configuration']['social_modules_activated'] > 0) {
    $load_editor = true;
    $form->addElement('textarea', 'short_description', _SHORTDESCRIPTIONCV, 'class = "inputContentTextarea simpleEditor" style = "width:100%;height:14em;"');
}
// Modified by Masoud Sadjadi on June 30, 2014 to allow a Company field with just one line input
// $form -> addElement('textarea', 'comments', _COMMENTS, 'class = "inputContentTextarea" style = "width:100%;height:5em;"');
$form->addElement('text', 'comments', _COMMENTS, 'class = "inputText"');
$form->addRule('comments', _THEFIELD . ' ' . _COMMENTS . ' ' . _ISMANDATORY, 'required', null, 'client');
// End modification by Masoud Sadjadi
$form->registerRule('checkParameter', 'callback', 'eF_checkParameter');
//Register this rule for checking user input with our function, eF_checkParameter
$form->registerRule('checkNotExist', 'callback', 'eF_checkNotExist');
$form->registerRule('checkRule', 'callback', 'eF_checkRule');
//Register this rule for checking user input with our function, eF_checkParameter
$form->addRule('password', str_replace("%x", $GLOBALS['configuration']['password_length'], _PASSWORDMUSTBE6CHARACTERS), 'minlength', $GLOBALS['configuration']['password_length'], 'client');
$form->addRule(array('password', 'passrepeat'), _PASSWORDSDONOTMATCH, 'compare', null, 'client');
$form->addRule('name', _THEFIELD . ' ' . _FIRSTNAME . ' ' . _ISMANDATORY, 'required', null, 'client');
$form->addRule('surname', _THEFIELD . ' ' . _LASTNAME . ' ' . _ISMANDATORY, 'required', null, 'client');
$form->addRule('email', _THEFIELD . ' ' . _EMAILADDRESS . ' ' . _ISMANDATORY, 'required', null, 'client');
$form->addRule('email', _INVALIDFIELDDATA, 'checkParameter', 'email');
if (isset($_GET['add_user'])) {
    $form->addRule('login', _INVALIDFIELDDATA, 'checkParameter', 'login');
    $form->addRule('login', _THELOGIN . ' "' . $form->exportValue('login') . '" ' . _ALREADYEXISTS, 'checkNotExist', 'login');
    $form->addRule('login', _THEFIELD . ' ' . _LOGIN . ' ' . _ISMANDATORY, 'required', null, 'client');
    $form->addRule('password', _THEFIELD . ' ' . _PASSWORD . ' ' . _ISMANDATORY, 'required', null, 'client');