Lines Matching defs:attrs

343  * @param   array   $attrs  Optional attributes.
348 function form_makeTag($tag, $attrs = array())
351 return array_merge($elem, $attrs);
361 * @param array $attrs Optional attributes.
366 function form_makeOpenTag($tag, $attrs = array())
369 return array_merge($elem, $attrs);
397 * @param array $attrs Optional attributes.
402 function form_makeWikiText($text, $attrs = array())
406 return array_merge($elem, $attrs);
419 * @param array $attrs Optional attributes.
424 function form_makeButton($type, $act, $value = '', $attrs = array())
429 if (!empty($attrs['accesskey']) && empty($attrs['title'])) {
430 $attrs['title'] = $value . ' [' . strtoupper($attrs['accesskey']) . ']';
432 return array_merge($elem, $attrs);
449 * @param array $attrs Optional attributes.
454 function form_makeField($type, $name, $value = '', $label = null, $id = '', $class = '', $attrs = array())
459 return array_merge($elem, $attrs);
477 * @param array $attrs
481 function form_makeFieldRight($type, $name, $value = '', $label = null, $id = '', $class = '', $attrs = array())
486 return array_merge($elem, $attrs);
502 * @param array $attrs
506 function form_makeTextField($name, $value = '', $label = null, $id = '', $class = '', $attrs = array())
511 return array_merge($elem, $attrs);
527 * @param array $attrs
531 function form_makePasswordField($name, $label = null, $id = '', $class = '', $attrs = array())
536 return array_merge($elem, $attrs);
551 * @param array $attrs
555 function form_makeFileField($name, $label = null, $id = '', $class = '', $attrs = array())
560 return array_merge($elem, $attrs);
578 * @param array $attrs
582 function form_makeCheckboxField($name, $value = '1', $label = null, $id = '', $class = '', $attrs = array())
588 return array_merge($elem, $attrs);
604 * @param array $attrs
608 function form_makeRadioField($name, $value = '1', $label = null, $id = '', $class = '', $attrs = array())
614 return array_merge($elem, $attrs);
638 * @param array $attrs Optional attributes.
641 function form_makeMenuField($name, $values, $selected = '', $label = null, $id = '', $class = '', $attrs = array())
662 return array_merge($elem, $attrs);
684 * @param array $attrs Optional attributes.
687 function form_makeListboxField($name, $values, $selected = '', $label = null, $id = '', $class = '', $attrs = array())
715 return array_merge($elem, $attrs);
727 * @param array $attrs attributes
730 function form_tag($attrs)
732 return '<' . $attrs['_tag'] . ' ' . buildAttributes($attrs, true) . '/>';
744 * @param array $attrs attributes
747 function form_opentag($attrs)
749 return '<' . $attrs['_tag'] . ' ' . buildAttributes($attrs, true) . '>';
761 * @param array $attrs attributes
764 function form_closetag($attrs)
766 return '</' . $attrs['_tag'] . '>';
778 * @param array $attrs attributes
781 function form_openfieldset($attrs)
783 $s = '<fieldset ' . buildAttributes($attrs, true) . '>';
784 if (!is_null($attrs['_legend'])) $s .= '<legend>' . $attrs['_legend'] . '</legend>';
812 * @param array $attrs attributes
815 function form_hidden($attrs)
817 return '<input type="hidden" name="' . $attrs['name'] . '" value="' . formText($attrs['value']) . '" />';
829 * @param array $attrs attributes
832 function form_wikitext($attrs)
835 unset($attrs['name']);
836 unset($attrs['id']);
838 . buildAttributes($attrs, true) . '>' . DOKU_LF
839 . formText($attrs['_text'])
852 * @param array $attrs attributes
855 function form_button($attrs)
857 $p = (!empty($attrs['_action'])) ? 'name="do[' . $attrs['_action'] . ']" ' : '';
858 $value = $attrs['value'];
859 unset($attrs['value']);
860 return '<button ' . $p . buildAttributes($attrs, true) . '>' . $value . '</button>';
873 * @param array $attrs attributes
876 function form_field($attrs)
879 if ($attrs['_class']) $s .= ' class="' . $attrs['_class'] . '"';
880 if (!empty($attrs['id'])) $s .= ' for="' . $attrs['id'] . '"';
881 $s .= '><span>' . $attrs['_text'] . '</span>';
882 $s .= ' <input ' . buildAttributes($attrs, true) . ' /></label>';
883 if (preg_match('/(^| )block($| )/', $attrs['_class']))
898 * @param array $attrs attributes
901 function form_fieldright($attrs)
904 if ($attrs['_class']) $s .= ' class="' . $attrs['_class'] . '"';
905 if (!empty($attrs['id'])) $s .= ' for="' . $attrs['id'] . '"';
906 $s .= '><input ' . buildAttributes($attrs, true) . ' />';
907 $s .= ' <span>' . $attrs['_text'] . '</span></label>';
908 if (preg_match('/(^| )block($| )/', $attrs['_class']))
923 * @param array $attrs attributes
926 function form_textfield($attrs)
929 unset($attrs['type']);
931 if ($attrs['_class']) $s .= ' class="' . $attrs['_class'] . '"';
932 if (!empty($attrs['id'])) $s .= ' for="' . $attrs['id'] . '"';
933 $s .= '><span>' . $attrs['_text'] . '</span> ';
934 $s .= '<input type="text" ' . buildAttributes($attrs, true) . ' /></label>';
935 if (preg_match('/(^| )block($| )/', $attrs['_class']))
950 * @param array $attrs attributes
953 function form_passwordfield($attrs)
956 unset($attrs['type']);
958 if ($attrs['_class']) $s .= ' class="' . $attrs['_class'] . '"';
959 if (!empty($attrs['id'])) $s .= ' for="' . $attrs['id'] . '"';
960 $s .= '><span>' . $attrs['_text'] . '</span> ';
961 $s .= '<input type="password" ' . buildAttributes($attrs, true) . ' /></label>';
962 if (preg_match('/(^| )block($| )/', $attrs['_class']))
979 * @param array $attrs attributes
982 function form_filefield($attrs)
985 if ($attrs['_class']) $s .= ' class="' . $attrs['_class'] . '"';
986 if (!empty($attrs['id'])) $s .= ' for="' . $attrs['id'] . '"';
987 $s .= '><span>' . $attrs['_text'] . '</span> ';
988 $s .= '<input type="file" ' . buildAttributes($attrs, true);
989 if (!empty($attrs['_maxlength'])) $s .= ' maxlength="' . $attrs['_maxlength'] . '"';
990 if (!empty($attrs['_accept'])) $s .= ' accept="' . $attrs['_accept'] . '"';
992 if (preg_match('/(^| )block($| )/', $attrs['_class']))
1005 * $attrs['value'][1] is constructed as well.
1009 * @param array $attrs attributes
1012 function form_checkboxfield($attrs)
1015 unset($attrs['type']);
1017 if ($attrs['_class']) $s .= ' class="' . $attrs['_class'] . '"';
1018 if (!empty($attrs['id'])) $s .= ' for="' . $attrs['id'] . '"';
1020 if (is_array($attrs['value'])) {
1021 echo '<input type="hidden" name="' . hsc($attrs['name']) . '"'
1022 . ' value="' . hsc($attrs['value'][1]) . '" />';
1023 $attrs['value'] = $attrs['value'][0];
1025 $s .= '<input type="checkbox" ' . buildAttributes($attrs, true) . ' />';
1026 $s .= ' <span>' . $attrs['_text'] . '</span></label>';
1027 if (preg_match('/(^| )block($| )/', $attrs['_class']))
1042 * @param array $attrs attributes
1045 function form_radiofield($attrs)
1048 unset($attrs['type']);
1050 if ($attrs['_class']) $s .= ' class="' . $attrs['_class'] . '"';
1051 if (!empty($attrs['id'])) $s .= ' for="' . $attrs['id'] . '"';
1052 $s .= '><input type="radio" ' . buildAttributes($attrs, true) . ' />';
1053 $s .= ' <span>' . $attrs['_text'] . '</span></label>';
1054 if (preg_match('/(^| )block($| )/', $attrs['_class']))
1072 * @param array $attrs attributes
1075 function form_menufield($attrs)
1077 $attrs['size'] = '1';
1079 if ($attrs['_class']) $s .= ' class="' . $attrs['_class'] . '"';
1080 if (!empty($attrs['id'])) $s .= ' for="' . $attrs['id'] . '"';
1081 $s .= '><span>' . $attrs['_text'] . '</span>';
1082 $s .= ' <select ' . buildAttributes($attrs, true) . '>' . DOKU_LF;
1083 if (!empty($attrs['_options'])) {
1086 $cnt = count($attrs['_options']);
1088 @list($value,$text,$select) = $attrs['_options'][$n];
1103 if (preg_match('/(^| )block($| )/', $attrs['_class']))
1120 * @param array $attrs attributes
1123 function form_listboxfield($attrs)
1126 if ($attrs['_class']) $s .= ' class="' . $attrs['_class'] . '"';
1127 if (!empty($attrs['id'])) $s .= ' for="' . $attrs['id'] . '"';
1128 $s .= '><span>' . $attrs['_text'] . '</span> ';
1129 $s .= '<select ' . buildAttributes($attrs, true) . '>' . DOKU_LF;
1130 if (!empty($attrs['_options'])) {
1131 foreach ($attrs['_options'] as $opt) {
1144 if (preg_match('/(^| )block($| )/', $attrs['_class']))