Bug #16721 ยป 16721.patch
| src/usr/local/www/system_usermanager.php | ||
|---|---|---|
|
$reqdfields = explode(" ", "usernamefld");
|
||
|
$reqdfieldsn = array(gettext("Username"));
|
||
|
} else {
|
||
|
if (empty($_POST['name'])) {
|
||
|
if ($_POST['createcert'] != "yes") {
|
||
|
$reqdfields = explode(" ", "usernamefld passwordfld1");
|
||
|
$reqdfieldsn = array(
|
||
|
gettext("Username"),
|
||
| ... | ... | |
|
}
|
||
|
}
|
||
|
if (!empty($_POST['name'])) {
|
||
|
if ($_POST['createcert'] == "yes") {
|
||
|
$ca = lookup_ca($_POST['caref']);
|
||
|
$ca = $ca['item'];
|
||
|
if (!$ca) {
|
||
| ... | ... | |
|
if (isset($id) && config_get_path("system/user/{$id}")) {
|
||
|
config_set_path("system/user/{$id}", $userent);
|
||
|
} else {
|
||
|
if (!empty($_POST['name'])) {
|
||
|
if ($_POST['createcert'] == "yes") {
|
||
|
$cert = array();
|
||
|
$cert['refid'] = uniqid();
|
||
|
$userent['cert'] = array();
|
||
| ... | ... | |
|
'act',
|
||
|
null,
|
||
|
'hidden',
|
||
|
''
|
||
|
$act
|
||
|
));
|
||
|
$form->addGlobal(new Form_Input(
|
||
| ... | ... | |
|
if ($act == 'new') {
|
||
|
if (count($nonPrvCas) > 0) {
|
||
|
$section->addInput(new Form_Checkbox(
|
||
|
'showcert',
|
||
|
'createcert',
|
||
|
'Certificate',
|
||
|
'Click to create a user certificate',
|
||
|
'Create a user certificate',
|
||
|
false
|
||
|
));
|
||
|
} else {
|
||
| ... | ... | |
|
moveOptions($('[name="sysgroups[]"] option'), $('[name="groups[]"]'));
|
||
|
});
|
||
|
$("#showcert").click(function() {
|
||
|
$("#createcert").click(function() {
|
||
|
hideClass('cert-options', !this.checked);
|
||
|
});
|
||