Merge branch 'master' into storageareas

This commit is contained in:
Isaac Connor 2016-04-26 13:10:37 -04:00
commit 0adbaafd98
7 changed files with 215 additions and 116 deletions

View File

@ -3825,6 +3825,41 @@ body = "ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% s
readonly => 1, readonly => 1,
category => "dynamic", category => "dynamic",
}, },
{
name => "ZM_SSMTP_MAIL",
default => "no",
description => qqq("
Use a SSMTP mail server if available.
NEW_MAIL_MODULES must be enabled
"),
requires => [
{ name => "ZM_OPT_EMAIL", value => "yes" },
{ name => "ZM_OPT_MESSAGE", value => "yes" },
{ name => "ZM_NEW_MAIL_MODULES", value => "yes" }
],
help => qqq("
SSMTP is a lightweight and efficient method to send email.
The SSMTP application is not installed by default.
NEW_MAIL_MODULES must also be enabled.
Please visit: http://www.zoneminder.com/wiki/index.php/How_to_get_ssmtp_working_with_Zoneminder
for setup and configuration help.
"),
type => $types{boolean},
category => "mail",
},
{
name => "ZM_SSMTP_PATH",
default => "",
description => "SSMTP executable path",
requires => [{ name => "ZM_SSMTP_MAIL", value => "yes" }],
help => qqq("
Recommend setting the path to the SSMTP application.
If path is not defined. Zoneminder will try to determine
the path via shell command. Example path: /usr/sbin/ssmtp.
"),
type => $types{string},
category => "mail",
},
); );
our %options_hash = map { ( $_->{name}, $_ ) } @options; our %options_hash = map { ( $_->{name}, $_ ) } @options;

View File

@ -779,9 +779,31 @@ sub sendEmail
Disposition => "attachment" Disposition => "attachment"
); );
} }
if ( $Config{ZM_SSMTP_MAIL} ){
my $ssmtp_location = $Config{ZM_SSMTP_PATH};
if( ! $ssmtp_location ){
$ssmtp_location = qx('which ssmtp');
if ( logDebugging() )
{
Debug( "which ssmtp: $ssmtp_location - set ssmtp path in options to suppress this message\n" );
}
}
$mail->send( 'sendmail', $ssmtp_location, $Config{ZM_EMAIL_ADDRESS} );
}else{
MIME::Lite->send( "smtp", $Config{ZM_EMAIL_HOST}, Timeout=>60 );
$mail->send();
}
### Send the Message ### Send the Message
MIME::Lite->send( "smtp", $Config{ZM_EMAIL_HOST}, Timeout=>60 ); #MIME::Lite->send( "smtp", $Config{ZM_EMAIL_HOST}, Timeout=>60 );
$mail->send(); #$mail->send();
} }
else else
{ {

View File

@ -230,6 +230,7 @@ $SLANG = array(
'ChooseLogFormat' => 'Choose a log format', 'ChooseLogFormat' => 'Choose a log format',
'ChooseLogSelection' => 'Choose a log selection', 'ChooseLogSelection' => 'Choose a log selection',
'ChoosePreset' => 'Choose Preset', 'ChoosePreset' => 'Choose Preset',
'CloneMonitor' => 'Clone Monitor',
'Close' => 'Close', 'Close' => 'Close',
'Colour' => 'Colour', 'Colour' => 'Colour',
'Command' => 'Command', 'Command' => 'Command',

View File

@ -21,7 +21,7 @@ xhtmlHeaders( __FILE__, translate('Console') );
<th class="colName"><?php echo translate('Name') ?></th> <th class="colName"><?php echo translate('Name') ?></th>
<th class="colFunction"><?php echo translate('Function') ?></th> <th class="colFunction"><?php echo translate('Function') ?></th>
<?php if ( count($servers) ) { ?> <?php if ( count($servers) ) { ?>
<th class="colServer"><?php echo translate('Server') ?></th> <th class="colServer"><?php echo translate('Server') ?></th>
<?php } ?> <?php } ?>
<th class="colSource"><?php echo translate('Source') ?></th> <th class="colSource"><?php echo translate('Source') ?></th>
<?php if ( $show_storage_areas ) { ?> <?php if ( $show_storage_areas ) { ?>
@ -80,7 +80,7 @@ foreach( $displayMonitors as $monitor )
$dclass = "errorText"; $dclass = "errorText";
else else
{ {
// https://github.com/ZoneMinder/ZoneMinder/issues/1082 // https://github.com/ZoneMinder/ZoneMinder/issues/1082
if ( !$monitor['zma'] && $monitor['Function']!='Monitor' ) if ( !$monitor['zma'] && $monitor['Function']!='Monitor' )
$dclass = "warnText"; $dclass = "warnText";
else else
@ -99,7 +99,7 @@ foreach( $displayMonitors as $monitor )
<td class="colName"><?php echo makePopupLink( '?view=watch&amp;mid='.$monitor['Id'], 'zmWatch'.$monitor['Id'], array( 'watch', reScale( $monitor['Width'], $scale ), reScale( $monitor['Height'], $scale ) ), $monitor['Name'], $running && ($monitor['Function'] != 'None') && canView( 'Stream' ) ) ?></td> <td class="colName"><?php echo makePopupLink( '?view=watch&amp;mid='.$monitor['Id'], 'zmWatch'.$monitor['Id'], array( 'watch', reScale( $monitor['Width'], $scale ), reScale( $monitor['Height'], $scale ) ), $monitor['Name'], $running && ($monitor['Function'] != 'None') && canView( 'Stream' ) ) ?></td>
<td class="colFunction"><?php echo makePopupLink( '?view=function&amp;mid='.$monitor['Id'], 'zmFunction', 'function', '<span class="'.$fclass.'">'.translate('Fn'.$monitor['Function']).( empty($monitor['Enabled']) ? ', disabled' : '' ) .'</span>', canEdit( 'Monitors' ) ) ?></td> <td class="colFunction"><?php echo makePopupLink( '?view=function&amp;mid='.$monitor['Id'], 'zmFunction', 'function', '<span class="'.$fclass.'">'.translate('Fn'.$monitor['Function']).( empty($monitor['Enabled']) ? ', disabled' : '' ) .'</span>', canEdit( 'Monitors' ) ) ?></td>
<?php if ( count($servers) ) { ?> <?php if ( count($servers) ) { ?>
<td class="colServer"><?php <td class="colServer"><?php
$Server = new Server( $monitor['ServerId'] ); $Server = new Server( $monitor['ServerId'] );
echo $Server->Name(); echo $Server->Name();
?></td> ?></td>
@ -113,9 +113,9 @@ echo $Server->Name();
<?php } elseif ( $monitor['Type'] == "Ffmpeg" || $monitor['Type'] == "Libvlc" ) { <?php } elseif ( $monitor['Type'] == "Ffmpeg" || $monitor['Type'] == "Libvlc" ) {
$domain = parse_url( $monitor['Path'], PHP_URL_HOST ); $domain = parse_url( $monitor['Path'], PHP_URL_HOST );
$shortpath = $domain ? $domain : preg_replace( '/^.*\//', '', $monitor['Path'] ); $shortpath = $domain ? $domain : preg_replace( '/^.*\//', '', $monitor['Path'] );
if ( $shortpath == '' ) { if ( $shortpath == '' ) {
$shortpath = 'Monitor ' . $monitor['Id']; $shortpath = 'Monitor ' . $monitor['Id'];
} }
?> ?>
<td class="colSource"><?php echo makePopupLink( '?view=monitor&amp;mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.$shortpath.'</span>', canEdit( 'Monitors' ) ) ?></td> <td class="colSource"><?php echo makePopupLink( '?view=monitor&amp;mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.$shortpath.'</span>', canEdit( 'Monitors' ) ) ?></td>
<?php } elseif ( $monitor['Type'] == "cURL" ) { ?> <?php } elseif ( $monitor['Type'] == "cURL" ) { ?>

View File

@ -1,3 +1,6 @@
var jsTranslatedAddText;
var jsTranslatedCloneText;
function setButtonStates( element ) function setButtonStates( element )
{ {
var form = element.form; var form = element.form;
@ -15,9 +18,36 @@ function setButtonStates( element )
} }
$(element).getParent( 'tr' ).toggleClass( 'highlight' ); $(element).getParent( 'tr' ).toggleClass( 'highlight' );
form.editBtn.disabled = (checked!=1); form.editBtn.disabled = (checked!=1);
form.addBtn.value = (checked==1) ? jsTranslatedCloneText:jsTranslatedAddText;
form.deleteBtn.disabled = (checked==0); form.deleteBtn.disabled = (checked==0);
} }
function addMonitor( element)
{
var form = element.form;
var dupParam;
var monitorId=-1;
if (form.addBtn.value == jsTranslatedCloneText)
{
// get the value of the first checkbox
for ( var i = 0; i < form.elements.length; i++ )
{
if ( form.elements[i].type == "checkbox" )
{
if ( form.elements[i].checked )
{
monitorId = form.elements[i].value;
break;
}
}
}
}
dupParam = (monitorId == -1 ) ? '': '&dupId='+monitorId;
createPopup( '?view=monitor'+dupParam, 'zmMonitor0','monitor' );
}
function editMonitor( element ) function editMonitor( element )
{ {
var form = element.form; var form = element.form;
@ -55,6 +85,8 @@ function reloadWindow()
function initPage() function initPage()
{ {
jsTranslatedAddText = translatedAddText;
jsTranslatedCloneText = translatedCloneText;
reloadWindow.periodical( consoleRefreshTimeout ); reloadWindow.periodical( consoleRefreshTimeout );
if ( showVersionPopup ) if ( showVersionPopup )
createPopup( '?view=version', 'zmVersion', 'version' ); createPopup( '?view=version', 'zmVersion', 'version' );

View File

@ -26,7 +26,7 @@ elseif ( ZM_DYN_SHOW_DONATE_REMINDER )
?> ?>
var showVersionPopup = <?php echo isset($showVersionPopup )?'true':'false' ?>; var showVersionPopup = <?php echo isset($showVersionPopup )?'true':'false' ?>;
var showDonatePopup = <?php echo isset($showDonatePopup )?'true':'false' ?>; var showDonatePopup = <?php echo isset($showDonatePopup )?'true':'false' ?>;
var translatedAddText = "<?php echo translate('AddNewMonitor') ?>";
var translatedCloneText = "<?php echo translate('CloneMonitor') ?>";

View File

@ -58,80 +58,88 @@ if ( ! empty($_REQUEST['mid']) ) {
} else { } else {
$nextId = getTableAutoInc( 'Monitors' ); $nextId = getTableAutoInc( 'Monitors' );
$monitor = new Monitor(); if ( ! empty( $_REQUEST['dupId'] ) ) {
$monitor->set( array( $monitor = new Monitor( $_REQUEST['dupId'] );
'Id' => 0, if ( ZM_OPT_X10 )
'Name' => translate('Monitor').'-'.$nextId, $x10Monitor = dbFetchOne( 'SELECT * FROM TriggersX10 WHERE MonitorId = ?', NULL, array($_REQUEST['dupId']) );
'Function' => "Monitor", $clonedName = $monitor->Name();
'Enabled' => true, $monitor->Name( translate('Monitor').'-'.$nextId );
'LinkedMonitors' => "", } else {
'Type' => "", $monitor = new Monitor();
'Device' => "/dev/video0", $monitor->set( array(
'Channel' => "0", 'Id' => 0,
'Format' => 0x000000ff, 'Name' => translate('Monitor').'-'.$nextId,
'Protocol' => "", 'Function' => "Monitor",
'Method' => "", 'Enabled' => true,
'Host' => "", 'LinkedMonitors' => "",
'Path' => "", 'Type' => "",
'Options' => "", 'Device' => "/dev/video0",
'Port' => "80", 'Channel' => "0",
'User' => "", 'Format' => 0x000000ff,
'Pass' => "", 'Protocol' => "",
'Colours' => 3, 'Method' => "",
'Palette' => 0, 'Host' => "",
'Width' => "320", 'Path' => "",
'Height' => "240", 'Options' => "",
'Orientation' => "0", 'Port' => "80",
'Deinterlacing' => 0, 'User' => "",
'RTSPDescribe' => 0, 'Pass' => "",
'SaveJPEGs' => "3", 'Colours' => 3,
'VideoWriter' => "0", 'Palette' => 0,
'EncoderParameters' => "# Lines beginning with # are a comment \n# For changing quality, use the crf option\n# 1 is best, 51 is worst quality\n#crf=23\n", 'Width' => "320",
'RecordAudio' => '0', 'Height' => "240",
'LabelFormat' => '%N - %d/%m/%y %H:%M:%S', 'Orientation' => "0",
'LabelX' => 0, 'Deinterlacing' => 0,
'LabelY' => 0, 'RTSPDescribe' => 0,
'LabelSize' => 1, 'SaveJPEGs' => "3",
'ImageBufferCount' => 50, 'VideoWriter' => "0",
'WarmupCount' => 25, 'EncoderParameters' => "# Lines beginning with # are a comment \n# For changing quality, use the crf option\n# 1 is best, 51 is worst quality\n#crf=23\n",
'PreEventCount' => 25, 'RecordAudio' => '0',
'PostEventCount' => 25, 'LabelFormat' => '%N - %d/%m/%y %H:%M:%S',
'StreamReplayBuffer' => 1000, 'LabelX' => 0,
'AlarmFrameCount' => 1, 'LabelY' => 0,
'Controllable' => 0, 'LabelSize' => 1,
'ControlId' => "", 'ImageBufferCount' => 50,
'ControlType' => 0, 'WarmupCount' => 25,
'ControlDevice' => "", 'PreEventCount' => 25,
'ControlAddress' => "", 'PostEventCount' => 25,
'AutoStopTimeout' => "", 'StreamReplayBuffer' => 1000,
'TrackMotion' => 0, 'AlarmFrameCount' => 1,
'TrackDelay' => "", 'Controllable' => 0,
'ReturnLocation' => -1, 'ControlId' => "",
'ReturnDelay' => "", 'ControlType' => 0,
'SectionLength' => 600, 'ControlDevice' => "",
'FrameSkip' => 0, 'ControlAddress' => "",
'MotionFrameSkip' => 0, 'AutoStopTimeout' => "",
'EventPrefix' => 'Event-', 'TrackMotion' => 0,
'AnalysisFPS' => "", 'TrackDelay' => "",
'AnalysisUpdateDelay' => 0, 'ReturnLocation' => -1,
'MaxFPS' => "", 'ReturnDelay' => "",
'AlarmMaxFPS' => "", 'SectionLength' => 600,
'FPSReportInterval' => 1000, 'FrameSkip' => 0,
'RefBlendPerc' => 6, 'MotionFrameSkip' => 0,
'AlarmRefBlendPerc' => 6, 'EventPrefix' => 'Event-',
'DefaultView' => 'Events', 'AnalysisFPS' => "",
'DefaultRate' => '100', 'AnalysisUpdateDelay' => 0,
'DefaultScale' => '100', 'MaxFPS' => "",
'SignalCheckColour' => '#0000c0', 'AlarmMaxFPS' => "",
'WebColour' => 'red', 'FPSReportInterval' => 1000,
'Exif' => '0', 'RefBlendPerc' => 6,
'Triggers' => "", 'AlarmRefBlendPerc' => 6,
'V4LMultiBuffer' => '', 'DefaultView' => 'Events',
'V4LCapturesPerFrame' => 1, 'DefaultRate' => '100',
'ServerId' => $Server['Id'], 'DefaultScale' => '100',
'StorageId' => '', 'SignalCheckColour' => '#0000c0',
) ); 'WebColour' => 'red',
} 'Exif' => '0',
'Triggers' => "",
'V4LMultiBuffer' => '',
'V4LCapturesPerFrame' => 1,
'ServerId' => $Server['Id'],
'StorageId' => '',
) );
} # end if $_REQUEST['dupID']
} # end if $_REQUEST['mid']
if ( ZM_OPT_X10 && empty($x10Monitor) ) { if ( ZM_OPT_X10 && empty($x10Monitor) ) {
$x10Monitor = array( $x10Monitor = array(
@ -143,6 +151,7 @@ if ( ZM_OPT_X10 && empty($x10Monitor) ) {
function fourcc( $a, $b, $c, $d ) { function fourcc( $a, $b, $c, $d ) {
return( ord($a) | (ord($b) << 8) | (ord($c) << 16) | (ord($d) << 24) ); return( ord($a) | (ord($b) << 8) | (ord($c) << 16) | (ord($d) << 24) );
} }
if ( isset( $_REQUEST['newMonitor'] ) ) { if ( isset( $_REQUEST['newMonitor'] ) ) {
@ -455,23 +464,22 @@ $videowriteropts = array(
xhtmlHeaders(__FILE__, translate('Monitor')." - ".validHtmlStr($monitor->Name) ); xhtmlHeaders(__FILE__, translate('Monitor')." - ".validHtmlStr($monitor->Name) );
?> ?>
<body> <body>
<div id="page"> <div id="page">
<div id="header"> <div id="header">
<?php if ( canEdit( 'Monitors' ) ) { ?> <?php if ( canEdit( 'Monitors' ) ) { ?>
<?php if ( isset ($_REQUEST['dupId'])) { ?>
<div class="alert alert-info">
Configuration cloned from Monitor: <?php echo $clonedName ?>
</div>
<?php } ?>
<div id="headerButtons"> <div id="headerButtons">
<a href="#" onclick="createPopup( '?view=monitorprobe&amp;mid=<?php echo $monitor->Id ?>', 'zmMonitorProbe<?php echo $monitor->Id ?>', 'monitorprobe' ); return( false );"><?php echo translate('Probe') ?></a> <a href="#" onclick="createPopup( '?view=monitorprobe&amp;mid=<?php echo $monitor->Id ?>', 'zmMonitorProbe<?php echo $monitor->Id ?>', 'monitorprobe' ); return( false );"><?php echo translate('Probe') ?></a>
<?php <?php if ( ZM_HAS_ONVIF ) { ?>
if ( ZM_HAS_ONVIF ) { <a href="#" onclick="createPopup( '?view=onvifprobe&amp;mid=<?php echo $monitor->Id ?>', 'zmOnvifProbe<?php echo $monitor->Id ?>', 'onvifprobe' ); return( false );"><?php echo translate('OnvifProbe') ?></a>
?> <?php } ?>
<a href="#" onclick="createPopup( '?view=onvifprobe&amp;mid=<?php echo $monitor->Id ?>', 'zmOnvifProbe<?php echo $monitor->Id ?>', 'onvifprobe' ); return( false );"><?php echo translate('OnvifProbe') ?></a>
<?php
}
?>
<a href="#" onclick="createPopup( '?view=monitorpreset&amp;mid=<?php echo $monitor->Id ?>', 'zmMonitorPreset<?php echo $monitor->Id ?>', 'monitorpreset' ); return( false );"><?php echo translate('Presets') ?></a> <a href="#" onclick="createPopup( '?view=monitorpreset&amp;mid=<?php echo $monitor->Id ?>', 'zmMonitorPreset<?php echo $monitor->Id ?>', 'monitorpreset' ); return( false );"><?php echo translate('Presets') ?></a>
</div> </div>
<?php <?php } ?>
}
?>
<h2><?php echo translate('Monitor') ?> - <?php echo validHtmlStr($monitor->Name) ?><?php if ( !empty($monitor->Id) ) { ?> (<?php echo $monitor->Id ?>)<?php } ?></h2> <h2><?php echo translate('Monitor') ?> - <?php echo validHtmlStr($monitor->Name) ?><?php if ( !empty($monitor->Id) ) { ?> (<?php echo $monitor->Id ?>)<?php } ?></h2>
</div> </div>
<div id="content"> <div id="content">
@ -717,21 +725,21 @@ switch ( $tab )
</td> </td>
</tr> </tr>
<tr><td><?php echo translate('AnalysisFPS') ?></td><td><input type="text" name="newMonitor[AnalysisFPS]" value="<?php echo validHtmlStr($monitor->AnalysisFPS) ?>" size="6"/></td></tr> <tr><td><?php echo translate('AnalysisFPS') ?></td><td><input type="text" name="newMonitor[AnalysisFPS]" value="<?php echo validHtmlStr($monitor->AnalysisFPS) ?>" size="6"/></td></tr>
<?php <?php if ( $monitor->Type != "Local" && $monitor->Type != "File" ) { ?>
if ( $monitor->Type != "Local" && $monitor->Type != "File" ) <tr>
{ <td><?php echo translate('MaximumFPS') ?>&nbsp;(<?php echo makePopupLink('?view=optionhelp&amp;option=OPTIONS_MAXFPS', 'zmOptionHelp', 'optionhelp', '?' ) ?>)</td>
?> <td><input type="text" onclick="document.getElementById('newMonitor[MaxFPS]').innerHTML= ' CAUTION: See the help text'" name="newMonitor[MaxFPS]" value="<?php echo validHtmlStr($monitor->MaxFPS) ?>" size="5"/><span id="newMonitor[MaxFPS]" style="color:red"></span></td>
<tr><td><?php echo translate('MaximumFPS') ?>&nbsp;(<?php echo makePopupLink('?view=optionhelp&amp;option=OPTIONS_MAXFPS', 'zmOptionHelp', 'optionhelp', '?' ) ?>)</td><td><input type="text" onclick="document.getElementById('newMonitor[MaxFPS]').innerHTML= ' CAUTION: See the help text'" name="newMonitor[MaxFPS]" value="<?php echo validHtmlStr($monitor->MaxFPS) ?>" size="5"/><span id="newMonitor[MaxFPS]" style="color:red"></span></td></tr> </tr>
<tr><td><?php echo translate('AlarmMaximumFPS') ?>&nbsp;(<?php echo makePopupLink('?view=optionhelp&amp;option=OPTIONS_MAXFPS', 'zmOptionHelp', 'optionhelp', '?' ) ?>)</td><td><input type="text" onclick="document.getElementById('newMonitor[AlarmMaxFPS]').innerHTML= ' CAUTION: See the help text'" name="newMonitor[AlarmMaxFPS]" value="<?php echo validHtmlStr($monitor->AlarmMaxFPS) ?>" size="5"/><span id="newMonitor[AlarmMaxFPS]" style="color:red"></span></td></tr> <tr>
<?php <td><?php echo translate('AlarmMaximumFPS') ?>&nbsp;(<?php echo makePopupLink('?view=optionhelp&amp;option=OPTIONS_MAXFPS', 'zmOptionHelp', 'optionhelp', '?' ) ?>)</td>
} else { <td><input type="text" onclick="document.getElementById('newMonitor[AlarmMaxFPS]').innerHTML= ' CAUTION: See the help text'" name="newMonitor[AlarmMaxFPS]" value="<?php echo validHtmlStr($monitor->AlarmMaxFPS) ?>" size="5"/><span id="newMonitor[AlarmMaxFPS]" style="color:red"></span></td>
?> </tr>
<?php } else { ?>
<tr><td><?php echo translate('MaximumFPS') ?></td><td><input type="text" name="newMonitor[MaxFPS]" value="<?php echo validHtmlStr($monitor->MaxFPS) ?>" size="5"/></td></tr> <tr><td><?php echo translate('MaximumFPS') ?></td><td><input type="text" name="newMonitor[MaxFPS]" value="<?php echo validHtmlStr($monitor->MaxFPS) ?>" size="5"/></td></tr>
<tr><td><?php echo translate('AlarmMaximumFPS') ?></td><td><input type="text" name="newMonitor[AlarmMaxFPS]" value="<?php echo validHtmlStr($monitor->AlarmMaxFPS) ?>" size="5"/></td></tr> <tr><td><?php echo translate('AlarmMaximumFPS') ?></td><td><input type="text" name="newMonitor[AlarmMaxFPS]" value="<?php echo validHtmlStr($monitor->AlarmMaxFPS) ?>" size="5"/></td></tr>
<?php <?php
} }
if ( ZM_FAST_IMAGE_BLENDS ) if ( ZM_FAST_IMAGE_BLENDS ) {
{
?> ?>
<tr><td><?php echo translate('RefImageBlendPct') ?></td><td><select name="newMonitor[RefBlendPerc]"><?php foreach ( $fastblendopts as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->RefBlendPerc ) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr> <tr><td><?php echo translate('RefImageBlendPct') ?></td><td><select name="newMonitor[RefBlendPerc]"><?php foreach ( $fastblendopts as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->RefBlendPerc ) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
<tr><td><?php echo translate('AlmRefImageBlendPct') ?></td><td><select name="newMonitor[AlarmRefBlendPerc]"><?php foreach ( $fastblendopts_alarm as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->AlarmRefBlendPerc ) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr> <tr><td><?php echo translate('AlmRefImageBlendPct') ?></td><td><select name="newMonitor[AlarmRefBlendPerc]"><?php foreach ( $fastblendopts_alarm as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->AlarmRefBlendPerc ) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
@ -970,13 +978,14 @@ switch ( $tab )
} }
} }
?> ?>
</tbody> </tbody>
</table> </table>
<div id="contentButtons"> <div id="contentButtons">
<input type="submit" value="<?php echo translate('Save') ?>"<?php if ( !canEdit( 'Monitors' ) ) { ?> disabled="disabled"<?php } ?>/><input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow()"/> <input type="submit" value="<?php echo translate('Save') ?>"<?php if ( !canEdit( 'Monitors' ) ) { ?> disabled="disabled"<?php } ?>/><input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow()"/>
</div> </div>
</form>
</div> </form>
</div> </div>
</div>
</body> </body>
</html> </html>