function wtk_id_classes($id, $classes, $type = null, $tooltip = null) { wtk_id($id); wtk_classes($classes); wtk_djt($type); wtk_attr('title', $tooltip); }
<input type="checkbox" <?php wtk_id_classes($id, $flags); wtk_attr('name', $name); wtk_attr('value', strval($value)); wtk_attr('checked', $value ? 'checked' : NULL); ?> />
<audio <?php wtk_id_classes($id, $flags, $dojoType, $tooltip); if ($controls) { ?> controls<?php } wtk_attr('preload', $preload ? 'auto' : 'none'); ?> > <?php foreach ($sources as $src) { ?> <source <?php wtk_attr('src', $src['url']); wtk_attr('type', $src['type']); ?> > <?php } $this->outputChildren(); ?> </audio>
wtk_id_classes($id, $flags, $dojoType); wtk_attr('type', $type); wtk_attr('name', $name); wtk_attr('value', $value); wtk_attr('size', $width); wtk_attr('placeholder', $placeholder); wtk_attr('pattern', $pattern); if ($readonly) { wtk_attr('disabled', 'disabled'); } ?> /><?php echo $suffix; } else { ?> <textarea <?php wtk_id_classes($id, $flags); wtk_attr('name', $name); wtk_attr('rows', $height); wtk_attr('cols', $width); wtk_attr('placeholder', $placeholder); if ($readonly) { wtk_attr('disabled', 'disabled'); } ?> ><?php echo htmlspecialchars($value); ?> </textarea> <?php }
$enctype = 'multipart/form-data'; break; default: $method = NULL; $enctype = NULL; break; } } else { $method = $enctype = $action = null; } ?> <form<?php wtk_id_classes($id, $flags, $dojoType); wtk_attr('method', $method); wtk_attr('enctype', $enctype); wtk_attr('action', $action); ?> > <?php if ($model->hasInstanceByType('Wtk_Form_Model_Instance_File')) { ?> <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo wtk_steno_to_int(ini_get('upload_max_filesize')); ?> " /> <?php } if (isset($this->errors)) { $this->errors->output(); } $this->outputChildren();
echo $caption; ?> </option> <?php } ?> </select> <?php } else { foreach ($items as $value => $caption) { $for = wtk_strtoid($name . $value); ?> <label<?php wtk_attr('for', $for); wtk_classes(wtk_strtoid($value)); ?> ><input<?php wtk_attr('id', $for); wtk_attr('name', $name . ($multiple ? '[]' : '')); wtk_attr('value', $value); wtk_attr('type', $multiple ? 'checkbox' : 'radio'); wtk_attr('checked', is_array($selected) ? in_array($value, $selected) : $value == $selected ? 'checked' : NULL); ?> /> <?php echo $caption; ?> </label> <?php } }
<?php if (is_array($value)) { foreach ($value as $k => $v) { ?> <input <?php wtk_id_classes($id, $flags); wtk_attr('type', 'hidden'); wtk_attr('name', $name . '[' . (is_int($k) ? '' : $k) . ']'); wtk_attr('value', $v); ?> /> <?php } } else { ?> <input <?php wtk_id_classes($id, $flags); wtk_attr('type', 'hidden'); wtk_attr('name', $name); wtk_attr('value', $value); ?> /> <?php }
<div class="wrapper"> <?php $this->button->output(); ?> <span class="max">(Max : <?php echo ini_get('upload_max_filesize'); ?> )</span> <input type="file"<?php wtk_id_classes($id, $flags); wtk_attr('name', $name); ?> /> </div>
# <input<?php wtk_id_classes($id, $flags); wtk_attr('type', 'text'); wtk_attr('name', $name); wtk_attr('value', $value); wtk_attr('size', 6); ?> />
<a<?php wtk_id_classes($id, $flags); wtk_attr('href', $href); wtk_attr('title', $metas->title); ?> ><?php foreach ($this as $child) { $child->output(); } ?> </a>
foreach ($items as $item) { if ($item) { switch ($item) { case 'year': echo "<input size=\"5\" maxlength=\"4\""; wtk_classes($flags, $item); wtk_attr('name', $name . '[year]'); wtk_attr('value', $year); wtk_attr('type', 'number'); echo " />"; break; case 'month': case 'day': case 'hour': case 'min': case 'sec': echo "<input size=\"2\" maxlength=\"2\""; wtk_classes($flags, $item); wtk_attr('name', $name . '[' . $item . ']'); wtk_attr('value', ${$item}); wtk_attr('type', 'number'); wtk_attr('min', $minvalues[$item]); wtk_attr('max', $maxvalues[$item]); echo " />"; break; default: echo "<span>" . $item . "</span>\n"; break; } } }
foreach ($files as $f) { extract($f); if ($default && $embed_style) { if (!isset($embeded[$medium])) { $embeded[$medium] = ''; } $embeded[$medium] .= is_readable($file) ? file_get_contents($file) : ''; } else { ?> <link type="text/css" rel="<?php echo $default ? "" : "alternate "; ?> stylesheet" <?php wtk_attr('title', $style->title); wtk_attr('media', $medium); wtk_attr('href', $baseurl . $url); ?> /> <?php } } } ?> <?php $cssbaseurl = @dirname($files[0]['url']) . '/'; foreach ($embeded as $medium => $css) { ?> <style type="text/css" media="<?php echo $medium; ?>
wtk_id_classes('control-' . $id, $flags, $dojoType, $tooltip); if (isset($wtkConstraint)) { foreach ($wtkConstraint as $cons) { wtk_attr("wtkConstraint", $cons); } } ?> > <?php if (isset($this->errors)) { $this->errors->output(); } if (isset($this->caption)) { ?> <label<?php wtk_attr('for', $id); ?> ><?php $this->caption->output(); ?> </label> <?php } $iflags = array_merge($flags, array('input')); ?> <span<?php wtk_classes($iflags); ?> > <?php $this->control->output();
<img<?php wtk_id_classes($id, $flags, $dojoType); wtk_attr('src', $url); wtk_attr('alt', $alt); wtk_attr('title', $title); wtk_attr('width', $width); wtk_attr('height', $height); ?> />