Exemple #1
0
        </div>
        <div class="col-sm-9">
            <div class="content">
                <h1>Добавление объявления</h1>
                <?php 
$form = ActiveForm::begin(['method' => 'post', 'layout' => 'horizontal', 'fieldConfig' => ['template' => "{label}\n{beginWrapper}\n{input}\n{hint}\n{error}\n{endWrapper}", 'horizontalCssClasses' => ['label' => 'col-sm-4', 'offset' => 'col-sm-offset-4', 'wrapper' => 'col-sm-8', 'error' => '', 'hint' => '']]]);
?>

                <?php 
echo $form->field($model, 'name');
?>
                <?php 
echo $form->field($model, 'description')->textarea();
?>
                <?php 
echo $form->field($model, 'geobase_city')->widget(Typeahead::classname(), ['scrollable' => false, 'pluginOptions' => ['highlight' => true], 'dataset' => [['remote' => ['url' => Url::to(['/geobase/city-list']) . '?q=%QUERY', 'wildcard' => '%QUERY'], 'limit' => 10]]]);
?>
                <?php 
echo $form->field($model, 'links_id')->widget(CategoryLinkSelect::className(), ['pluginOptions' => ['url' => '/', 'categories_id' => 3]]);
?>
                <?php 
echo $form->field($model, 'gallery_groups_id')->widget(GalleryManager::className(), ['pluginOptions' => ['type' => 'tor', 'apiUrl' => 'gallery-manager', 'webRoute' => Yii::getAlias('@frontend/web')]]);
?>

                <?php 
echo $form->field($model, 'price', ['template' => '{label}<div class="col-sm-3"><div class="input-group">{input}<div class="input-group-addon">' . Icon::show('rub', [], Icon::FA) . '</div></div></div>{error}'])->label($model->getAttributeLabel('price'), ['class' => 'col-sm-4 control-label']);
?>

                <div class="panel panel-default">
                    <div class="panel-body">
                        <ul class="list-unstyled" style="margin:0;">
Exemple #2
0
   </div>
   </div>
   
   <div class="row clearfix text-center" >
   <div class="row" id="manu">   
   
       <div class="col-md-12 column text-center" style="font-family: lucida sans,sans-serif; color: grey; margin-top: 30px; margin-bottom: 30px;" >
                   
       <div class="col-sm-6 nopadding" style="margin-top: 10px;"><img class="mainlog" src="http://motormetric.com/images/manu.png" style="opacity: .55;"></div>                      
               
     </div>       
   </div>
   	<div class="col-md-10 column col-md-offset-1" style="text-align: center;font-family: lucida sans,sans-serif;">
  
  <?php 
echo Typeahead::widget(['name' => 'country', 'id' => 'carmain', 'options' => ['placeholder' => 'Enter the car you want to buy'], 'pluginOptions' => ['highlight' => true], 'dataset' => [['datumTokenizer' => "Bloodhound.tokenizers.obj.whitespace('value')", 'display' => 'value', 'prefetch' => '/samples/car_main1.json', 'limit' => 30]]]);
?>
   </div>
   
   
    
    </div>
    
    <div class="row clearfix text-center" style="margin-top: 40px;">
    	<div class="col-md-10 column col-md-offset-1" >
    	
    	<div class="form-group">
    	        <?php 
echo Html::submitButton('Get Best Quote!', ['class' => 'btn btn-primarymain', 'name' => 'login-button']);
?>
    	        
Exemple #3
0
    
    </div>
    
   <div class="col-md-4 column col-md-offset-2" style="margin-top: 50px;" >
   
   <div class="form-group">
     <input type="email" class="form-control" id="email" placeholder="Enter Email ID" style="height: 40px;">
   </div>
       
    
    </div>
    
    <div class="col-md-4 column"  style="margin-top: 50px;" >
    
    <?php 
echo Typeahead::widget(['name' => 'country', 'id' => 'city', 'options' => ['placeholder' => 'Enter City'], 'pluginOptions' => ['highlight' => true], 'dataset' => [['datumTokenizer' => "Bloodhound.tokenizers.obj.whitespace('value')", 'display' => 'value', 'prefetch' => '/samples/cities3.json']]]);
?>
     
     
     </div>
    

    </div>
    
    <div class="row clearfix text-center" style="margin-top: 30px;  margin-bottom: 140px;">
    	<div class="col-md-10 column col-md-offset-1" >
    	
    	<div class="form-group" style="margin-bottom: 50px;">
    	        <?php 
echo Html::submitButton('Notify Me', ['class' => 'btn btn-primarysign', 'name' => 'login-button']);
?>
Exemple #4
0
 /**
  *
  */
 public function renderSearch($configuration)
 {
     return Html::tag('div', \kartik\typeahead\Typeahead::widget($configuration), ['class' => 'search-inline', 'id' => 'cd-search']);
 }
 public function typeahead($url, $options = [], $widgetOptions = [])
 {
     Html::addCssClass($options, 'form-control');
     $options = ArrayHelper::merge(['options' => $options, 'dataset' => [['datumTokenizer' => new JsExpression("Bloodhound.tokenizers.obj.whitespace('name')"), 'queryTokenizer' => new JsExpression("Bloodhound.tokenizers.whitespace"), 'remote' => ['url' => Url::to([$url, 'q' => 'QRY']), 'wildcard' => 'QRY'], 'display' => 'text']]], $widgetOptions);
     return $this->widget(Typeahead::className(), $options);
 }
Exemple #6
0
<br /><br />
<div class="main-create col-xs-12">

    <?php 
$form = ActiveForm::begin(['id' => 'generator', 'type' => ActiveForm::TYPE_HORIZONTAL, 'formConfig' => ['labelSpan' => 3, 'deviceSize' => ActiveForm::SIZE_SMALL, 'showLabels' => true], 'enableClientValidation' => false]);
?>
    <div class="form-group kv-fieldset-inline">
        <div class="col-sm-6">
            <?php 
$where = 'user_id = ' . Yii::$app->user->identity->id;
$main_data = backend\models\Main::find()->select(['profile_name'])->andWhere($where)->orderBy('profile_name')->asArray()->all();
if (!empty($main_data)) {
    foreach ($main_data as $key => $value) {
        $main_list[] = $value['profile_name'];
    }
    echo $form->field($model, 'profile_name')->widget(Typeahead::classname(), ['pluginOptions' => ['highlight' => true], 'dataset' => [['local' => $main_list, 'limit' => 10]]])->label(Yii::t('backend', 'Template') . '&#160;<span style="color: red;">*</span>');
} else {
    echo $form->field($model, 'profile_name')->textInput()->label(Yii::t('backend', 'Template') . '&#160;<span style="color: red;">*</span>');
}
?>
        </div>
        <div class="col-sm-4">
            <div class="form-group">
                <?php 
echo Html::submitButton(Yii::t('backend', 'Save'), ['name' => 'save', 'value' => 1, 'class' => 'btn btn-success']);
?>
                <?php 
echo Html::resetButton(Yii::t('backend', 'Clear'), ['class' => 'btn btn-default']);
?>
                <span>&#160;</span>
                <?php 
Exemple #7
0
/* @var $form yii\widgets\ActiveForm */
?>

<div class="panel panel-warning">
    <div class="panel-heading"><?php 
echo Module::t('main', 'Post search');
?>
</div>
    <div class="panel-body">

        <?php 
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get', 'layout' => 'inline']);
?>

            <?php 
echo $form->field($model, 'title')->widget(Typeahead::classname(), ['options' => ['placeholder' => Module::t('main', 'Enter post title...')], 'pluginOptions' => ['highlight' => true], 'dataset' => [['local' => $titles]]]);
?>

            <?php 
echo Html::submitButton('<span class="glyphicon glyphicon-search"></span> ' . Module::t('main', 'Search'), ['class' => 'btn btn-primary']);
?>
            <?php 
echo Html::a('<span class="glyphicon glyphicon-remove text-danger"></span>', ['post/index'], ['class' => 'btn btn-default']);
?>

        <?php 
ActiveForm::end();
?>

    </div>
</div>
Exemple #8
0
use kartik\date\DatePicker;
use kartik\typeahead\Typeahead;
use yii\helpers\Url;
use yii\web\JsExpression;
?>

<?php 
$form = ActiveForm::begin(['enableClientValidation' => false, 'layout' => 'horizontal', 'fieldConfig' => ['horizontalCssClasses' => ['label' => 'col-sm-4', 'offset' => 'col-sm-offset-4', 'wrapper' => 'col-sm-7']]]);
?>

<?php 
echo $form->field($model, 'mobileNumber')->widget(Typeahead::className(), ['pluginOptions' => ['highlight' => true], 'dataset' => [['remote' => Url::to(['number-list']) . '?q=%QUERY']]]);
?>

<?php 
echo $form->field($model, 'employeeName')->widget(Typeahead::className(), ['pluginOptions' => ['highlight' => true], 'pluginEvents' => ["typeahead:selected" => 'function(e, suggestion){$(\'input[name="' . $model->formName() . '[employeePost]"]\').val(suggestion[\'post\']);}'], 'dataset' => [['templates' => ['suggestion' => new JsExpression("Handlebars.compile('<p>{{value}}</p><p class=\"text-muted small\"><em>{{post}}</em></p>')")], 'remote' => Url::to(['/directory/employee/auto-complete']) . '?q=%QUERY', 'limit' => 5]]]);
?>

<?php 
echo $form->field($model, 'employeePost');
?>

<?php 
echo $form->field($model, 'beginDate')->widget(DatePicker::className(), ['attribute2' => 'endDate', 'type' => DatePicker::TYPE_RANGE, 'separator' => '-', 'options' => ['placeholder' => 'c'], 'options2' => ['placeholder' => 'по'], 'pluginOptions' => ['autoclose' => true]])->label('Дата командировки');
?>

<?php 
echo $form->field($model, 'rentNumberDate')->widget(DatePicker::className(), ['type' => DatePicker::TYPE_INPUT, 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true]]);
?>

<?php 
Exemple #9
0
            </div>
            <div class="pull-left info">
                <p><?php 
echo \Yii::$app->user->identity->username;
?>
</p>

                <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
            </div>
        </div>

        <!-- search form -->
        <form action="#" method="get" class="sidebar-form" style="overflow: visible;">
            <div class="input-group">
                <?php 
echo \kartik\typeahead\Typeahead::widget(['name' => 'term', 'options' => ['id' => 'searchInput', 'placeholder' => 'Поиск...', 'class' => 'form-control', 'style' => 'color: #dfdfdf'], 'pluginOptions' => ['highlight' => true, 'minLength' => 3], 'dataset' => [['display' => 'title', 'limit' => 10, 'remote' => ['url' => \yii\helpers\Url::to(['/site/search']) . '?term=%QUERY', 'wildcard' => '%QUERY']]]]);
?>
              <span class="input-group-btn">
                <button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i>
                </button>
              </span>
            </div>
        </form>
        <!-- /.search form -->

        <?php 
echo dmstr\widgets\Menu::widget(['options' => ['class' => 'sidebar-menu'], 'items' => [['label' => 'Материалы', 'options' => ['class' => 'header']], ['label' => 'Категории', 'icon' => 'fa fa-sitemap', 'url' => '#', 'items' => [['label' => 'Список категорий', 'icon' => 'glyphicon glyphicon-list-alt', 'url' => ['/categories/default/index']], ['label' => 'Добавить категорию', 'icon' => 'fa fa-folder-o', 'url' => ['/categories/default/add']]]], ['label' => 'Новости', 'icon' => 'fa fa-newspaper-o', 'url' => '#', 'items' => [['label' => 'Список новостей', 'icon' => 'glyphicon glyphicon-list-alt', 'url' => ['/news/default/index']], ['label' => 'Избранные новости', 'icon' => 'fa fa-star', 'url' => ['/news/default/favorite']], ['label' => 'Удалённые новости', 'icon' => 'fa fa-trash', 'url' => ['/news/default/deleted']], ['label' => 'Добавить новость', 'icon' => 'fa fa-file-text-o', 'url' => ['/news/default/new']], ['label' => '', 'options' => ['class' => 'header']], ['label' => 'Комментарии', 'icon' => 'fa fa-comments', 'url' => ['/comments/default/index']]]], ['label' => 'Баннеры', 'icon' => 'fa fa-picture-o', 'url' => ['/ads/default/index']], ['label' => 'Темы', 'icon' => 'fa fa-wpforms', 'url' => ['/themes/default/index']], ['label' => 'Анонсы', 'icon' => 'fa fa-sticky-note-o', 'url' => ['/announcements/default/index']], ['label' => 'Опросы', 'icon' => 'fa fa-question', 'url' => ['/quiz/default/index']], ['label' => 'Настройки', 'icon' => 'fa fa-cogs', 'url' => '#', 'items' => [['label' => 'Главная страница', 'icon' => 'fa fa-question', 'url' => ['/system/default/main-page']], ['label' => 'Шаблон', 'icon' => 'fa fa-question', 'url' => ['/system/default/template']]]], ['label' => 'Система', 'icon' => 'fa fa-share', 'url' => '#', 'items' => [['label' => 'Администраторы', 'icon' => 'fa fa-user-secret', 'url' => ['/siteusers/default/index']], ['label' => 'Менеджер меню', 'icon' => 'fa fa-bars', 'url' => ['/menu/default/index']], ['label' => 'Менеджер rss', 'icon' => 'fa fa-rss', 'url' => ['/rss/default/index']], ['label' => '', 'options' => ['class' => 'header']], ['label' => 'Gii', 'icon' => 'fa fa-file-code-o', 'url' => ['/gii']], ['label' => 'Дебаг', 'icon' => 'fa fa-dashboard', 'url' => ['/debug']]]]]]);
?>

    </section>
        <?php 
echo Html::ul($interests, ['class' => 'list-inline', 'item' => function ($item, $index) {
    /* @var $item UsersInterests */
    $delete_link = Html::a(FA::icon('times'), ['delete-user-interest', UsersInterests::FIELD_INTEREST_ID => $item->interest_id], ['data-confirm' => Yii::t('yii', 'Are you sure you want to delete "' . $item->interest->title . '" interest?')]);
    return Html::tag('li', '<div class="well well-sm">' . $item->interest->title . '&nbsp&nbsp' . $delete_link . '</div>');
}]);
?>
    </div>
</div>
<div class="row">
    <div class="col-sm-12 text-right">
        <?php 
$form_interest = ActiveForm::begin(['id' => 'interests-form', 'options' => ['class' => 'form-inline'], 'fieldConfig' => ['template' => "{input}"]]);
?>
            <?php 
echo $form_interest->field($interests_model, UsersInterestsForm::FIELD_TITLE)->widget(Typeahead::className(), ['dataset' => [['local' => ArrayHelper::getColumn(Interests::find()->all(), Interests::FIELD_TITLE), 'limit' => 10]], 'pluginOptions' => ['highlight' => true]]);
?>
            <?php 
echo Html::submitButton('Add', ['class' => 'btn btn-success', 'form' => 'interests-form']);
?>
        <?php 
ActiveForm::end();
?>
    </div>
</div>
<hr>
<div class="row">
    <div class="col-sm-6 text-left">
        <?php 
echo Html::a('Home', '/site/index', ['class' => 'btn btn-default']);
?>
Exemple #11
0
<?php 
$data = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'];
// Usage without a model (with search term highlighting)
/*echo '<label class="control-label">State</label>';
echo Typeahead::widget([
    'name' => 'state_10',
    'options' => ['placeholder' => 'Filter as you type ...'],
    'pluginOptions' => ['highlight'=>true],
    'dataset' => [
        [
            'local' => $data,
            'limit' => 10
        ]
    ]
]);*/
echo Typeahead::widget(['name' => 'country', 'options' => ['placeholder' => 'Filter as you type ...'], 'pluginOptions' => ['highlight' => true], 'dataset' => [['datumTokenizer' => "Bloodhound.tokenizers.obj.whitespace('value')", 'display' => 'value', 'prefetch' => Url::to(['site/demo']), 'remote' => ['url' => Url::to(['site/demo']) . '?q=%QUERY', 'wildcard' => '%QUERY']]]]);
?>


<?php 
$js = '// AJAX call for autocomplete
        $("#search-box").keyup(function(){
            $.ajax({
                type: "POST",
                url: "' . Url::toRoute('/site/demo') . '",
                data:"keyword="+$(this).val(),
                beforeSend: function(){
                    $("#search-box").css("background","#FFF url(LoaderIcon.gif) no-repeat 165px");
                },
                success: function(data){
                    $("#suggesstion-box").show();
Exemple #12
0
echo $form->field($model, 'description')->textInput();
?>
      <?php 
echo $form->field($model, 'device_type')->widget(Typeahead::classname(), ['options' => ['placeholder' => 'Filter as you type ...'], 'pluginOptions' => ['highlight' => true], 'dataset' => ['source' => ['prefetch' => Url::to(['device-type/list'])]]]);
?>
      <?php 
echo $form->field($model, 'manufacturer')->widget(Typeahead::classname(), ['options' => ['placeholder' => 'Filter as you type ...'], 'pluginOptions' => ['highlight' => true], 'dataset' => ['source' => ['local' => count($manufacturers) ? $manufacturers : ['']]]]);
?>
      <?php 
echo $form->field($model, 'odm')->widget(Typeahead::classname(), ['options' => ['placeholder' => 'Filter as you type ...'], 'pluginOptions' => ['highlight' => true], 'dataset' => ['source' => ['local' => count($manufacturers) ? $manufacturers : ['']]]]);
?>
      <?php 
echo $form->field($model, 'model_number')->widget(Typeahead::classname(), ['options' => ['placeholder' => 'Filter as you type ...'], 'pluginOptions' => ['highlight' => true], 'dataset' => ['source' => ['prefetch' => Url::to(['model-number/list'])]]]);
?>
      <?php 
echo $form->field($model, 'chipset')->widget(Typeahead::classname(), ['options' => ['placeholder' => 'Filter as you type ...'], 'pluginOptions' => ['highlight' => true], 'dataset' => ['source' => ['prefetch' => Url::to(['chipset/list'])]]]);
?>
      <?php 
echo $form->field($model, 'fcc_number')->textInput();
?>
      <?php 
echo $form->field($model, 'download_url')->textInput();
?>
      <?php 
echo $form->field($model, 'mac_address')->textInput();
?>
      <?php 
echo $form->field($model, 'notes')->textArea(['rows' => 6]);
?>
    </div>
    <div class="box-footer">