From f2447af2a24ebc616a2059c2e761782181cf048c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 4 Aug 2007 09:18:40 +0200 Subject: Space between label and input element for new form handler darcs-hash:20070804071840-7ad00-2b1c11bc7890ab5f145e4d0545e962c144fb460a.gz --- inc/form.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/inc/form.php b/inc/form.php index fe5fc1152..b011729ea 100644 --- a/inc/form.php +++ b/inc/form.php @@ -18,9 +18,9 @@ require_once(DOKU_INC.'inc/html.php'); * When printed, the form class calls functions named 'form_$type' for each * element it contains. * - * Standard practice is for non-attribute keys in a pseudo-element to start + * Standard practice is for non-attribute keys in a pseudo-element to start * with '_'. Other keys are HTML attributes that will be included in the element - * tag. That way, the element output functions can pass the pseudo-element + * tag. That way, the element output functions can pass the pseudo-element * directly to buildAttributes. * * See the form_make* functions later in this file. @@ -99,7 +99,7 @@ class Doku_Form { * formText() before printing. * * @param string $name Field name. - * @param string $value Field value. If null, remove a previously added field. + * @param string $value Field value. If null, remove a previously added field. * @author Tom N Harris */ function addHidden($name, $value) { @@ -114,7 +114,7 @@ class Doku_Form { * * Appends a content element to the form. * The element can be either a pseudo-tag or string. - * If string, it is printed without escaping special chars. * + * If string, it is printed without escaping special chars. * * * @param string $elem Pseudo-tag or string to add to the form. * @author Tom N Harris @@ -207,7 +207,7 @@ class Doku_Form { * getElementAt * * Returns a reference to the element at a position. - * A position out-of-bounds will return either the + * A position out-of-bounds will return either the * first (underflow) or last (overflow) element. * * @param int $pos 0-based index @@ -237,7 +237,7 @@ class Doku_Form { print '>'.NL; if (!empty($this->_hidden)) { print '
'; - foreach ($this->_hidden as $name=>$value) + foreach ($this->_hidden as $name=>$value) print form_hidden(array('name'=>$name, 'value'=>$value)); print '
'.NL; } @@ -455,7 +455,7 @@ function form_makeRadioField($name, $value='1', $label=null, $id='', $class='', * The list of values can be strings, arrays of (value,text), * or an associative array with the values as keys and labels as values. * An item is selected by supplying its value or integer index. - * If the list of values is an associative array, the selected item must be + * If the list of values is an associative array, the selected item must be * a string. * * @author Tom N Harris @@ -644,7 +644,7 @@ function form_field($attrs) { $s = ''; + $s .= ' '; if (preg_match('/(^| )block($| )/', $attrs['_class'])) $s .= '
'; return $s; @@ -664,7 +664,7 @@ function form_fieldright($attrs) { $s = ''; + $s .= ' '.$attrs['_text'].''; if (preg_match('/(^| )block($| )/', $attrs['_class'])) $s .= '
'; return $s; @@ -683,7 +683,7 @@ function form_fieldright($attrs) { function form_textfield($attrs) { $s = ''; if (preg_match('/(^| )block($| )/', $attrs['_class'])) $s .= '
'; @@ -703,7 +703,7 @@ function form_textfield($attrs) { function form_passwordfield($attrs) { $s = ''; if (preg_match('/(^| )block($| )/', $attrs['_class'])) $s .= '
'; @@ -724,7 +724,7 @@ function form_checkboxfield($attrs) { $s = ''; + $s .= ' '.$attrs['_text'].''; if (preg_match('/(^| )block($| )/', $attrs['_class'])) $s .= '
'; return $s; @@ -744,7 +744,7 @@ function form_radiofield($attrs) { $s = ''; + $s .= ' '.$attrs['_text'].''; if (preg_match('/(^| )block($| )/', $attrs['_class'])) $s .= '
'; return $s; @@ -768,7 +768,7 @@ function form_menufield($attrs) { $s = '