Пример #1
0
			<div class="form-group<?php 
echo Form::has_error('text', $errors);
?>
">
				<?php 
echo TB_Form::label(__('home.page_text'));
?>
				<div class="col-sm-10">
					<?php 
echo Editor::CK('text', $data['text'], ['class' => 'form-control', 'rows' => 6]);
echo Form::error('text', $errors);
?>
				</div>
			</div>

		</div>
		<div class="tab-pane fade" id="seo">

			<?php 
echo View::factory('backend/v_seo', ['t' => [$data['meta_t'], __('home.meta_t_h'), true], 'd' => [$data['meta_d'], __('home.meta_d_h'), true], 'k' => [$data['meta_k'], __('home.meta_k_h'), true]])->bind('errors', $errors);
?>

		</div>
	</div>

<?php 
echo TB_Form::btn_save();
?>

<?php 
echo Form::close();
Пример #2
0
<?php

defined('SYSPATH') or die('No direct script access.');
foreach ($actions as $key => $action) {
    $url[$key] = Route::url('ajax', ['module' => $module, 'controller' => $controller, 'action' => $action, 'param' => $obj['id']]);
}
$group = $module . '.' . $config_img;
$fn = Config::get($group . '.fn');
?>

<div class="form-group">
	<?php 
echo TB_Form::label(__('shop.images'));
?>
	<div class="controls col-sm-10">
		<div id="fileuploads-info"></div>
		<div id="fileuploads-result">
			<?php 
echo $obj['id'] ? Fileuploaders::v_image($group, $obj['id'], $obj['is_edit']) : Fileuploaders::v_image($group, $user->id);
?>
		</div>
		<div class="btn btn-default fileupload-button">
			<i class="fa fa-folder-open fa-fw"></i>
			<?php 
echo __('shop.select_image');
?>
			<input name="<?php 
echo $fn;
?>
" id="fileuploads" type="file" data-url="<?php 
echo $url['upload'];
Пример #3
0
			<?php 
    echo Form::textarea('meta_d', $d[0], ['class' => 'form-control', 'id' => 'meta_d', 'rows' => 2]);
    echo Form::help((isset($d[1]) ? $d[1] : '') . '<div id="chars_meta_d"></div>');
    echo Form::error('meta_d', $errors);
    ?>
		</div>
	</div>
<?php 
}
?>

<?php 
if (isset($k)) {
    ?>
	<div class="form-group<?php 
    echo Form::has_error('meta_k', $errors);
    ?>
">
		<?php 
    echo TB_Form::label(__('settings.seo_meta_k') . (isset($k['2']) ? Form::$required : ''));
    ?>
		<div class="col-sm-10">
			<?php 
    echo Form::textarea('meta_k', $k[0], ['class' => 'form-control', 'id' => 'meta_k', 'rows' => 2]);
    echo Form::help((isset($k[1]) ? $k[1] : '') . '<div id="chars_meta_k"></div>');
    echo Form::error('meta_k', $errors);
    ?>
		</div>
	</div>
<?php 
}
Пример #4
0
    /**
     * Get form for filter
     * @param array $arr_for_select
     * @param string $label
     * @return string
     */
    public static function filter(array $arr_for_select, $label = '')
    {
        $id = Request::get('id');
        if ($label) {
            $label = '<label class="control-label">' . HTML::chars($label) . ':</label> ';
        }
        return '
			<div class="pull-right">
				<form action="" method="post" id="filter_by" accept-charset="utf-8" class="form-inline">
					<div class="form-group">
						' . $label . TB_Form::select_tree('id', $arr_for_select, $id ? $id : 0, ['class' => 'form-control']) . '
					</div>
				</form>
			</div>
		';
    }