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');
$view = 'login';
$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');
$view = 'privacy';
$request = null;

View File

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

View File

@ -108,8 +108,8 @@ if ( ! $monitor ) {
'EventPrefix' => 'Event-',
'AnalysisFPSLimit' => '',
'AnalysisUpdateDelay' => 0,
'MaxFPS' => '30',
'AlarmMaxFPS' => '30',
'MaxFPS' => null,
'AlarmMaxFPS' => null,
'FPSReportInterval' => 100,
'RefBlendPerc' => 6,
'AlarmRefBlendPerc' => 6,
@ -1044,7 +1044,7 @@ if ( $monitor->Type() == 'Local' ) {
</table>
<div id="contentButtons">
<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>
</form>
</div>