diff options
-rwxr-xr-x | usr/local/www/guiconfig.inc | 6 | ||||
-rwxr-xr-x | usr/local/www/interfaces_assign.php | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index 1df8a66..5952f41 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -231,7 +231,7 @@ function verify_gzip_file($fname) { return 1; } -function print_info_box_np($msg) { +function print_info_box_np($msg, $name="apply",$value="Apply changes") { global $g; echo "<table height=\"32\" width=\"100%\">\n"; echo " <tr>\n"; @@ -242,9 +242,9 @@ function print_info_box_np($msg) { echo " </td>\n"; echo " <td width='70%'><font color='white'><b>{$msg}</b></font>\n"; echo " </td>"; - if(stristr($msg, "apply") == true) { + if(stristr($msg, "apply") == true || stristr($msg, "save")) { echo " <td>"; - echo " <input name=\"apply\" type=\"submit\" class=\"formbtn\" id=\"apply\" value=\"Apply changes\">\n"; + echo " <input name=\"{$name}\" type=\"submit\" class=\"formbtn\" id=\"${name}\" value=\"{$value}\">\n"; echo " </td>"; } echo " </tr></table>\n"; diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php index 0349f62..d13bdfa 100755 --- a/usr/local/www/interfaces_assign.php +++ b/usr/local/www/interfaces_assign.php @@ -208,6 +208,8 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed")) <p class="pgtitle"><?=$pgtitle?></p> <?php if ($input_errors) print_input_errors($input_errors); ?> <?php if ($savemsg) print_info_box($savemsg); ?> +<div id="save_button" style="display:none"><?php print_info_box_np("Assignment change detected, changes are not yet saved.", "save", "Save Changes"); ?></div> + <form action="interfaces_assign.php" method="post" name="iform" id="iform"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td class="tabnavtbl"> @@ -236,7 +238,7 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed")) <tr> <td class="listlr" valign="middle"><strong><?=$ifdescr;?></strong></td> <td valign="middle" class="listr"> - <select name="<?=$ifname;?>" class="formfld" id="<?=$ifname;?>"> + <select onChange="document.getElementById('save_button').style.display='inline';" name="<?=$ifname;?>" class="formfld" id="<?=$ifname;?>"> <?php foreach ($portlist as $portname => $portinfo): ?> <option value="<?=$portname;?>" <?php if ($portname == $iface['if']) echo "selected";?>> <?php if ($portinfo['isvlan']) { @@ -273,7 +275,6 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed")) </table> </div> <br> -<input name="Submit" type="submit" class="formbtn" value="Save"><br><br> <p> </p> <ul> |