Revision 6755cfe8
Added by sbeaver about 10 years ago
usr/local/www/diag_logs_settings.php | ||
---|---|---|
305 | 305 |
'nentries', |
306 | 306 |
'GUI Log Entries', |
307 | 307 |
'text', |
308 |
htmlspecialchars($pconfig['nentries']),
|
|
308 |
$pconfig['nentries'],
|
|
309 | 309 |
['placeholder' => ''] |
310 | 310 |
))->setHelp('This is only the number of log entries displayed in the GUI. It does not affect how many entries are contained in the actual log files.'); |
311 | 311 |
|
... | ... | |
313 | 313 |
'logfilesize', |
314 | 314 |
'Log file size (Bytes)', |
315 | 315 |
'text', |
316 |
htmlspecialchars($pconfig['logfilesize']),
|
|
316 |
$pconfig['logfilesize'],
|
|
317 | 317 |
['placeholder' => 'Bytes'] |
318 | 318 |
))->setHelp($logfilesizeHelp); |
319 | 319 |
|
... | ... | |
378 | 378 |
$pconfig['disablelocallogging'] |
379 | 379 |
)); |
380 | 380 |
|
381 |
$resetlogsbtn = new Form_Button( |
|
382 |
'resetlogs', |
|
383 |
'Reset Log Files' |
|
384 |
); |
|
385 |
|
|
386 |
$resetlogsbtn->removeClass("btn-primary")->addClass("btn-danger btn-xs"); |
|
387 |
|
|
381 | 388 |
$section->addInput(new Form_StaticText( |
382 | 389 |
'Reset Logs', |
383 |
new Form_Button('resetlogs', 'Reset Log Files', null)
|
|
390 |
$resetlogsbtn
|
|
384 | 391 |
))->setHelp('Clears all local log files and reinitializes them as empty logs. This also restarts the DHCP daemon. Use the Save button first if you have made any setting changes.'); |
385 | 392 |
|
386 | 393 |
|
... | ... | |
423 | 430 |
'remoteserver', |
424 | 431 |
'Server 1', |
425 | 432 |
'text', |
426 |
htmlspecialchars($pconfig['remoteserver']),
|
|
433 |
$pconfig['remoteserver'],
|
|
427 | 434 |
['placeholder' => 'IP[:port]'] |
428 | 435 |
)); |
429 | 436 |
|
... | ... | |
431 | 438 |
'remoteserver2', |
432 | 439 |
'Server 2', |
433 | 440 |
'text', |
434 |
htmlspecialchars($pconfig['remoteserver2']),
|
|
441 |
$pconfig['remoteserver2'],
|
|
435 | 442 |
['placeholder' => 'IP[:port]'] |
436 | 443 |
)); |
437 | 444 |
|
... | ... | |
439 | 446 |
'remoteserver3', |
440 | 447 |
'Server 3', |
441 | 448 |
'text', |
442 |
htmlspecialchars($pconfig['remoteserver3']),
|
|
449 |
$pconfig['remoteserver3'],
|
|
443 | 450 |
['placeholder' => 'IP[:port]'] |
444 | 451 |
))->setHelp('IP addresses or IP:Port of remote syslog servers'); |
445 | 452 |
|
... | ... | |
516 | 523 |
print $form; |
517 | 524 |
?> |
518 | 525 |
|
519 |
<!-- Setting the button to class btn-danger makes it red, but also causes |
|
520 |
a confirmation dialog to be automatically presented when the button is clicked --> |
|
521 |
<script> |
|
522 |
document.getElementById("resetlogs").className = "btn btn-danger btn-xs"; |
|
523 |
</script> |
|
524 |
|
|
525 | 526 |
<script type="text/javascript"> |
526 | 527 |
//<![CDATA[ |
527 | 528 |
enable_change(false); |
Also available in: Unified diff
Replace js with addClass to set button class
Also removed htmlspecialcharacters() where not required