bandwidth.php: Submit to the 'bandwidth' view but render the 'none' view. Fixes #2493

This commit is contained in:
Matthew Noorenberghe 2019-02-10 13:10:36 -08:00 committed by Matt N
parent ef1112801f
commit cdbd59f054
3 changed files with 3 additions and 2 deletions

View File

@ -23,5 +23,6 @@ if ( $action == 'bandwidth' && isset($_REQUEST['newBandwidth']) ) {
$_COOKIE['zmBandwidth'] = validStr($_REQUEST['newBandwidth']);
setcookie('zmBandwidth', validStr($_REQUEST['newBandwidth']), time()+3600*24*30*12*10);
$refreshParent = true;
$view = 'none';
}
?>

View File

@ -155,8 +155,8 @@ window.addEventListener("DOMContentLoaded", function onSkinDCL() {
var tag = el.getAttribute("data-window-tag");
var width = el.getAttribute("data-window-width");
var height = el.getAttribute("data-window-height");
createPopup(url, name, tag, width, height);
evt.preventDefault();
createPopup(url, name, tag, width, height);
});
});

View File

@ -44,7 +44,7 @@ xhtmlHeaders(__FILE__, translate('Bandwidth') );
</div>
<div id="content">
<form name="contentForm" id="contentForm" method="get" action="?">
<input type="hidden" name="view" value="none"/>
<input type="hidden" name="view" value="bandwidth"/>
<input type="hidden" name="action" value="bandwidth"/>
<p><?php echo translate('SetNewBandwidth') ?></p>
<p><?php echo buildSelect( "newBandwidth", $bandwidth_options ) ?></p>