Slight revamp
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2782 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
61089eeeb1
commit
57f8127498
|
@ -172,17 +172,17 @@ else
|
||||||
$configCat = $configCats[$tab];
|
$configCat = $configCats[$tab];
|
||||||
foreach ( $configCat as $name=>$value )
|
foreach ( $configCat as $name=>$value )
|
||||||
{
|
{
|
||||||
$optionPromptIndex = preg_replace( '/^ZM_/', '', $name );
|
$shortName = preg_replace( '/^ZM_/', '', $name );
|
||||||
$optionPromptText = !empty($OLANG[$optionPromptIndex])?$OLANG[$optionPromptIndex]:$config[$name]['Prompt'];
|
$optionPromptText = !empty($OLANG[$shortName])?$OLANG[$shortName]:$value['Prompt'];
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $value['Name'] ?></td>
|
<td><?= $shortName ?></td>
|
||||||
<td><?= validHtmlStr($optionPromptText) ?> (<?= makePopupLink( '?view=optionhelp&option='.$value['Name'], 'zmOptionHelp', 'optionhelp', '?' ) ?>)</td>
|
<td><?= validHtmlStr($optionPromptText) ?> (<?= makePopupLink( '?view=optionhelp&option='.$name, 'zmOptionHelp', 'optionhelp', '?' ) ?>)</td>
|
||||||
<?php
|
<?php
|
||||||
if ( $value['Type'] == "boolean" )
|
if ( $value['Type'] == "boolean" )
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<td><input type="checkbox" id="<?= $value['Name'] ?>" name="newConfig[<?= $value['Name'] ?>]" value="1"<?php if ( $value['Value'] ) { ?> checked="checked"<?php } ?><?= $canEdit?'':' disabled="disabled"' ?>/></td>
|
<td><input type="checkbox" id="<?= $name ?>" name="newConfig[<?= $name ?>]" value="1"<?php if ( $value['Value'] ) { ?> checked="checked"<?php } ?><?= $canEdit?'':' disabled="disabled"' ?>/></td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
elseif ( preg_match( "/\|/", $value['Hint'] ) )
|
elseif ( preg_match( "/\|/", $value['Hint'] ) )
|
||||||
|
@ -194,7 +194,7 @@ else
|
||||||
if ( count( $options ) > 3 )
|
if ( count( $options ) > 3 )
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<select name="newConfig[<?= $value['Name'] ?>] ?>"<?= $canEdit?'':' disabled="disabled"' ?>>
|
<select name="newConfig[<?= $name ?>] ?>"<?= $canEdit?'':' disabled="disabled"' ?>>
|
||||||
<?php
|
<?php
|
||||||
foreach ( $options as $option )
|
foreach ( $options as $option )
|
||||||
{
|
{
|
||||||
|
@ -211,7 +211,7 @@ else
|
||||||
foreach ( $options as $option )
|
foreach ( $options as $option )
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<span><input type="radio" id="<?= $value['Name'].'_'.preg_replace( '/[^a-zA-Z0-9]/', '', $option ) ?>" name="newConfig[<?= $value['Name'] ?>]" value="<?= $option ?>"<?php if ( $value['Value'] == $option ) { ?> checked="checked"<?php } ?><?= $canEdit?'':' disabled="disabled"' ?>/> <?= $option ?></span>
|
<span><input type="radio" id="<?= $name.'_'.preg_replace( '/[^a-zA-Z0-9]/', '', $option ) ?>" name="newConfig[<?= $name ?>]" value="<?= $option ?>"<?php if ( $value['Value'] == $option ) { ?> checked="checked"<?php } ?><?= $canEdit?'':' disabled="disabled"' ?>/> <?= $option ?></span>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -222,31 +222,31 @@ else
|
||||||
elseif ( $value['Type'] == "text" )
|
elseif ( $value['Type'] == "text" )
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<td><textarea id="<?= $value['Name'] ?>" name="newConfig[<?= $value['Name'] ?>]" rows="5" cols="40"<?= $canEdit?'':' disabled="disabled"' ?>><?= validHtmlStr($value['Value']) ?></textarea></td>
|
<td><textarea id="<?= $name ?>" name="newConfig[<?= $name ?>]" rows="5" cols="40"<?= $canEdit?'':' disabled="disabled"' ?>><?= validHtmlStr($value['Value']) ?></textarea></td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
elseif ( $value['Type'] == "integer" )
|
elseif ( $value['Type'] == "integer" )
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<td><input type="text" id="<?= $value['Name'] ?>" name="newConfig[<?= $value['Name'] ?>]" value="<?= validHtmlStr($value['Value']) ?>" class="small"<?= $canEdit?'':' disabled="disabled"' ?>/></td>
|
<td><input type="text" id="<?= $name ?>" name="newConfig[<?= $name ?>]" value="<?= validHtmlStr($value['Value']) ?>" class="small"<?= $canEdit?'':' disabled="disabled"' ?>/></td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
elseif ( $value['Type'] == "hexadecimal" )
|
elseif ( $value['Type'] == "hexadecimal" )
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<td><input type="text" id="<?= $value['Name'] ?>" name="newConfig[<?= $value['Name'] ?>]" value="<?= validHtmlStr($value['Value']) ?>" class="medium"<?= $canEdit?'':' disabled="disabled"' ?>/></td>
|
<td><input type="text" id="<?= $name ?>" name="newConfig[<?= $name ?>]" value="<?= validHtmlStr($value['Value']) ?>" class="medium"<?= $canEdit?'':' disabled="disabled"' ?>/></td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
elseif ( $value['Type'] == "decimal" )
|
elseif ( $value['Type'] == "decimal" )
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<td><input type="text" id="<?= $value['Name'] ?>" name="newConfig[<?= $value['Name'] ?>]" value="<?= validHtmlStr($value['Value']) ?>" class="small"<?= $canEdit?'':' disabled="disabled"' ?>/></td>
|
<td><input type="text" id="<?= $name ?>" name="newConfig[<?= $name ?>]" value="<?= validHtmlStr($value['Value']) ?>" class="small"<?= $canEdit?'':' disabled="disabled"' ?>/></td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<td><input type="text" id="<?= $value['Name'] ?>" name="newConfig[<?= $value['Name'] ?>]" value="<?= validHtmlStr($value['Value']) ?>" class="large"<?= $canEdit?'':' disabled="disabled"' ?>/></td>
|
<td><input type="text" id="<?= $name ?>" name="newConfig[<?= $name ?>]" value="<?= validHtmlStr($value['Value']) ?>" class="large"<?= $canEdit?'':' disabled="disabled"' ?>/></td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue