Esempio n. 1
0
function wtk_id_classes($id, $classes, $type = null, $tooltip = null)
{
    wtk_id($id);
    wtk_classes($classes);
    wtk_djt($type);
    wtk_attr('title', $tooltip);
}
Esempio n. 2
0
<input type="checkbox" <?php 
wtk_id_classes($id, $flags);
wtk_attr('name', $name);
wtk_attr('value', strval($value));
wtk_attr('checked', $value ? 'checked' : NULL);
?>
 />
Esempio n. 3
0
<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>
Esempio n. 4
0
    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 
}
Esempio n. 5
0
            $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();
Esempio n. 6
0
        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 
    }
}
Esempio n. 7
0
<?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 
}
Esempio n. 8
0
<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>
Esempio n. 9
0
#
<input<?php 
wtk_id_classes($id, $flags);
wtk_attr('type', 'text');
wtk_attr('name', $name);
wtk_attr('value', $value);
wtk_attr('size', 6);
?>
 />
Esempio n. 10
0
<a<?php 
wtk_id_classes($id, $flags);
wtk_attr('href', $href);
wtk_attr('title', $metas->title);
?>
><?php 
foreach ($this as $child) {
    $child->output();
}
?>
</a>
Esempio n. 11
0
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;
        }
    }
}
Esempio n. 12
0
    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;
    ?>
Esempio n. 13
0
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();
Esempio n. 14
0
<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);
?>
 />