/**
* options.php
*
- * Copyright (c) 1999-2003 The SquirrelMail Project Team
+ * Copyright (c) 1999-2004 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* Functions needed to display the options pages.
*
- * $Id$
+ * @version $Id$
* @package squirrelmail
*/
/* If this value is the current value, select it. */
if ($real_value == $this->value) {
- $new_option .= ' selected';
+ $new_option .= ' selected=""';
}
/* Add the display value to our option string. */
function createWidget_Boolean() {
/* Do the whole current value thing. */
if ($this->value != SMPREF_NO) {
- $yes_chk = ' checked';
+ $yes_chk = ' checked=""';
$no_chk = '';
} else {
$yes_chk = '';
- $no_chk = ' checked';
+ $no_chk = ' checked=""';
}
/* Build the yes choice. */
- $yes_option = '<input type="radio" name="new_' . $this->name
- . '" value="' . SMPREF_YES . "\"$yes_chk $this->script> "
- . _("Yes");
+ $yes_option = '<input type="radio" id="new_' . $this->name . '_yes" '
+ . 'name="new_' . $this->name . '" value="' . SMPREF_YES . '"'
+ . $yes_chk . ' ' . $this->script . '> '
+ . '<label for="new_'.$this->name.'_yes">' . _("Yes") . '</label>';
/* Build the no choice. */
- $no_option = '<input type="radio" name="new_' . $this->name
- . '" value="' . SMPREF_NO . "\"$no_chk $this->script> "
- . _("No");
+ $no_option = '<input type="radio" id="new_' . $this->name . '_no" '
+ . 'name="new_' . $this->name . '" value="' . SMPREF_NO . '"'
+ . $no_chk . ' ' . $this->script . '> '
+ . '<label for="new_'.$this->name.'_no">' . _("No") . '</label>';
/* Build and return the combined "boolean widget". */
$result = "$yes_option $no_option";
$optset['name'],
$optset['caption'],
$optset['type'],
- $optset['refresh'],
+ (isset($optset['refresh']) ? $optset['refresh'] : SMOPT_REFRESH_NONE),
(isset($optset['initial_value']) ? $optset['initial_value'] : ''),
$optset['posvals']
);
$optset['name'],
$optset['caption'],
$optset['type'],
- $optset['refresh'],
+ (isset($optset['refresh']) ? $optset['refresh'] : SMOPT_REFRESH_NONE),
(isset($optset['initial_value']) ? $optset['initial_value'] : '')
);
}
function OptionSubmit( $name ) {
echo html_tag( 'tr',
- html_tag( 'td', ' ', 'left', '', 'colspan="2"' ) .
- html_tag( 'td', '<input type="submit" value="' . _("Submit") . '" name="' . $name . '">', 'left', '', 'colspan="2"' )
+ html_tag( 'td', '<input type="submit" value="' . _("Submit") . '" name="' . $name . '"> ', 'right', '', 'colspan="2"' )
) . "\n";
}