fix validateForm running on monitor cancel due to lack of type=button on cancel button

This commit is contained in:
Isaac Connor 2019-02-08 09:55:32 -05:00
parent 1039149866
commit ee3a0c1fd1
3 changed files with 6 additions and 6 deletions

View File

@ -224,7 +224,7 @@ if ( ZM_OPT_USE_AUTH and !isset($user) ) {
Logger::Debug('Redirecting to login'); Logger::Debug('Redirecting to login');
$view = 'login'; $view = 'login';
$request = null; $request = null;
} else if ( ZM_SHOW_PRIVACY && ($action != 'privacy') && ($view != 'options') && (!$request) && canEdit('System') ) { } else if ( ZM_SHOW_PRIVACY && ($view != 'privacy') && ($view != 'options') && (!$request) && canEdit('System') ) {
Logger::Debug('Redirecting to privacy'); Logger::Debug('Redirecting to privacy');
$view = 'privacy'; $view = 'privacy';
$request = null; $request = null;

View File

@ -133,9 +133,9 @@ function validateForm( form ) {
if ( errors.length ) { if ( errors.length ) {
alert( errors.join( "\n" ) ); alert( errors.join( "\n" ) );
return( false ); return false;
} }
return( true ); return true;
} }
function updateLinkedMonitors( element ) { function updateLinkedMonitors( element ) {

View File

@ -108,8 +108,8 @@ if ( ! $monitor ) {
'EventPrefix' => 'Event-', 'EventPrefix' => 'Event-',
'AnalysisFPSLimit' => '', 'AnalysisFPSLimit' => '',
'AnalysisUpdateDelay' => 0, 'AnalysisUpdateDelay' => 0,
'MaxFPS' => '30', 'MaxFPS' => null,
'AlarmMaxFPS' => '30', 'AlarmMaxFPS' => null,
'FPSReportInterval' => 100, 'FPSReportInterval' => 100,
'RefBlendPerc' => 6, 'RefBlendPerc' => 6,
'AlarmRefBlendPerc' => 6, 'AlarmRefBlendPerc' => 6,
@ -1044,7 +1044,7 @@ if ( $monitor->Type() == 'Local' ) {
</table> </table>
<div id="contentButtons"> <div id="contentButtons">
<button type="submit" value="Save"<?php echo canEdit('Monitors') ? '' : ' disabled="disabled"' ?>><?php echo translate('Save') ?></button> <button type="submit" value="Save"<?php echo canEdit('Monitors') ? '' : ' disabled="disabled"' ?>><?php echo translate('Save') ?></button>
<button data-on-click="closeWindow"><?php echo translate('Cancel') ?></button> <button type="button" data-on-click="closeWindow"><?php echo translate('Cancel') ?></button>
</div> </div>
</form> </form>
</div> </div>