return ($result);
}
-/**
- * @param array $option_groups
- */
-function print_option_groups($option_groups) {
- /* Print each option group. */
- foreach ($option_groups as $next_optgrp) {
- /* If it is not blank, print the name for this option group. */
- if ($next_optgrp['name'] != '') {
- echo html_tag( 'tr', "\n".
- html_tag( 'td',
- '<b>' . $next_optgrp['name'] . '</b>' ,
- 'center' ,'', 'valign="middle" colspan="2" style="white-space: nowrap;"' )
- ) ."\n";
- }
-
- /* Print each option in this option group. */
- foreach ($next_optgrp['options'] as $option) {
- if ($option->type != SMOPT_TYPE_HIDDEN) {
- echo html_tag( 'tr', "\n".
- html_tag( 'td', $option->caption . ':', 'right' ,'', 'valign="middle"' ) .
- html_tag( 'td', $option->createHTMLWidget(), 'left' )
- ) ."\n";
- } else {
- echo $option->createHTMLWidget();
- }
- }
-
- /* Print an empty row after this option group. */
- echo html_tag( 'tr',
- html_tag( 'td', ' ', 'left', '', 'colspan="2"' )
- ) . "\n";
- }
-}
-
-/**
- * Create submit button inside table row.
- * @param string $name
- */
-function OptionSubmit( $name ) {
- echo html_tag( 'tr',
- html_tag( 'td', '<input type="submit" value="' . _("Submit") . '" name="' . $name . '" /> ', 'right', '', 'colspan="2"' )
- ) . "\n";
-}
-
// vim: et ts=4
/**
* The variables below should not be needed by the template since all plugin
* hooks are called here, not in the template. If we find otherwise, these
- * variables can be passed to the template. Commenting out for not.
+ * variables can be passed to the template. Commenting out for now.
*/
/*
$oTemplate->assign('max_refresh', isset($max_refresh) ? $max_refresh : NULL);
* END comment block
*/
+ $oTemplate->assign('submit_name', $submit_name);
$oTemplate->display('options.tpl');
+//FIXME: need to remove HTML from here!
echo " </td>\n" .
" </tr>\n";
do_hook($inside_hook_name);
}
- /* Spit out a submit button. */
- OptionSubmit($submit_name);
+//FIXME: need to remove HTML from here!
echo "</table>\n" .
"</form>\n";
}
$oTemplate->display('footer.tpl');
-?>
\ No newline at end of file
+?>