Save value of V4LMultiBuffer and fix it not being checked for the Use Config Value

This commit is contained in:
Isaac Connor 2020-02-25 18:13:42 -05:00
parent 4d044a1f14
commit e82ed3a098
2 changed files with 3 additions and 3 deletions

View File

@ -33,12 +33,11 @@ if ( $action == 'monitor' ) {
if ( !$x10Monitor )
$x10Monitor = array();
}
if ( !canEdit('Monitors',$mid) ) {
if ( !canEdit('Monitors', $mid) ) {
ZM\Warning('You do not have permission to edit this monitor');
return;
}
} else {
#$monitor = array();
if ( ZM_OPT_X10 ) {
$x10Monitor = array();
}
@ -58,6 +57,7 @@ if ( $action == 'monitor' ) {
'Enabled' => 0,
'Exif' => 0,
'RTSPDescribe' => 0,
'V4LMultiBuffer' => '',
'RecordAudio' => 0,
'Method' => 'raw',
'GroupIds' => array(),

View File

@ -774,7 +774,7 @@ switch ( $tab ) {
<label for="newMonitor[V4LMultiBuffer]1">Yes</label>
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]0" value="0" <?php echo ( $monitor->V4LMultiBuffer() == '0' ? 'checked="checked"' : '' ) ?>/>
<label for="newMonitor[V4LMultiBuffer]0">No</label>
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]" value="" <?php echo ( $monitor->V4LMultiBuffer() ? 'checked="checked"' : '' ) ?>/>
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]" value="" <?php echo ( $monitor->V4LMultiBuffer() == '' ? 'checked="checked"' : '' ) ?>/>
<label for="newMonitor[V4LMultiBuffer]">Use Config Value</label>
</td></tr>
<tr><td><?php echo translate('V4LCapturesPerFrame') ?></td><td><input type="number" name="newMonitor[V4LCapturesPerFrame]" value="<?php echo validHtmlStr($monitor->V4LCapturesPerFrame()); ?>"/></td></tr>