Fixed issue with control edit screen losing changes.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2734 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
c753214450
commit
c2cf6e31bc
|
@ -40,6 +40,12 @@ if ( isset($_REQUEST['tab']) )
|
|||
else
|
||||
$tab = "main";
|
||||
|
||||
if ( isset( $_REQUEST['newControl'] ) )
|
||||
{
|
||||
$newControl = $_REQUEST['newControl'];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !empty($_REQUEST['cid']) )
|
||||
{
|
||||
$control = dbFetchOne( "select * from Controls where Id = '".dbEscape($_REQUEST['cid'])."'" );
|
||||
|
@ -144,14 +150,12 @@ else
|
|||
'CanSetPresets' => "",
|
||||
);
|
||||
}
|
||||
if ( !isset( $newControl ) )
|
||||
{
|
||||
$newControl = $control;
|
||||
}
|
||||
|
||||
$focusWindow = true;
|
||||
|
||||
xhtmlHeaders(__FILE__, $SLANG['ControlCap']." - ".$control['Name'] );
|
||||
xhtmlHeaders(__FILE__, $SLANG['ControlCap']." - ".$newControl['Name'] );
|
||||
?>
|
||||
<body>
|
||||
<div id="page">
|
||||
|
@ -172,7 +176,7 @@ foreach ( $tabs as $name=>$value )
|
|||
else
|
||||
{
|
||||
?>
|
||||
<li><a href="?view=<?= $view ?>&cid=<?= requestVar( 'cid' ) ?>&tab=<?= $name ?>"><?= $value ?></a></li>
|
||||
<li><a href="#" onclick="submitTab( '<?= $name ?>' ); return( false );"><?= $value ?></a></li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue