Split 'Local' and 'Remote' tabs into their own files
This commit is contained in:
parent
00427c2e41
commit
2f254eefef
|
@ -62,4 +62,82 @@
|
|||
<?php
|
||||
}
|
||||
?>
|
||||
</div> <!-- End .col-md-6 -->
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for=""><?= "Target Colorspace" ?></label>
|
||||
<select class="form-control" name="newMonitor[Colours]"><?php foreach ( $Colours as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Colours'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for=""><?= $SLANG['CaptureWidth'] ?> (<?= $SLANG['Pixels'] ?>)</label>
|
||||
<input class="form-control" type="number" name="newMonitor[Width]" value="<?= validHtmlStr($newMonitor['Width']) ?>" size="4" onkeyup="updateMonitorDimensions(this);"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for=""><?= $SLANG['CaptureHeight'] ?> (<?= $SLANG['Pixels'] ?>)</label>
|
||||
<input class="form-control" type="number" name="newMonitor[Height]" value="<?= validHtmlStr($newMonitor['Height']) ?>" size="4" onkeyup="updateMonitorDimensions(this);"/>
|
||||
</div>
|
||||
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="preserveAspectRatio" value="1"/>
|
||||
<?= $SLANG['PreserveAspect'] ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for=""><?= $SLANG['Orientation'] ?></label>
|
||||
<select class="form-control" name="newMonitor[Orientation]"><?php foreach ( $orientations as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Orientation'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select>
|
||||
</div>
|
||||
</div> <!-- End .col-md-6 -->
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
<div ng-show="sourceType == 'Remote'">
|
||||
<div class="form-group">
|
||||
<label for=""><?= $SLANG['RemoteProtocol'] ?></label>
|
||||
<select name="newMonitor[Protocol]" id="newMonitor[Protocol]" onchange="updateMethods( this )">
|
||||
<option value="http">HTTP</option>
|
||||
<option value="rtsp">RTSP</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for=""><?= $SLANG['RemoteMethod'] ?></label>
|
||||
<?php
|
||||
if ( empty($newMonitor['Protocol']) || $newMonitor['Protocol'] == "http" )
|
||||
{
|
||||
?>
|
||||
<?= buildSelect( "newMonitor[Method]", $httpMethods ); ?>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<?= buildSelect( "newMonitor[Method]", $rtspMethods ); ?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><?= $SLANG['RemoteHostName'] ?></label>
|
||||
<input type="text" class="form-control" name="newMonitor[Host]" value="<?= validHtmlStr($newMonitor['Host']) ?>" size="36"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for=""><?= $SLANG['RemoteHostPort'] ?></label>
|
||||
<input type="number" class="form-control" name="newMonitor[Port]" value="<?= validHtmlStr($newMonitor['Port']) ?>" size="6"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><?= $SLANG['RemoteHostPath'] ?></label>
|
||||
<input type="text" class="form-control" name="newMonitor[Path]" value="<?= validHtmlStr($newMonitor['Path']) ?>" size="36"/>
|
||||
</div>
|
||||
</div> <!-- End Remote -->
|
||||
|
||||
<?php include("tab-monitor-local.php"); ?>
|
||||
|
||||
</div> <!-- End .col-md-4 -->
|
||||
</div> <!-- End .row -->
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
<div ng-show="sourceType == 'Local'">
|
||||
|
||||
<div class="form-group">
|
||||
<label for=""><?= $SLANG['DevicePath'] ?></label>
|
||||
<input type="text" class="form-control" name="newMonitor[Device]" value="<?= validHtmlStr($newMonitor['Device']) ?>" size="24"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for=""><?= $SLANG['CaptureMethod'] ?></label>
|
||||
<?= buildSelect( "newMonitor[Method]", $localMethods, "submitTab( '$tab' )" ); ?>
|
||||
</div>
|
||||
<?php
|
||||
if ( ZM_HAS_V4L1 && $newMonitor['Method'] == 'v4l1' )
|
||||
{
|
||||
?>
|
||||
|
||||
<div class="form-group">
|
||||
<label for=""><?= $SLANG['DeviceChannel'] ?></label>
|
||||
<select name="newMonitor[Channel]"><?php foreach ( $v4l1DeviceChannels as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Channel'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for=""><?= $SLANG['DeviceFormat'] ?></label>
|
||||
<select name="newMonitor[Format]"><?php foreach ( $v4l1DeviceFormats as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Format'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for=""><?= $SLANG['CapturePalette'] ?></label>
|
||||
<select name="newMonitor[Palette]"><?php foreach ( $v4l1LocalPalettes as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Palette'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
|
||||
<div class="form-group">
|
||||
<label for=""><?= $SLANG['DeviceChannel'] ?></label>
|
||||
<select name="newMonitor[Channel]"><?php foreach ( $v4l2DeviceChannels as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Channel'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for=""><?= $SLANG['DeviceFormat'] ?></label>
|
||||
<select name="newMonitor[Format]"><?php foreach ( $v4l2DeviceFormats as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Format'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for=""><?= $SLANG['CapturePalette'] ?></label>
|
||||
<select name="newMonitor[Palette]"><?php foreach ( $v4l2LocalPalettes as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Palette'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="radio">
|
||||
<?= $SLANG['V4LMultiBuffer'] ?>
|
||||
|
||||
<label>
|
||||
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]1" value="1" <?php echo ( $newMonitor['V4LMultiBuffer'] == 1 ? 'checked="checked"' : '' ) ?>/>
|
||||
Yes
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]0" value="0" <?php echo ( $newMonitor['V4LMultiBuffer'] == 0 ? 'checked="checked"' : '' ) ?>/>
|
||||
No
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]" value="" <?php echo ( empty($newMonitor['V4LMultiBuffer']) ? 'checked="checked"' : '' ) ?>/>
|
||||
Use Config Value
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for=""><?= $SLANG['V4LCapturesPerFrame'] ?></label>
|
||||
<input type="number" name="newMonitor[V4LCapturesPerFrame]" value="<?php echo $newMonitor['V4LCapturesPerFrame'] ?>"/>
|
||||
</div>
|
||||
</div> <!-- End local -->
|
|
@ -3,60 +3,9 @@
|
|||
<?php
|
||||
if ( ZM_HAS_V4L && $newMonitor['Type'] == "Local" )
|
||||
{
|
||||
?>
|
||||
<tr><td><?= $SLANG['DevicePath'] ?></td><td><input type="text" name="newMonitor[Device]" value="<?= validHtmlStr($newMonitor['Device']) ?>" size="24"/></td></tr>
|
||||
<tr><td><?= $SLANG['CaptureMethod'] ?></td><td><?= buildSelect( "newMonitor[Method]", $localMethods, "submitTab( '$tab' )" ); ?></td></tr>
|
||||
<?php
|
||||
if ( ZM_HAS_V4L1 && $newMonitor['Method'] == 'v4l1' )
|
||||
{
|
||||
?>
|
||||
<tr><td><?= $SLANG['DeviceChannel'] ?></td><td><select name="newMonitor[Channel]"><?php foreach ( $v4l1DeviceChannels as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Channel'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select></td></tr>
|
||||
<tr><td><?= $SLANG['DeviceFormat'] ?></td><td><select name="newMonitor[Format]"><?php foreach ( $v4l1DeviceFormats as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Format'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select></td></tr>
|
||||
<tr><td><?= $SLANG['CapturePalette'] ?></td><td><select name="newMonitor[Palette]"><?php foreach ( $v4l1LocalPalettes as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Palette'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select></td></tr>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<tr><td><?= $SLANG['DeviceChannel'] ?></td><td><select name="newMonitor[Channel]"><?php foreach ( $v4l2DeviceChannels as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Channel'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select></td></tr>
|
||||
<tr><td><?= $SLANG['DeviceFormat'] ?></td><td><select name="newMonitor[Format]"><?php foreach ( $v4l2DeviceFormats as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Format'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select></td></tr>
|
||||
<tr><td><?= $SLANG['CapturePalette'] ?></td><td><select name="newMonitor[Palette]"><?php foreach ( $v4l2LocalPalettes as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Palette'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select></td></tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr><td><?= $SLANG['V4LMultiBuffer'] ?></td><td>
|
||||
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]1" value="1" <?php echo ( $newMonitor['V4LMultiBuffer'] == 1 ? 'checked="checked"' : '' ) ?>/>
|
||||
<label for="newMonitor[V4LMultiBuffer]1">Yes</label>
|
||||
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]0" value="0" <?php echo ( $newMonitor['V4LMultiBuffer'] == 0 ? 'checked="checked"' : '' ) ?>/>
|
||||
<label for="newMonitor[V4LMultiBuffer]0">No</label>
|
||||
<input type="radio" name="newMonitor[V4LMultiBuffer]" id="newMonitor[V4LMultiBuffer]" value="" <?php echo ( empty($newMonitor['V4LMultiBuffer']) ? 'checked="checked"' : '' ) ?>/>
|
||||
<label for="newMonitor[V4LMultiBuffer]">Use Config Value</label>
|
||||
</td></tr>
|
||||
<tr><td><?= $SLANG['V4LCapturesPerFrame'] ?></td><td><input type="number" name="newMonitor[V4LCapturesPerFrame]" value="<?php echo $newMonitor['V4LCapturesPerFrame'] ?>"/></td></tr>
|
||||
<?php
|
||||
}
|
||||
elseif ( $newMonitor['Type'] == "Remote" )
|
||||
{
|
||||
?>
|
||||
<tr><td><?= $SLANG['RemoteProtocol'] ?></td><td><?= buildSelect( "newMonitor[Protocol]", $remoteProtocols, "updateMethods( this )" ); ?></td></tr>
|
||||
<?php
|
||||
if ( empty($newMonitor['Protocol']) || $newMonitor['Protocol'] == "http" )
|
||||
{
|
||||
?>
|
||||
<tr><td><?= $SLANG['RemoteMethod'] ?></td><td><?= buildSelect( "newMonitor[Method]", $httpMethods ); ?></td></tr>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<tr><td><?= $SLANG['RemoteMethod'] ?></td><td><?= buildSelect( "newMonitor[Method]", $rtspMethods ); ?></td></tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr><td><?= $SLANG['RemoteHostName'] ?></td><td><input type="text" name="newMonitor[Host]" value="<?= validHtmlStr($newMonitor['Host']) ?>" size="36"/></td></tr>
|
||||
<tr><td><?= $SLANG['RemoteHostPort'] ?></td><td><input type="text" name="newMonitor[Port]" value="<?= validHtmlStr($newMonitor['Port']) ?>" size="6"/></td></tr>
|
||||
<tr><td><?= $SLANG['RemoteHostPath'] ?></td><td><input type="text" name="newMonitor[Path]" value="<?= validHtmlStr($newMonitor['Path']) ?>" size="36"/></td></tr>
|
||||
<?php
|
||||
}
|
||||
elseif ( $newMonitor['Type'] == "File" )
|
||||
{
|
||||
|
@ -81,11 +30,6 @@
|
|||
<?php
|
||||
}
|
||||
?>
|
||||
<tr><td><?= "Target Colorspace" ?></td><td><select name="newMonitor[Colours]"><?php foreach ( $Colours as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Colours'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select></td></tr>
|
||||
<tr><td><?= $SLANG['CaptureWidth'] ?> (<?= $SLANG['Pixels'] ?>)</td><td><input type="text" name="newMonitor[Width]" value="<?= validHtmlStr($newMonitor['Width']) ?>" size="4" onkeyup="updateMonitorDimensions(this);"/></td></tr>
|
||||
<tr><td><?= $SLANG['CaptureHeight'] ?> (<?= $SLANG['Pixels'] ?>)</td><td><input type="text" name="newMonitor[Height]" value="<?= validHtmlStr($newMonitor['Height']) ?>" size="4" onkeyup="updateMonitorDimensions(this);"/></td></tr>
|
||||
<tr><td><?= $SLANG['PreserveAspect'] ?></td><td><input type="checkbox" name="preserveAspectRatio" value="1"/></td></tr>
|
||||
<tr><td><?= $SLANG['Orientation'] ?></td><td><select name="newMonitor[Orientation]"><?php foreach ( $orientations as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $newMonitor['Orientation'] ) { ?> selected="selected"<?php } ?>><?= $name ?></option><?php } ?></select></td></tr>
|
||||
<?php
|
||||
if ( $newMonitor['Type'] == "Local" )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue