projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added 'trailing text' for options that SM builds, which is placed after a text input...
[squirrelmail.git]
/
functions
/
options.php
diff --git
a/functions/options.php
b/functions/options.php
index 3a3ed2ee247ea300606aa1ef97f9de6bb6ef9819..7fadcbc6165a23f05cbd16d95928765fa1820ed1 100644
(file)
--- a/
functions/options.php
+++ b/
functions/options.php
@@
-62,6
+62,7
@@
class SquirrelOption {
var $type;
var $refresh_level;
var $size;
var $type;
var $refresh_level;
var $size;
+ var $trailing_text;
var $comment;
var $script;
var $post_script;
var $comment;
var $script;
var $post_script;
@@
-83,6
+84,7
@@
class SquirrelOption {
$this->refresh_level = $refresh_level;
$this->possible_values = $possible_values;
$this->size = SMOPT_SIZE_MEDIUM;
$this->refresh_level = $refresh_level;
$this->possible_values = $possible_values;
$this->size = SMOPT_SIZE_MEDIUM;
+ $this->trailing_text = '';
$this->comment = '';
$this->script = '';
$this->post_script = '';
$this->comment = '';
$this->script = '';
$this->post_script = '';
@@
-124,6
+126,11
@@
class SquirrelOption {
$this->size = $size;
}
$this->size = $size;
}
+ /* Set the trailing_text for this option. */
+ function setTrailingText($trailing_text) {
+ $this->trailing_text = $trailing_text;
+ }
+
/* Set the comment for this option. */
function setComment($comment) {
$this->comment = $comment;
/* Set the comment for this option. */
function setComment($comment) {
$this->comment = $comment;
@@
-210,7
+217,7
@@
class SquirrelOption {
$result = "<input type=\"text\" name=\"new_$this->name\" value=\"" .
htmlspecialchars($this->value) .
$result = "<input type=\"text\" name=\"new_$this->name\" value=\"" .
htmlspecialchars($this->value) .
- "\" size=\"$width\" $this->script />\n";
+ "\" size=\"$width\" $this->script />
$this->trailing_text
\n";
return ($result);
}
return ($result);
}
@@
-237,7
+244,7
@@
class SquirrelOption {
}
/* Close the select tag and return our happy result. */
}
/* Close the select tag and return our happy result. */
- $result .= "</select>\n";
+ $result .= "</select>
$this->trailing_text
\n";
return ($result);
}
return ($result);
}
@@
-436,6
+443,11
@@
function create_option_groups($optgrps, $optvals) {
$next_option->setSize($optset['size']);
}
$next_option->setSize($optset['size']);
}
+ /* If provided, set the trailing_text for this option. */
+ if (isset($optset['trailing_text'])) {
+ $next_option->setTrailingText($optset['trailing_text']);
+ }
+
/* If provided, set the comment for this option. */
if (isset($optset['comment'])) {
$next_option->setComment($optset['comment']);
/* If provided, set the comment for this option. */
if (isset($optset['comment'])) {
$next_option->setComment($optset['comment']);