Created
April 1, 2012 06:23
-
-
Save bovine/2271967 to your computer and use it in GitHub Desktop.
Zoneminder 1.25.0 patch: display configuration help in a tooltip or alert box rather than a new window. make configuration radio buttons easier to click by using labels.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- web/skins/classic/views/options.php (revision 3648) | |
+++ web/skins/classic/views/options.php (working copy) | |
@@ -211,10 +211,13 @@ | |
{ | |
$shortName = preg_replace( '/^ZM_/', '', $name ); | |
$optionPromptText = !empty($OLANG[$shortName])?$OLANG[$shortName]:$value['Prompt']; | |
+ | |
+ $optionHelpText = !empty($OLANG[$shortName])?$OLANG[$shortName]:$config[$name]['Help']; | |
+ $optionHelpText = preg_replace( "/~~/", "\n", $optionHelpText ); | |
?> | |
<tr> | |
<td><?= $shortName ?></td> | |
- <td><?= validHtmlStr($optionPromptText) ?> (<?= makePopupLink( '?view=optionhelp&option='.$name, 'zmOptionHelp', 'optionhelp', '?' ) ?>)</td> | |
+ <td><?= validHtmlStr($optionPromptText) ?> (<a href="#" onclick="alert(this.getAttribute('title'))" title="<?= htmlentities($optionHelpText) ?>)">?</a>)</td> | |
<?php | |
if ( $value['Type'] == "boolean" ) | |
{ | |
@@ -266,7 +269,7 @@ | |
$optionLabel = $optionValue = $option; | |
} | |
?> | |
- <span><input type="radio" id="<?= $name.'_'.preg_replace( '/[^a-zA-Z0-9]/', '', $optionValue ) ?>" name="newConfig[<?= $name ?>]" value="<?= $optionValue ?>"<?php if ( $value['Value'] == $optionValue ) { ?> checked="checked"<?php } ?><?= $canEdit?'':' disabled="disabled"' ?>/> <?= htmlspecialchars($optionLabel) ?></span> | |
+ <span><input type="radio" id="<?= $name.'_'.preg_replace( '/[^a-zA-Z0-9]/', '', $optionValue ) ?>" name="newConfig[<?= $name ?>]" value="<?= $optionValue ?>"<?php if ( $value['Value'] == $optionValue ) { ?> checked="checked"<?php } ?><?= $canEdit?'':' disabled="disabled"' ?>/> <label for="<?= $name.'_'.preg_replace( '/[^a-zA-Z0-9]/', '', $optionValue ) ?>"><?= htmlspecialchars($optionLabel) ?></label></span> | |
<?php | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment