<div class="col-md-6"> <?php echo FORM::textarea('message', Core::post('message'), array('class' => 'form-control', 'placeholder' => __('Message'), 'name' => 'message', 'id' => 'message', 'rows' => 2, 'required')); ?> </div> </div> <!-- file to be sent--> <?if(core::config('advertisement.upload_file')):?> <div class="form-group"> <?php echo FORM::label('file', __('File'), array('class' => 'col-sm-2 control-label', 'for' => 'file')); ?> <div class="col-md-6"> <?php echo FORM::file('file', array('placeholder' => __('File'), 'class' => 'form-control', 'id' => 'file')); ?> </div> </div> <?endif?> <?if (core::config('advertisement.captcha') != FALSE):?> <div class="form-group"> <div class="col-md-4"> <?if (Core::config('general.recaptcha_active')):?> <?php echo Captcha::recaptcha_display(); ?> <?else:?> <?php echo __('Captcha'); ?>
echo FORM::textarea('message', "", array('class' => 'form-control', 'placeholder' => __('Message'), 'name' => 'message', 'id' => 'message', 'rows' => 2, 'required')); ?> </div> </div> <!-- file to be sent--> <?php if (core::config('advertisement.upload_file')) { ?> <div class="form-group"> <div class="col-xs-10"> <?php echo FORM::label('file', __('File'), array('class' => 'control-label', 'for' => 'file')); ?> <?php echo FORM::file('file', array('placeholder' => __('File'), 'class' => 'input-xlarge', 'id' => 'file')); ?> </div> </div> <?php } ?> <?php if (core::config('advertisement.captcha') != FALSE) { ?> <div class="form-group"> <div class="col-xs-10"> <?php echo __('Captcha'); ?>
/** * Returns the html tag code for a field * @param string $name input name * @param array $options as defined * @param mixed $value value of the field, optional. * @return string HTML of the tag */ public static function form_tag($name, $options, $value = NULL) { if ($options['display'] != 'hidden') { $label = FORM::label($name, isset($options['label']) ? $options['label'] : $name, array('class' => 'control-label col-md-5', 'for' => $name)); } else { $label = ''; } //$out = ''; if ($value === NULL) { $value = isset($options['default']) ? $options['default'] : NULL; } $attributes = array('placeholder' => isset($options['label']) ? $options['label'] : $name, 'data-placeholder' => isset($options['label']) ? $options['label'] : $name, 'class' => 'form-control', 'id' => $name, isset($options['required']) ? 'required' : ''); switch ($options['display']) { case 'select': $input = FORM::select($name, $options['options'], $value); break; case 'textarea': $input = FORM::textarea($name, $value, $attributes); break; case 'hidden': $input = FORM::hidden($name, $value, $attributes); break; case 'logo': $input = FORM::file($name, $attributes); if (!empty($value)) { $input .= HTML::image($value); $input .= Form::button('delete_' . $name, __('Delete'), array('type' => 'submit', 'value' => $value)); } break; case 'text': default: $input = FORM::input($name, $value, $attributes); break; } $out = $label . '<div class="col-md-5">' . $input . '</div>'; return $out; }
<div class="form_error"><?php echo Message::show_once_error($errors, 'title'); ?> </div> <p><?php echo __('s_firm'); ?> </p> <?php echo FORM::select('service_id', $services, Arr::get($values, 'service_id')); ?> <div style="width: 400px;"> <div style="float: left;"> <p>Изображение</p> <?php echo FORM::file('news_image'); ?> <br /> <div class="form_error"><?php echo Message::show_once_error(Arr::get($errors, '_external', array()), 'news_image'); ?> </div> <strong style="font-weight: normal; font-size: 10px;">Изображение в формате jpg, jpeg, png, gif</strong> </div> <div style="float: right;"> <?php $image = Arr::get($values, 'image', NULL); if ($image and file_exists($image)) { $pict = explode('.', $image); echo HTML::image($pict[0] . '_pict.' . $pict[1], array('width' => 100)); }
?> <p class="help-block"> <?php echo HTML::image($car->img_path, array('height' => 100)); ?> </p> <?php } ?> </div> </div> <div class="control-group"> <label for="thumb-img-path">Логотип (миниатюра)</label> <div class="controls"> <?php echo FORM::file('thumb_img_path'); ?> <?php if (file_exists($car->thumb_img_path)) { ?> <p class="help-block"> <?php echo HTML::image($car->thumb_img_path); ?> </p> <?php } ?> </div>
echo Form::input('title', e($val->input('title')), array('size' => '30')); ?> </div> <div class="input textarea required"> <?php echo Form::label('Body', 'body'); ?> <?php echo Form::textarea('body', e($val->input('body')), array('rows' => 4, 'cols' => 40)); ?> </div> <div class="input textarea required"> <?php echo FORM::file('filename'); ?> </div> <div class="input submit"> <?php echo Form::submit('add_article', 'Publish'); ?> <?php echo Form::submit('save_draft', 'Save Draft'); ?> </div> <?php echo Form::close();
</div> <div class="control-group"> <label class="control-label">Изображение карты метро(Оригинал)</label> <div class="controls"> <?php echo FORM::file('metro_map', $file_input_attr); ?> <span class="help-inline"><?php echo Arr::path($errors, '_external.metro_map'); ?> </span> </div> </div> <div class="control-group"> <label class="control-label">Изображение карты метро(Чистовая)</label> <div class="controls"> <?php echo FORM::file('metro_map_clear', $file_input_attr); ?> <span class="help-inline"><?php echo Arr::path($errors, '_external.metro_map_clear'); ?> </span> </div> </div> <div class="form-actions"> <?php echo FORM::submit(NULL, 'Сохранить', array('class' => 'btn btn-large btn-success')); ?> </div> </fieldset>
echo FORM::open(empty($photo) ? "admin/dlslider/save" : "admin/dlslider/save/{$photo->id}", array("class" => "dl_slider_form {$even_odd}", "method" => "post", "enctype" => "multipart/form-data")); echo Form::hidden("slider_id", $slider->id); if (!empty($photo->id)) { echo Form::hidden("photo_id", $photo->id); } if (!empty($photo)) { ?> <a class="show-hide" href="#">Show Details</a> <?php } $remove = ""; $detailSection = new Element(); $detailSection->attributes->class = "slider-details"; $select = new Element(); $select->content = FORM::label('photo' . $index, 'Select Photo: <small>(' . Model_DLSliderPhoto::WIDTH . 'x' . Model_DLSliderPhoto::HEIGHT . ')</small>'); $select->content .= FORM::file("photo", array("id" => 'photo' . $index)); $select->attributes->class = "upload-image"; $title = new Element(); $title->content = FORM::label('title' . $index, 'Title for this photo:'); $title->content .= FORM::input('title', $photo->title, array("id" => "title" . $index)); $teaser = new Element(); $teaser->content = FORM::label('teaser' . $index, 'Description:'); $teaser->content .= FORM::input('teaser', $photo->teaser, array("id" => 'teaser' . $index)); $linkText = new Element(); $linkText->content = FORM::label('linktext' . $index, 'Link text:'); $linkText->content .= FORM::input('linktext', $photo->link_text, array("id" => 'linktext' . $index)); $link = new Element(); $link->content = FORM::label('link' . $index, 'Link:'); $link->content .= FORM::input("link", $photo->link, array("id" => 'link' . $index)); $library = new Element(); $library->content = new Element("label", Form::checkbox("save", "yes", $photo->isSaved) . " Store in Library");
<?php } ?> </select> <div id="selected_works"></div> </li> <li> <label for="question">Вопрос</label> <?php echo FORM::textarea('text', Arr::get($values, 'text'), array('id' => 'question', 'style' => 'width: 314px;')); ?> </li> <li> <label for="photo">Фото</label> <?php echo FORM::file('image', array('id' => 'photo')); ?> </li> </ul> </fieldset> <fieldset> <legend>Контактные данные</legend> <ul class="form"> <li> <label for="contact">Контактное лицо:</label> <?php echo FORM::input('contact', Arr::get($values, 'contact'), array('id' => 'contact', 'style' => 'width: 207px;')); ?> </li> <li> <label for="email">Email:</label>