mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 11:19:26 +02:00
Autofocus "Enable/disable personal Options" button in admin panel
Added javscript code to automatically set focus on the button after page load.
This commit is contained in:
parent
b91d3256b5
commit
1b2bf32dde
@ -94,10 +94,23 @@ if ( isset($_GET['op']) && isset($_GET['value']) )
|
||||
{
|
||||
$iNewVal = intval($_GET['value']);
|
||||
if ( $iNewVal == 1 )
|
||||
{
|
||||
// Set UserOption
|
||||
$USERCFG['UserOverwriteOptions'] = 1;
|
||||
|
||||
// Add some javascript to FOcus the enable/disable user button
|
||||
$content['EXTRA_JAVASCRIPT'] .= "<script>window.onload = function(){ document.getElementById('buttonenableuseropt').focus(); };</script>";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set UserOption
|
||||
$USERCFG['UserOverwriteOptions'] = 0;
|
||||
|
||||
// Add some javascript to FOcus the enable/disable user button
|
||||
$content['EXTRA_JAVASCRIPT'] .= "<script>window.onload = function(){ document.getElementById('buttondisableuseropt').focus(); };</script>";
|
||||
}
|
||||
|
||||
|
||||
// Enable User Options!
|
||||
WriteConfigValue( "UserOverwriteOptions", false, $content['SESSION_USERID'] );
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
</br>
|
||||
<!-- ENDIF isupdateavailable="true" -->
|
||||
|
||||
<form action="" method="post">
|
||||
<form action="" method="post" name="mainform">
|
||||
<table border="0" cellpadding="1" cellspacing="1" width="80%" align="center" class="table_with_border">
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user