00001 <?php
00002 require_once GYRO_CORE_DIR . 'view/widgets/input/base/base.input.widget.php';
00003
00004
00005
00006
00007
00008
00009
00010 class InputWidgetBase extends InputWidgetBaseBase {
00011
00012
00013
00014 protected function render_postprocess($output, $policy) {
00015 if (!Config::has_feature(ConfigYAML::YAML_USE_FORMS)) {
00016 return parent::render_postprocess($output, $policy);
00017 }
00018 $cls = $this->get_input_type();
00019 $type = $cls;
00020 switch ($cls) {
00021 case 'textarea':
00022 case 'password':
00023 case 'file':
00024 case 'date':
00025 case 'html':
00026 $type = 'text';
00027 break;
00028 case 'radio':
00029 case 'checkbox':
00030 $type = 'check';
00031 break;
00032 case 'submit':
00033 $type = 'button';
00034 break;
00035 case 'multiselect':
00036 $type = 'select';
00037 break;
00038 }
00039
00040 $ret = html::div($output, "type-$type");
00041 return $ret;
00042 }
00043 }