Bug #16721 ยป 16721.patch
| src/usr/local/www/system_usermanager.php | ||
|---|---|---|
| 213 | 213 |
$reqdfields = explode(" ", "usernamefld");
|
| 214 | 214 |
$reqdfieldsn = array(gettext("Username"));
|
| 215 | 215 |
} else {
|
| 216 |
if (empty($_POST['name'])) {
|
|
| 216 |
if ($_POST['createcert'] != "yes") {
|
|
| 217 | 217 |
$reqdfields = explode(" ", "usernamefld passwordfld1");
|
| 218 | 218 |
$reqdfieldsn = array( |
| 219 | 219 |
gettext("Username"),
|
| ... | ... | |
| 299 | 299 |
} |
| 300 | 300 |
} |
| 301 | 301 | |
| 302 |
if (!empty($_POST['name'])) {
|
|
| 302 |
if ($_POST['createcert'] == "yes") {
|
|
| 303 | 303 |
$ca = lookup_ca($_POST['caref']); |
| 304 | 304 |
$ca = $ca['item']; |
| 305 | 305 |
if (!$ca) {
|
| ... | ... | |
| 433 | 433 |
if (isset($id) && config_get_path("system/user/{$id}")) {
|
| 434 | 434 |
config_set_path("system/user/{$id}", $userent);
|
| 435 | 435 |
} else {
|
| 436 |
if (!empty($_POST['name'])) {
|
|
| 436 |
if ($_POST['createcert'] == "yes") {
|
|
| 437 | 437 |
$cert = array(); |
| 438 | 438 |
$cert['refid'] = uniqid(); |
| 439 | 439 |
$userent['cert'] = array(); |
| ... | ... | |
| 765 | 765 |
'act', |
| 766 | 766 |
null, |
| 767 | 767 |
'hidden', |
| 768 |
''
|
|
| 768 |
$act
|
|
| 769 | 769 |
)); |
| 770 | 770 | |
| 771 | 771 |
$form->addGlobal(new Form_Input( |
| ... | ... | |
| 950 | 950 |
if ($act == 'new') {
|
| 951 | 951 |
if (count($nonPrvCas) > 0) {
|
| 952 | 952 |
$section->addInput(new Form_Checkbox( |
| 953 |
'showcert',
|
|
| 953 |
'createcert',
|
|
| 954 | 954 |
'Certificate', |
| 955 |
'Click to create a user certificate',
|
|
| 955 |
'Create a user certificate', |
|
| 956 | 956 |
false |
| 957 | 957 |
)); |
| 958 | 958 |
} else {
|
| ... | ... | |
| 1157 | 1157 |
moveOptions($('[name="sysgroups[]"] option'), $('[name="groups[]"]'));
|
| 1158 | 1158 |
}); |
| 1159 | 1159 | |
| 1160 |
$("#showcert").click(function() {
|
|
| 1160 |
$("#createcert").click(function() {
|
|
| 1161 | 1161 |
hideClass('cert-options', !this.checked);
|
| 1162 | 1162 |
}); |
| 1163 | 1163 | |