/** * get the html tag code for a field for a custom field * @param string $name input name * @param array $options as defined * @param mixed $value value of the field, optional. * @param boolean $old =TRUE renders bs2 styles * @param boolean $inline renders inline form * @return string HTML */ public static function cf_form_tag($name, $options, $value = NULL, $old = FALSE, $inline = FALSE) { if ($options['display'] != 'hidden') { $label = FORM::label($name, isset($options['label']) ? $options['label'] : $name, array('class' => !$old ? 'control-label' : '', 'for' => $name)); } else { $label = ''; } if ($value === NULL) { $value = isset($options['default']) ? $options['default'] : NULL; } // dependent classes on type $class = 'form-control ' . 'cf_' . $options['display'] . '_fields data-custom '; switch ($options['display']) { case 'textarea': $class .= 'span6'; break; case 'checkbox': $class = 'cf_' . $options['display'] . '_fields data-custom'; break; case 'radio': $class = 'cf_' . $options['display'] . 'fields data-custom'; $required = (isset($options['required']) and $options['required'] == TRUE) ? 'required' : NULL; $data_categories = isset($options['categories']) ? json_encode($options['categories']) : NULL; $title = isset($options['tooltip']) ? $options['tooltip'] : NULL; break; default: $class .= " "; break; } $attributes = array('placeholder' => isset($options['label']) ? $options['label'] : $name, 'data-placeholder' => isset($options['label']) ? $options['label'] : $name, 'title' => isset($options['tooltip']) ? $options['tooltip'] : NULL, 'data-categories' => isset($options['categories']) ? json_encode($options['categories']) : NULL, 'class' => $class, 'id' => $name, (isset($options['required']) and $options['required'] == TRUE) ? 'required' : NULL); switch ($options['display']) { case 'select': $input = FORM::select($name, $options['options'], !is_array($value) ? $value : NULL, $attributes); break; case 'text': $input = FORM::input($name, $value, $attributes); break; case 'textarea': $input = FORM::textarea($name, $value, $attributes); break; case 'hidden': $input = FORM::hidden($name, $value, $attributes); break; case 'datetime': $attributes['data-datetime'] = "data-datetime"; $attributes['data-format'] = "yyyy-MM-dd hh:mm"; $input = FORM::input($name, $value, $attributes); break; case 'date': $attributes['data-date'] = "data-date"; $attributes['data-date-format'] = "yyyy-mm-dd"; $input = FORM::input($name, $value, $attributes); break; case 'checkbox': $checked = $value == 1 ? TRUE : FALSE; $input = ''; $label = '<b>' . $options['label'] . '</b>'; $input .= '<div class="checkbox"><label>' . $value . FORM::hidden($name, 0) . FORM::checkbox($name, NULL, $checked, $attributes) . '</label></div>'; break; case 'radio': $input = ''; $label = '<b>' . $options['label'] . '</b>'; $index = 0; foreach ($options['options'] as $id => $radio_name) { $checked = $value == $index ? TRUE : FALSE; if ($id !== "") { $input .= '<div class="radio"><label>' . $radio_name . Form::radio($name, $index, $checked, $attributes) . '</label></div>'; } $index++; } break; case 'string': default: $input = FORM::input($name, $value, $attributes); break; } if (!$old) { !$inline ? $is_inline = "class='col-md-5 col-sm-8 col-xs-11'" : ($is_inline = ""); $out = '<div ' . $is_inline . '>' . $label . $input . '</div>'; } else { $out = $label . '<div>' . $input . '</div>'; } return $out; }
<?php defined('SYSPATH') or die('No direct script access.'); echo FORM::open('search', array('method' => 'get', 'class' => 'search-form')); ?> <?php echo FORM::input('str', Arr::get($values, 'str')); ?> <?php echo FORM::hidden('search_type', Arr::get($values, 'search_type')); ?> <button name="submit" class="submit">Искать <span class="search-preloader"><img src="/assets/img/search_button_preloader.gif" alt="Искать" /></span></button> <div class="tip">Запросы можно вводить через запятую, например Москва, Ауди, Тюнинг</div> <div class="form-errors"> <?php foreach ($errors as $error) { echo '<div class="error">' . $error . '</div>'; } ?> </div> <div class="result"> <?php echo $result; ?> </div> <?php echo FORM::close();
<?php defined('SYSPATH') or die('No direct script access.'); ?> <form id="fileupload" action="/rest/companyimage" method="POST" enctype="multipart/form-data"> <?php echo FORM::hidden('company_id', $service->id); ?> <div class="fileupload-buttonbar"> <a class="btn btn-success fileinput-button"> <i class="icon-plus icon-white"></i> <span>Добавить изображение</span> <input type="file" name="files[]" multiple> </a> <button type="submit" class="btn btn-primary start"> <i class="icon-upload icon-white"></i> Загрузить </button> <button type="reset" class="btn btn-warning cancel">Отмена</button> </div> <table role="presentation" class="table table-striped"> <thead> <tr> <th>Превью</th> <th></th> <th>Заголовок</th> <th>Операции</th> </tr> </thead>
<form action="<?php echo URL::base(); echo Request::current()->uri(); ?> " method="post"> <div class="panel panel-default"> <div class="panel-body"> <div class="form-horizontal"> <div class="form-group"> <?php echo FORM::label('css_active', __('Switch off custom CSS'), array('class' => 'control-label col-sm-4', 'for' => 'css_active')); ?> <div class="col-sm-8"> <div class="onoffswitch"> <?php echo FORM::hidden('css_active', 0); ?> <?php echo FORM::checkbox('css_active', 1, (bool) $css_active, array('placeholder' => "", 'class' => 'onoffswitch-checkbox', 'id' => 'css_active', 'data-original-title' => __("Switch off custom CSS"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-content' => __("Require only the logged in users to post."))); ?> <?php echo FORM::label('css_active', "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => 'css_active')); ?> </div> </div> </div> <div class="form-group"> <label class="control-label col-sm-4"><?php echo __('CSS'); ?>
</div> <div class="form-group"> <?php echo FORM::label($forms['adblock']['id'], __('Adblock Detection'), array('class' => 'control-label col-sm-4', 'for' => $forms['adblock']['id'])); ?> <div class="col-sm-8"> <div class="onoffswitch"> <?php echo Form::checkbox($forms['adblock']['key'], 1, (bool) $forms['adblock']['value'], array('placeholder' => __("TRUE or FALSE"), 'class' => 'onoffswitch-checkbox', 'id' => $forms['adblock']['id'], 'data-content' => __("Once set to TRUE, enables adblock detection"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("Adblock Detection"))); ?> <?php echo FORM::label($forms['adblock']['id'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['adblock']['id'])); ?> <?php echo FORM::hidden($forms['adblock']['key'], 0); ?> </div> </div> </div> </div> </div> </div> <div class="panel panel-default"> <div class="panel-body"> <div class="col-sm-8 col-sm-offset-4"> <?php echo FORM::button('submit', __('Save'), array('type' => 'submit', 'class' => 'btn btn-primary', 'action' => Route::url('oc-panel', array('controller' => 'settings', 'action' => 'general')))); ?> </div>
" method="post"> <div class="panel panel-default"> <div class="panel-heading"><h3 class="panel-title"><?php echo __('General Configuration'); ?> </h3></div> <div class="panel-body"> <div class="form-horizontal" id="default-settings"> <div class="form-group"> <?php echo FORM::label('map_active', __('Map on homepage'), array('class' => 'control-label col-sm-4', 'for' => 'map_active')); ?> <div class="col-sm-8"> <div class="onoffswitch"> <?php echo FORM::hidden('map_active', 0); ?> <?php echo FORM::checkbox('map_active', 1, (bool) $map_active, array('placeholder' => "", 'class' => 'onoffswitch-checkbox', 'id' => 'map_active', 'data-original-title' => __("Map on homepage"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-content' => __("Disables generated map on homepage"))); ?> <?php echo FORM::label('map_active', "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => 'map_active')); ?> </div> </div> </div> <div class="form-group"> <label class="control-label col-sm-4" for="bg_color"> <?php echo __('Background Color'); ?>
<div class="form-group"> <?php echo FORM::label('seotitle', __('Seotitle'), array('class' => 'control-label col-md-2', 'for' => 'seotitle')); ?> <div class="col-sm-4"> <?php echo FORM::input('seotitle', '', array('placeholder' => __('seotitle'), 'class' => 'form-control', 'id' => 'seotitle')); ?> </div> </div> <div class="form-group"> <div class="col-sm-4"> <?php echo FORM::hidden('type', $type, array('placeholder' => __('Type'), 'class' => 'form-control', 'id' => 'type')); ?> </div> </div> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <div class="checkbox"> <label class="status"> <input type="checkbox" name="status"> <?php echo __('Active'); ?> </label> </div> </div> </div> <div class="form-group">
<div class="control-group"> <label class="control-label">Вступ. взнос</label> <div class="controls"> <?php echo FORM::select('entrance_fee', array('Y' => 'Да', 'N' => 'Нет'), Arr::get($values, 'entrance_fee', 'N')); ?> <p class="help-block" style="color: red;"><?php echo Arr::get($errors, 'entrance_fee'); ?> </p> </div> </div> <div class="form-actions"> <?php echo FORM::hidden('id', Arr::get($values, 'id')); ?> <?php echo FORM::submit(NULL, 'Сохранить', array('class' => 'btn btn-success btn-large')); ?> </div> </fieldset> <?php echo FORM::close(); ?>
<div class="panel panel-default"> <div class="panel-heading"><?php echo __("Amazon S3 Configuration"); ?> </div> <div class="panel-body"> <div class="form-horizontal"> <div class="form-group"> <?php echo FORM::label($forms_img['aws_s3_active']['key'], __('Amazon S3 active'), array('class' => 'control-label col-sm-4', 'for' => $forms_img['aws_s3_active']['key'])); ?> <div class="col-sm-8"> <div class="onoffswitch"> <?php echo FORM::hidden($forms_img['aws_s3_active']['key'], 0); ?> <?php echo Form::checkbox($forms_img['aws_s3_active']['key'], 1, (bool) $forms_img['aws_s3_active']['value'], array('placeholder' => __("TRUE or FALSE"), 'class' => 'onoffswitch-checkbox', 'id' => $forms_img['aws_s3_active']['key'], 'data-content' => __('Amazon S3 active'), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => '')); ?> <?php echo FORM::label($forms_img['aws_s3_active']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms_img['aws_s3_active']['key'])); ?> </div> </div> </div> <div class="form-group"> <?php echo FORM::label($forms_img['aws_access_key']['key'], __('AWS Access Key'), array('class' => 'control-label col-sm-4', 'for' => $forms_img['aws_access_key']['key'])); ?>
/** * get field html code for a custom field * @param string $name input name * @param array $options as defined * @param mixed $value value of the field, optional. * @return string HTML */ public static function cf_form_field($name, $options, $value = NULL) { if ($value === NULL) { $value = isset($options['default']) ? $options['default'] : NULL; } // dependent classes on type $class = 'form-control ' . 'cf_' . $options['display'] . '_fields data-custom '; switch ($options['display']) { case 'checkbox': $class = 'cf_' . $options['display'] . '_fields data-custom'; break; case 'radio': $class = 'cf_' . $options['display'] . 'fields data-custom'; $required = (isset($options['required']) and $options['required'] == TRUE) ? 'required' : NULL; $data_categories = isset($options['categories']) ? json_encode($options['categories']) : NULL; $title = isset($options['tooltip']) ? $options['tooltip'] : NULL; break; default: $class .= " "; break; } $attributes = array('placeholder' => isset($options['placeholder']) ? $options['placeholder'] : (isset($options['label']) ? $options['label'] : $name), 'data-placeholder' => isset($options['data-placeholder']) ? $options['data-placeholder'] : (isset($options['label']) ? $options['label'] : $name), 'title' => isset($options['tooltip']) ? $options['tooltip'] : NULL, 'data-categories' => isset($options['categories']) ? json_encode($options['categories']) : NULL, 'class' => $class, 'id' => $name, (isset($options['required']) and $options['required'] == TRUE) ? 'required' : NULL); switch ($options['display']) { case 'select': $input = FORM::select($name, $options['options'], !is_array($value) ? $value : NULL, $attributes); break; case 'text': $input = FORM::input($name, $value, $attributes); break; case 'textarea': $input = FORM::textarea($name, $value, $attributes); break; case 'hidden': $input = FORM::hidden($name, $value, $attributes); break; case 'date': $attributes['data-date'] = "data-date"; $attributes['data-date-format'] = "yyyy-mm-dd"; $input = FORM::input($name, $value, $attributes); break; case 'checkbox': $checked = isset($value); // value can be 1 or 'on' $input = '<div class="checkbox"><label>' . FORM::checkbox($name, NULL, $checked, $attributes) . '</label></div>'; break; case 'radio': $input = ''; $index = 0; foreach ($options['options'] as $id => $radio_name) { $checked = $value == $index ? TRUE : FALSE; if ($id !== "") { $input .= '<div class="radio"><label>' . Form::radio($name, $index, $checked, $attributes) . ' ' . $radio_name . '</label></div>'; } $index++; } break; case 'email': $attributes['type'] = 'email'; $input = FORM::input($name, $value, $attributes); break; case 'string': default: $input = FORM::input($name, $value, $attributes); break; } return $input; }
echo FORM::input('address', Arr::get($values, 'address'), array('class' => 's_inp', 'id' => 'address', 'style' => $address_inp_style)); ?> <div class="form_error"><?php echo Message::show_once_error($errors, 'address'); ?> </div> </div> <div class='field_body'> <label class="lab"><?php echo __('f_map_location'); ?> </label> <div id="edit-map"></div> <div class="map-error"></div> <?php echo FORM::hidden('ymap_lat', Arr::get($values, 'ymap_lat')) . FORM::hidden('ymap_lng', Arr::get($values, 'ymap_lng')); ?> </div> <div class='field_body'> <label for="phone" class="lab"><?php echo __('f_phone'); ?> </label> +7 <?php echo FORM::input('code', Arr::get($values, 'code'), array('class' => 's_inp', 'style' => 'width: 40px;')); ?> <?php echo FORM::input('phone', Arr::get($values, 'phone'), array('class' => 's_inp', 'id' => 'phone', 'style' => $phone_inp_style . ' width: 267px;')); ?> <div class="form_error"><?php echo Message::show_once_error($errors, 'code');
echo FORM::checkbox('captcha', 1, (bool) core::config('advertisement.captcha'), array('placeholder' => "http://foo.com/", 'class' => 'onoffswitch-checkbox', 'id' => 'captcha', 'data-content' => __("Enables Captcha"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("Captcha appears in the form."))); ?> <?php echo FORM::label('captcha', "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => 'captcha')); ?> </div> </div> </div> <div class="form-group"> <?php echo FORM::label('address', __('Address'), array('class' => 'control-label col-sm-4', 'for' => 'address')); ?> <div class="col-sm-8"> <div class="onoffswitch"> <?php echo FORM::hidden('address', 0); ?> <?php echo FORM::checkbox('address', 1, (bool) core::config('advertisement.address'), array('placeholder' => "", 'class' => 'onoffswitch-checkbox', 'id' => 'address', 'data-content' => __("Address field"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("Displays the field Address in the Ad form."))); ?> <?php echo FORM::label('address', "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => 'address')); ?> </div> </div> </div> <hr> <div class="form-group"> <div class="col-sm-8 col-sm-offset-4"> <?php echo FORM::button('submit', __('Save'), array('type' => 'submit', 'class' => 'btn btn-primary', 'action' => Route::url('oc-panel', array('controller' => 'settings', 'action' => 'form')) . '?define=cf'));
<div class="col-md-8"> <?php echo FORM::input($forms['stripe_public']['key'], $forms['stripe_public']['value'], array('placeholder' => "", 'class' => 'tips form-control', 'id' => $forms['stripe_public']['key'], 'data-content' => __("Stripe public key"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => '')); ?> </div> </div> <div class="form-group"> <?php echo FORM::label($forms['stripe_address']['key'], __('Requires address to pay for extra security'), array('class' => 'col-md-4 control-label', 'for' => $forms['stripe_address']['key'])); ?> <div class="col-md-8"> <div class="onoffswitch"> <?php echo FORM::hidden($forms['stripe_address']['key'], 0); ?> <?php echo FORM::checkbox($forms['stripe_address']['key'], 1, (bool) $forms['stripe_address']['value'], array('placeholder' => "TRUE or FALSE", 'class' => 'onoffswitch-checkbox', 'id' => $forms['stripe_address']['key'], 'data-content' => '', 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => '')); ?> <?php echo FORM::label($forms['stripe_address']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['stripe_address']['key'])); ?> </div> </div> </div> </div> </div> </div> <div class="panel panel-default">
echo FORM::checkbox($forms['number_of_orders']['key'], 1, (bool) $forms['number_of_orders']['value'], array('placeholder' => "TRUE or FALSE", 'class' => 'onoffswitch-checkbox', 'id' => $forms['number_of_orders']['key'], 'data-content' => __("Enables users to review purchased products"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("Number of sales"))); ?> <?php echo FORM::label($forms['number_of_orders']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['number_of_orders']['key'])); ?> </div> </div> </div> <div class="form-group"> <?php echo FORM::label($forms['qr_code']['key'], __("Show QR code"), array('class' => 'col-md-4 control-label', 'for' => $forms['qr_code']['key'])); ?> <div class="col-md-8"> <div class="onoffswitch"> <?php echo FORM::hidden($forms['qr_code']['key'], 0); ?> <?php echo FORM::checkbox($forms['qr_code']['key'], 1, (bool) $forms['qr_code']['value'], array('placeholder' => "TRUE or FALSE", 'class' => 'onoffswitch-checkbox', 'id' => $forms['qr_code']['key'], 'data-content' => __("Show QR code in Product"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("Show QR code"))); ?> <?php echo FORM::label($forms['qr_code']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['qr_code']['key'])); ?> </div> </div> </div> </div> </div> </div> <div class="panel panel-default"> <div class="panel-body">
</div> <div id="middle_road"> <div class="logo"> <?php echo HTML::anchor('/', HTML::image('assets/img/logo.png', array('alt' => 'На главную', 'title' => 'На главную', 'class' => 'logo_img'))); ?> </div> <div class="sub_menu"> <div class="sub-menu-form"> <ul> <li> <?php echo FORM::open('search', array('method' => 'get')); ?> <?php echo FORM::input('str', NULL, array('placeholder' => 'поисковый запрос', 'class' => 'search_input')) . FORM::hidden('search_type', 'all'); ?> <?php echo FORM::submit(NULL, 'Найти', array('class' => 'search_submit')); ?> <?php echo FORM::close(); ?> </li> </ul> </div> </div> <div class="menu"> <ul> <li><?php echo HTML::anchor('participants', 'УЧАСТНИКИ', array('class' => 'menu-auto-filter'));
<?php defined('SYSPATH') or die('No direct script access.'); echo FORM::hidden('service', $service->id, array('id' => 'service')); ?> <script type="text/javascript"> visit_data = <?php echo $visitor_data; ?> ; company_id = <?php echo $service->id; ?> ; </script> <div class="service-title"> <div class="title-left"> <h1><?php echo Text::mb_ucfirst(__('company_type_' . $service->type)) . ' ' . $service->orgtype->name . ' «' . $service->name . '»'; ?> </h1> <div class="address"><?php echo $service->get_address(); ?> </div> </div> <?php if ($service->user->user_type != "disabled") { ?> <div class="title-right"> <?php
?> <?php echo FORM::label($forms['paypal_seller']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['paypal_seller']['key'])); ?> </div> </div> </div> <div class="form-group"> <?php echo FORM::label($forms['stock']['key'], "<a target='_blank' href='https://docs.yclas.com/pay-directly-from-ad/'>" . __('Paypal link stock control') . "</a>", array('class' => 'control-label col-sm-4', 'for' => $forms['stock']['key'])); ?> <div class="col-sm-8"> <div class="onoffswitch"> <?php echo FORM::hidden($forms['stock']['key'], 0); ?> <?php echo Form::checkbox($forms['stock']['key'], 1, (bool) $forms['stock']['value'], array('placeholder' => __("TRUE or FALSE"), 'class' => 'onoffswitch-checkbox', 'id' => $forms['stock']['key'], 'data-content' => '', 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => '')); ?> <?php echo FORM::label($forms['stock']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['stock']['key'])); ?> </div> </div> </div> </div> </div> </div> <div class="panel panel-default">
?> <?php echo FORM::label($forms['stripe_alipay']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['stripe_alipay']['key'])); ?> </div> </div> </div> <div class="form-group"> <?php echo FORM::label($forms['stripe_3d_secure']['key'], __('Requires 3D security') . ' - BETA', array('class' => 'col-md-4 control-label', 'for' => $forms['stripe_3d_secure']['key'])); ?> <div class="col-md-8"> <div class="onoffswitch"> <?php echo FORM::hidden($forms['stripe_3d_secure']['key'], 0); ?> <?php echo FORM::checkbox($forms['stripe_3d_secure']['key'], 1, (bool) $forms['stripe_3d_secure']['value'], array('placeholder' => "TRUE or FALSE", 'class' => 'onoffswitch-checkbox', 'id' => $forms['stripe_3d_secure']['key'], 'data-content' => '', 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => '')); ?> <?php echo FORM::label($forms['stripe_3d_secure']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['stripe_3d_secure']['key'])); ?> </div> </div> </div> </div> </div> </div> <div class="panel panel-default">
</div> <div class="modal-body"> <div class="form-group"> <?php $categories = array(); ?> <?php foreach ((new Model_Category())->where('id_category', '!=', '1')->order_by('order', 'asc')->find_all()->cached() as $category) { $categories[$category->id_category] = $category->name; } ?> <?php echo FORM::label('Hide categories from homepage', __('Hide categories from homepage'), array('class' => 'control-label', 'for' => 'Hide categories from homepage')); ?> <?php echo FORM::hidden('hide_homepage_categories[]', NULL); ?> <?php echo FORM::select('hide_homepage_categories[]', $categories, $hide_homepage_categories, array('class' => 'form-control', 'id' => 'hide_homepage_categories')); ?> </div> </div> <div class="modal-footer text-right"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Cancel'); ?> </button> <?php echo FORM::button('submit', __('Save'), array('type' => 'submit', 'class' => 'btn btn-primary', 'action' => Route::url('oc-panel', array('controller' => 'category', 'action' => 'hide_homepage_categories')))); ?>
?> <?php echo FORM::label($forms['reviews']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['reviews']['key'])); ?> </div> </div> </div> <div class="form-group"> <?php echo FORM::label($forms['reviews_paid']['key'], __("Only for paid transactions"), array('class' => 'control-label col-sm-4', 'for' => $forms['reviews_paid']['key'])); ?> <div class="col-sm-8"> <div class="onoffswitch"> <?php echo FORM::hidden($forms['reviews_paid']['key'], 0); ?> <?php echo Form::checkbox($forms['reviews_paid']['key'], 1, (bool) $forms['reviews_paid']['value'], array('placeholder' => __("TRUE or FALSE"), 'class' => 'onoffswitch-checkbox', 'id' => $forms['reviews_paid']['key'], 'data-content' => __("You need to enable paypal link to allow only reviews on purchases."), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("Reviews for paid transactions"))); ?> <?php echo FORM::label($forms['reviews_paid']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['reviews_paid']['key'])); ?> </div> </div> </div> </div> </div> </div>
?> </div> </div> </div> <?php foreach ($config['providers'] as $api => $options) { ?> <div class="form-group"> <?php echo FORM::label($api, $api, array('class' => 'control-label col-sm-4', 'for' => $api)); ?> <div class="col-sm-8"> <div class="onoffswitch"> <?php echo FORM::hidden($api, 0); ?> <?php echo FORM::checkbox($api, 1, (bool) $options['enabled'], array('placeholder' => "", 'class' => 'onoffswitch-checkbox', 'id' => $api)); ?> <?php echo FORM::label($api, "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $api)); ?> </div> </div> </div> <?php if (isset($options['keys']['id'])) { ?> <div class="form-group"> <?php
/** * 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; }
echo FORM::open(Route::url('oc-panel', array('controller' => 'content', 'action' => 'list')), array('method' => 'GET', 'class' => 'form-horizontal', 'id' => 'locale_form', 'enctype' => 'multipart/form-data')); ?> <div class="form-group"> <div class="col-sm-4"> <?php echo FORM::label('locale', __('Locale'), array('class' => 'control-label', 'for' => 'locale')); ?> <?php echo FORM::select('locale_select', $locale_list, $locale); ?> </div> <div class="col-sm-4"> <?php echo FORM::hidden('type', $type); ?> </div> </div> <?php echo FORM::close(); ?> <?php if (count($contents) > 0) { ?> <div class="row"> <div class="col-md-9"> <div class="panel panel-default"> <div class="panel-body">
<hr> <?php echo FORM::button('submit', __('Save'), array('type' => 'submit', 'class' => 'btn btn-primary', 'action' => Route::url('oc-panel', array('controller' => 'settings', 'action' => 'payment')))); ?> </div> <div id="tabSettingsPaymentPaypal" class="tab-pane fade"> <h4>Paypal</h4> <hr> <div class="form-group"> <?php echo FORM::label($forms['paypal_account']['key'], __('Paypal account'), array('class' => 'control-label', 'for' => $forms['paypal_account']['key'])); ?> <?php echo FORM::hidden($forms['paypal_account']['key'], 0); ?> <?php echo FORM::input($forms['paypal_account']['key'], $forms['paypal_account']['value'], array('placeholder' => "*****@*****.**", 'class' => 'tips form-control', 'id' => $forms['paypal_account']['key'], 'data-original-title' => __("Paypal mail address"), 'data-trigger' => "hover", 'data-placement' => "bottom", 'data-toggle' => "popover", 'data-content' => __("The paypal email address where the payments will be sent"))); ?> <span class="help-block"> <?php echo __("The paypal email address where the payments will be sent"); ?> </span> </div> <div class="form-group"> <?php echo FORM::label($forms['sandbox']['key'], __('Sandbox'), array('class' => 'control-label', 'for' => $forms['sandbox']['key'])); ?>
?> <div class="panel panel-default"> <div class="panel-body"> <?php echo FORM::open(Route::url('oc-panel', array('controller' => 'blog', 'action' => 'update')), array('class' => 'form-horizontal', 'enctype' => 'multipart/form-data')); ?> <fieldset> <?php echo FORM::hidden($form['id_post']['name'], $form['id_post']['value']); ?> <?php echo FORM::hidden($form['id_user']['name'], $form['id_user']['value']); ?> <?php echo FORM::hidden($form['seotitle']['name'], $form['seotitle']['value']); ?> <div class="form-group"> <?php echo FORM::label($form['title']['id'], __('Title'), array('class' => 'control-label col-md-2', 'for' => $form['title']['id'])); ?> <div class="col-sm-4"> <?php echo FORM::input($form['title']['name'], $form['title']['value'], array('placeholder' => __('Title'), 'class' => 'form-control', 'id' => $form['title']['id'], 'required')); ?> </div> </div> <div class="form-group"> <?php echo FORM::label($form['description']['id'], __('Description'), array('class' => 'control-label col-md-2', 'for' => $form['description']['id'])); ?>
echo FORM::input($forms['auto_locate_distance']['key'], $forms['auto_locate_distance']['value'], array('placeholder' => "100", 'class' => 'tips form-control', 'id' => $forms['auto_locate_distance']['key'], 'data-rule-number' => 'true')); ?> <div class="input-group-addon"><?php echo Core::config('general.measurement') == 'metric' ? 'Kilometers' : 'Miles'; ?> </div> </div> <span class="help-block"> <?php echo __("Sets maximum distance of closest suggested locations to the visitor."); ?> </span> </div> <?else :?> <?php echo FORM::hidden($forms['auto_locate_distance']['key'], $forms['auto_locate_distance']['value']); ?> <?endif?> </div> <hr> <p> <?php echo FORM::button('submit', __('Save'), array('type' => 'submit', 'class' => 'btn btn-primary', 'action' => Route::url('oc-panel', array('controller' => 'settings', 'action' => 'form')))); ?> </p> </div> <div id="tabSettingsReview" class="tab-pane fade"> <h4><?php echo __('Reviews Configuration'); ?> <a target="_blank" href="https://docs.yclas.com/review-system-works/">
?> <div class="col-sm-8"> <?php echo FORM::input($forms['smtp_port']['key'], $forms['smtp_port']['value'], array('placeholder' => "", 'class' => 'tips form-control', 'id' => $forms['smtp_port']['key'], 'data-content' => '', 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => '', 'data-rule-digits' => 'true')); ?> </div> </div> <div class="form-group"> <?php echo FORM::label($forms['smtp_auth']['key'], __('Smtp auth'), array('class' => 'control-label col-sm-4', 'for' => $forms['smtp_auth']['key'])); ?> <div class="col-sm-8"> <div class="onoffswitch"> <?php echo FORM::hidden($forms['smtp_auth']['key'], 0); ?> <?php echo Form::checkbox($forms['smtp_auth']['key'], 1, (bool) $forms['smtp_auth']['value'], array('placeholder' => "", 'class' => 'onoffswitch-checkbox', 'id' => $forms['smtp_auth']['key'], 'data-content' => '', 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => '')); ?> <?php echo FORM::label($forms['smtp_auth']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['smtp_auth']['key'])); ?> </div> </div> </div> <div class="form-group"> <?php echo FORM::label($forms['smtp_user']['key'], __('Smtp user'), array('class' => 'control-label col-sm-4', 'for' => $forms['smtp_user']['key'])); ?> <div class="col-sm-8">
?> <?php echo FORM::label($forms['captcha']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['captcha']['key'])); ?> </div> </div> </div> <div class="form-group"> <?php echo FORM::label($forms['recaptcha_active']['key'], "<a target='_blank' href='https://www.google.com/recaptcha/intro/index.html'>" . __("Enable reCAPTCHA as captcha provider") . "</a>", array('class' => 'control-label col-sm-4', 'for' => $forms['recaptcha_active']['key'])); ?> <div class="col-sm-8"> <div class="onoffswitch"> <?php echo FORM::hidden($forms['recaptcha_active']['key'], 0); ?> <?php echo Form::checkbox($forms['recaptcha_active']['key'], 1, (bool) $forms['recaptcha_active']['value'], array('placeholder' => __("TRUE or FALSE"), 'class' => 'onoffswitch-checkbox', 'id' => $forms['recaptcha_active']['key'], 'data-content' => __("If advertisement is marked as spam, user is also marked. Can not publish new ads or register until removed from Black List! Also will not allow users from disposable email addresses to register."), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("Black List"))); ?> <?php echo FORM::label($forms['recaptcha_active']['key'], "<span class='onoffswitch-inner'></span><span class='onoffswitch-switch'></span>", array('class' => 'onoffswitch-label', 'for' => $forms['recaptcha_active']['key'])); ?> </div> </div> </div> <div class="form-group"> <?php echo FORM::label($forms['recaptcha_sitekey']['key'], "<a target='_blank' href='https://www.google.com/recaptcha/admin#list'>" . __('reCAPTCHA Site Key') . "</a>", array('class' => 'control-label col-sm-4', 'for' => $forms['recaptcha_sitekey']['key'])); ?>
</li> <?php } ?> <?php } ?> </ul> </div> </div> <div class="work_filter"> <div class="title">Сортировка по услугам</div> <?php echo FORM::open('#') . FORM::hidden('city_id', $city_id, array('class' => 'city_id_search_by_car')) . FORM::hidden('car_id', $car_id, array('class' => 'car_id_search_by_car')) . FORM::hidden('district_id', $district_id, array('class' => 'district_id_search_by_car')) . FORM::hidden('metro_id', $metro_id, array('class' => 'metro_id_search_by_car')) . FORM::hidden('discount_id', $discount_id, array('class' => 'discount_id_search_by_car')) . FORM::close(); ?> <?php foreach ($works as $category_name => $works) { ?> <?php if (mb_strlen($category_name) > 45) { ?> <div class="category_open_short" title="<?php echo $category_name; ?> "> <?php echo Text::limit_chars($category_name, 45); ?> </div>
<div class="filters_column" > <a href="http://www.mims.ru/ru-RU/visiting/e-ticket/mims_2013.aspx?lang=ru-ru&utm_source=as-avtoservice.ru&utm_medium=Media&utm_campaign=barter"> <?php echo HTML::image('assets/img/banners/334x125_2.gif'); ?> </a> <?php echo FORM::open(NULL); if ($city_id) { echo FORM::hidden('city_id', $city_id); } ?> <div class="hidden_inputs"> <?php echo FORM::hidden('district_id', $district_id); echo FORM::hidden('metro_id', $metro_id); if ($type == 'auto') { echo FORM::checkbox('car[]', $car_id, TRUE); } elseif ($type == 'work') { echo FORM::checkbox('work[]', $work_id, TRUE); } ?> </div> Географические параметры поиска: <br /> <div class="search_info"> <div class="city">город <strong><?php echo $city->name; ?> </strong></div> <div class="district"><?php if (array_key_exists($district_id, $districts)) {