Beispiel #1
2
//index view
$viewId = Yii::$app->request->get('view_id');
if (!isset($viewId)) {
    ?>
    <button type="button" class="btn btn-primary btn-lg" onclick="javascript: $('#address').toggle()">新建收货地址</button>
<?php 
}
?>


<div id="address"  style="display: <?php 
echo isset($viewId) ? 'block' : 'none';
?>
">
    <?php 
$form = \kartik\form\ActiveForm::begin();
/* @var \yincart\customer\models\CustomerAddress $model */
echo $form->field($model, 'province')->dropDownList($catList, ['id' => 'cat-id']);
// Child # 1
echo $form->field($model, 'city')->widget(DepDrop::classname(), ['data' => [$model->city => isset($model->cityArea) ? $model->cityArea->name : ''], 'options' => ['id' => 'subcat-id'], 'pluginOptions' => ['depends' => ['cat-id'], 'placeholder' => 'Select...', 'url' => Url::to(['/customer/get-cities'])]]);
// Child # 2
echo $form->field($model, 'district')->widget(DepDrop::classname(), ['data' => [$model->district => isset($model->districtArea) ? $model->districtArea->name : ''], 'pluginOptions' => ['depends' => ['cat-id', 'subcat-id'], 'placeholder' => 'Select...', 'url' => Url::to(['/customer/get-district'])]]);
?>

    <?php 
echo $form->field($model, 'address')->textInput(['maxlength' => 255]);
?>

    <?php 
echo $form->field($model, 'zip_code')->textInput(['maxlength' => 255]);
?>
Beispiel #2
0
<?php

use yii\helpers\Html;
use kartik\form\ActiveForm;
/* @var $this yii\web\View */
/* @var $model app\modules\admin\models\UserSearch */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="user-search">

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

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

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

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

    <?php 
echo $form->field($model, 'username');
?>
Beispiel #3
0
            <?php 
}
?>
            <?php 
echo $this->title;
?>
&nbsp;
            <small>последнее обновление <?php 
echo Yii::$app->formatter->asDate($user->updatedAt->sec);
?>
</small>
        </h3>
    </div>

    <?php 
$form = ActiveForm::begin(['enableClientValidation' => false]);
?>

    <div class="row">

        <div class="col-lg-7">

            <?php 
echo $form->field($model, 'email')->widget(MaskedInput::className(), ['clientOptions' => ['alias' => 'email']]);
?>

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

            <?php 
Beispiel #4
0
<?php

use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use kartik\form\ActiveForm;
use kartik\widgets\SwitchInput;
use lukisongroup\hrd\models\Corp;
$userCorp = ArrayHelper::map(Corp::find()->all(), 'CORP_ID', 'CORP_NM');
$aryParent = [['PARENT' => 0, 'PAREN_NM' => 'UMUM'], ['PARENT' => 1, 'PAREN_NM' => 'PRODAK']];
$valParent = ArrayHelper::map($aryParent, 'PARENT', 'PAREN_NM');
?>

<div class="tipebarang-form">

    <?php 
$form = ActiveForm::begin(['id' => 'createtipe', 'enableClientValidation' => true, 'type' => ActiveForm::TYPE_HORIZONTAL, 'method' => 'post', 'action' => ['tipebarang/simpan']]);
?>
	<?php 
echo $form->field($model, 'CORP_ID')->dropDownList($userCorp, ['id' => 'rodetail-kd_type'])->label('Perusahaan');
?>
	<?php 
echo $form->field($model, 'PARENT')->dropDownList($valParent);
?>
    <?php 
echo $form->field($model, 'NM_TYPE')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'NOTE')->textarea(['rows' => 6]);
?>
Beispiel #5
0
use kartik\form\ActiveForm;
use kartik\daterange\DateRangePicker;
use kartik\widgets\Select2;
/* @var $this yii\web\View */
/* @var $model humanized\scoopit\models\ScoopSearch */
/* @var $form yii\widgets\ActiveForm */
/*
 * 
 * 
 */
?>

<div class="scoop-search">

    <?php 
$form = ActiveForm::begin(['method' => 'get']);
?>

    <?php 
echo $form->field($model, 'title')->label(false)->textInput(['placeholder' => 'freetext search']);
?>

    <?php 
if (isset($afterSearchTextCallback)) {
    call_user_func($afterSearchTextCallback, $this, $form, $model);
}
echo $form->field($model, 'date_published', ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-calendar"></i>']], 'options' => ['class' => 'drp-container form-group']])->widget(DateRangePicker::classname(), ['useWithAddon' => true, 'convertFormat' => true, 'presetDropdown' => true, 'pluginOptions' => ['locale' => ['format' => 'd M Y', 'separator' => ' to '], 'opens' => 'left']]);
if (isset($afterSearchCalendarCallback)) {
    call_user_func($afterSearchCalendarCallback, $this, $form, $model);
}
// Normal select with ActiveForm & model
<?php

use kartik\form\ActiveForm;
use kartik\icons\Icon;
use kartik\widgets\Select2;
use yii\helpers\Html;
?>
<div class="well">
    <?php 
echo $this->render('alert');
?>
    <?php 
$form = ActiveForm::begin(['id' => 'Administrator', 'action' => \yii\helpers\Url::to(['']), 'type' => ActiveForm::TYPE_HORIZONTAL, 'enableClientScript' => false, 'enableClientValidation' => true, 'encodeErrorSummary' => false, 'formConfig' => ['labelSpan' => 3], 'options' => ['onkeypress' => "return event.keyCode != 13;"]]);
echo $form->errorSummary($admin, ['class' => 'alert alert-danger']);
?>
    <?php 
echo $form->field($admin, 'name')->textInput(['autocomplete' => 'off', 'placeholder' => $admin->getAttributeLabel('name')]);
?>
    <?php 
echo $form->field($admin, 'password')->passwordInput(['autocomplete' => 'off', 'placeholder' => $admin->getAttributeLabel('password')]);
?>
    <?php 
echo $form->field($admin, 'email')->textInput(['autocomplete' => 'off', 'placeholder' => $admin->getAttributeLabel('email')]);
?>
    <?php 
echo \yii\bootstrap\Button::widget(['id' => 'backButton', 'label' => Icon::show('arrow-circle-left') . Yii::t('install', 'Back'), 'encodeLabel' => false, 'options' => ['class' => 'btn btn-info', 'onClick' => new \yii\web\JsExpression("\n            \$('#stepsMenu a:eq({$previousStep})').click();\n            return false;")]]);
echo Html::a(Icon::show('arrow-circle-right') . Yii::t('install', 'Continue'), '', ['class' => 'btn btn-info', 'style' => 'margin-left: 10px;', 'onClick' => new \yii\web\JsExpression("\n        \$('#Administrator').submit();\n        return false;")]);
?>
</div>
Beispiel #7
0
use yii\helpers\Html;
use yii\helpers\Url;
use yii\helpers\ArrayHelper;
use kartik\form\ActiveForm;
use yii\bootstrap\Modal;
use kartik\sortable\Sortable;
use kartik\select2\Select2;
use kartik\dynagrid\Module;
$module = Module::fetchModule();
$listOptions = ['class' => 'form-control dynagrid-detail-list'];
$data = $model->getDtlList();
if (count($data) == 0) {
    $listOptions['prompt'] = Yii::t('kvdynagrid', 'Select...', ['category' => $model->category]);
}
$dataConfig = print_r($model->data, true);
$form = ActiveForm::begin();
echo $form->field($model, 'name', ['addon' => ['append' => ['asButton' => true, 'content' => Html::button('<span class="glyphicon glyphicon-ok"></span>', ['title' => Yii::t('kvdynagrid', 'Save'), 'class' => "dynagrid-detail-save btn btn-primary"]) . Html::button('<span class="glyphicon glyphicon-remove"></span>', ['title' => Yii::t('kvdynagrid', 'Delete'), 'class' => "dynagrid-detail-delete btn btn-danger"])]]])->textInput(['class' => 'form-control dynagrid-detail-name'])->hint(Yii::t('kvdynagrid', "Set a name to save the state of your current grid {category}. You can alternatively select a saved {category} from the list below to edit or delete.", ['category' => $model->category]));
echo $form->field($model, 'editId')->listBox($data, $listOptions);
//$form->field($model, 'dataConfig')->textArea(['class'=>'form-control dynagrid-settings-text', 'readOnly'=>true])
?>
    <div class="dynagrid-settings-text"><?php 
echo $model->getDataConfig();
?>
</div>
<?php 
echo Html::activeHiddenInput($model, 'id', ['id' => $model->key]);
echo Html::activeHiddenInput($model, 'category');
echo Html::activeHiddenInput($model, 'storage');
echo Html::activeHiddenInput($model, 'userSpecific');
echo Html::activeHiddenInput($model, 'dynaGridId');
echo Html::hiddenInput('deleteDetailFlag', 0);
Beispiel #8
0
use yii\helpers\Html;
use kartik\form\ActiveForm;
use kartik\widgets\SwitchInput;
use yii\helpers\ArrayHelper;
use lukisongroup\models\master\Perusahaan;
use lukisongroup\models\hrd\Corp;
/* @var $this yii\web\View */
/* @var $model lukisongroup\models\esm\Suplier */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="suplier-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'method' => 'post', 'action' => ['master/suplier/simpan']]);
?>

    <?php 
//= $form->field($model, 'KD_SUPPLIER')->textInput(['maxlength' => true])
?>

    <?php 
$drop = ArrayHelper::map(Corp::find()->all(), 'CORP_ID', 'CORP_NM');
?>
    <?php 
echo $form->field($model, 'KD_CORP')->dropDownList($drop, ['prompt' => ' -- Pilih Salah Satu --'])->label('Group Perusahaan');
?>
    
    <?php 
echo $form->field($model, 'NM_SUPPLIER')->textInput(['maxlength' => true]);
Beispiel #9
0
use lukisongroup\models\master\Kategori;
use lukisongroup\models\master\Unitbarang;
use lukisongroup\models\master\Suplier;
use lukisongroup\models\master\Perusahaan;
use lukisongroup\models\master\Tipebarang;
use lukisongroup\models\hrd\Corp;
use kartik\widgets\FileInput;
/* @var $this yii\web\View */
/* @var $model lukisongroup\models\master\Barangumum */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="barangumum-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]);
?>

    <?php 
$drop = ArrayHelper::map(Corp::find()->all(), 'CORP_ID', 'CORP_NM');
?>
    <?php 
echo $form->field($model, 'KD_CORP')->dropDownList($drop, ['prompt' => ' -- Pilih Salah Satu --', 'disabled' => true])->label('Group Perusahaan');
?>
    
    <?php 
echo $form->field($model, 'KD_BARANG')->textInput(['maxlength' => true, 'readonly' => true]);
?>

    <?php 
echo $form->field($model, 'NM_BARANG')->textInput(['maxlength' => true]);
 <?php 
use yii\bootstrap\Html;
use kartik\form\ActiveForm;
use kartik\builder\Form;
use kartik\switchinput\SwitchInput;
use yii\helpers\Url;
use frontend\packages\BootstrapTreeviewAsset;
BootstrapTreeviewAsset::register($this);
?>
 

			<?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'formConfig' => ['labelSpan' => 3], 'enableAjaxValidation' => true, 'id' => 'frmBookingForm']);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 3, 'attributes' => ['title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Event title...']], 'description' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Event description...'], 'columnOptions' => ['colspan' => 2]]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['calendar_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ['0' => ''] + yii::$app->CalendarComponent->myCalendarList, 'options' => ['id' => 'calendar_id', 'placeholder' => 'Select a calendar']], 'project_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ['0' => ''] + yii::$app->ProjectComponent->myProjectList, 'options' => ['id' => 'project_id', 'placeholder' => 'Select a project']]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['start_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\datecontrol\\DateControl', 'options' => ['options' => ['id' => 'start_date']]], 'all_day_option_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => $model->allDayOptions]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['start_time' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\time\\TimePicker', 'options' => ['pluginOptions' => ['showMeridian' => false], 'options' => ['id' => 'start_time']]], 'end_time' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\time\\TimePicker', 'options' => ['pluginOptions' => ['showMeridian' => false], 'options' => ['id' => 'end_time']]]]]);
?>
<input type="hidden" name="_csrf" value="<?php 
echo Yii::$app->request->getCsrfToken();
?>
" />
<?php 
\kartik\form\ActiveForm::end();
?>
	
Beispiel #11
0
use yii\helpers\Html;
use kartik\form\ActiveForm;
use kartik\touchspin\TouchSpin;
use app\models\InsightsContent;
/* @var $this yii\web\View */
/* @var $model app\models\InsightsDef */
/* @var $form yii\widgets\ActiveForm */
$items = array(null => '<i class="fa fa-ban"></i>', -2 => '<i class="fa fa-angle-double-down"></i>', -1 => '<i class="fa fa-angle-down"></i>', 0 => '-', 1 => '<i class="fa fa-angle-up"></i>', 2 => '<i class="fa fa-angle-double-up"></i>');
$counter = 0;
?>

<div class="insights-def-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'formConfig' => ['showLabels' => false, 'labelSpan' => 2, 'deviceSize' => ActiveForm::SIZE_LARGE]]);
?>

    <div class="form-group kv-fieldset-inline">
        <?php 
echo Html::activeLabel($model, 'id_category', ['label' => 'Kategoria', 'class' => 'col-sm-1 control-label']);
?>
        <div class="col-sm-2">
            <?php 
echo $form->field($model, 'id_category')->dropDownList($categories);
?>
        </div>
        <?php 
echo Html::activeLabel($model, 'name', ['label' => 'Zapisane wnioski', 'class' => 'col-sm-1 control-label']);
?>
        <div class="col-sm-8">
Beispiel #12
0
<?php

use kartik\form\ActiveForm;
/** @var \backend\modules\ads\models\BannerForm $model */
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'id' => 'edit-ad-form', 'options' => ['data-pjax' => true]]);
echo $form->field($model, 'name'), $form->field($model, 'position')->dropDownList($model->possiblePositions), $form->field($model, 'enableDate')->widget(\kartik\datetime\DateTimePicker::className(), []), $form->field($model, 'disableDate')->widget(\kartik\datetime\DateTimePicker::className(), []), $form->field($model, 'code')->textarea(['style' => 'height: 30vh']), $form->field($model, 'state')->checkbox([], false), \yii\bootstrap\Html::tag('div', \yii\helpers\Html::button('Сохранить', ['class' => 'btn btn-success', 'type' => 'submit']), ['class' => 'text-center']);
$form->end();
Beispiel #13
0
<?php

use yii\helpers\Html;
//use yii\widgets\ActiveForm;
use kartik\form\ActiveForm;
/* @var $this yii\web\View */
/* @var $model app\models\ProductType */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="product-type-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'formConfig' => ['labelSpan' => 2, 'deviceSize' => ActiveForm::SIZE_SMALL]]);
?>

    <?php 
echo $form->field($model, 'product_type')->textInput(['maxlength' => true]);
?>

    <div class="form-group">
        <div class="col-sm-2 col-md-2 col-lg-2"></div>
        <div class="col-sm-10 col-md-10 col-lg-10">
            <?php 
echo Html::submitButton($model->isNewRecord ? '<i class="fa fa-save"></i> บันทึกข้อมูล' : '<i class="fa fa-pencil"></i> แก้ไข', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
            <?php 
echo Html::resetButton('<i class="fa fa-remove"></i> ยกเลิก', ['class' => 'btn btn-danger']);
?>
        </div>
    </div>
Beispiel #14
0
 * @copyright Copyright (c) 2015 kangqingfei
 * @license MIT
 */
use kartik\form\ActiveForm;
use yii\helpers\Html;
/** @var common\models\LoginForm  $loginModel */
$this->title = '登录';
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="kblog-login col-xs-10 col-xs-offset-1 col-sm-8
col-sm-offset-2 col-md-6 col-md-offset-3 col-lg-4 col-lg-offset-4">

    <?php 
//水平表单
$form = ActiveForm::begin([]);
?>
    <div class="form-group ">
        <?php 
echo $form->field($loginModel, 'email', ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-envelope"></i>']], 'showLabels' => false])->textInput(['placeholder' => '请输入邮箱']);
?>

        <?php 
echo $form->field($loginModel, 'password', ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-lock"></i>']], 'showLabels' => false])->passwordInput(['placeholder' => '请输入密码']);
?>
        <span style="float:left; margin-top:-10px">
          <?php 
echo $form->field($loginModel, 'rememberMe')->checkbox();
?>
      </span>
      <span style="float:right; margin-top:0px; margin-left:30px">
Beispiel #15
0
	        ],
	    ]); ?>
	    	<?= $form->field($model, 'sex')->dropdownList($model->sexList())?>
			<?php ActiveForm::end(); ?>
		</div>
		
		<div class="user-head-pic">
			<label>头像</label>
			<img src="<?php echo $model->head_picture;?>" class="img-circle" width="80px" id="head_pic">
			<span class="fa fa-refresh" onclick="changeHeadPic()" id="refresh">换一换</span>
		</div>

		<div class="col-lg-12 col-md-12 col-sm-12 upload-head-pic">
			<?php $form = ActiveForm::begin([
        		'options' => [
            	'class' => 'form-horizontal',
            	'enctype' => 'multipart/form-data',
        	],
	    ]); ?>

			<?= $form->field($model, 'head_picture')->label(Yii::t('app', 'Upload Head Picture'))->widget(FileInput::classname(), [
		    'pluginOptions' => [
		        'uploadUrl' => Url::to(['/user/upload-head-pic']),
		        'uploadAsync' => false,
		        'allowedPreviewTypes' => ['image'],
		        'allowedFileExtensions' => ['png', 'jpg', 'jpeg'],
		        'maxFileCount' => 1,
		        'maxFileSize' => 1000,
		        'uploadExtraData' => [
		            '_csrf' => Yii::$app->request->csrfToken,
		            'User[id]' => $model->id,
		        ] 
Beispiel #16
0
    return \yii\helpers\Html::a('Booked: ' . $data->vid, \yii\helpers\Url::to(['/booking/show', 'id' => $data->id]), ['class' => 'btn btn-xs btn-warning']);
}], ['visible' => !Yii::$app->user->isGuest && Yii::$app->user->identity->isadmin, 'class' => \yii\grid\ActionColumn::className(), 'header' => 'Admin', 'template' => '{turnaround} {delete}', 'buttons' => ['turnaround' => function ($url, $model, $key) {
    if (!$model->turnaround_id) {
        return "<i style='cursor: pointer' onclick='linkturnaround({$model->id})' title='link turnaround flights' class='fa fa-refresh'></i>";
    } else {
        return "<i style='cursor: pointer' onclick='unlinkturnaround({$model->id})' title='unlink turnaround flights' class='fa fa-unlink'></i>";
    }
}]]]]);
?>
    </div>
    <?php 
if (!Yii::$app->user->isGuest && Yii::$app->user->identity->isadmin) {
    ?>
    <div class="row">
        <?php 
    $form = \kartik\form\ActiveForm::begin(['type' => 'inline']);
    echo $form->field($model, 'airline')->textInput(['style' => 'width: 100px;']);
    echo $form->field($model, 'flightnumber')->textInput(['style' => 'width: 100px;']);
    echo $form->field($model, 'gate')->textInput(['style' => 'width: 100px;']);
    echo $form->field($model, 'aircraft')->textInput(['style' => 'width: 100px;']);
    echo $form->field($model, 'icaofrom')->textInput(['style' => 'width: 100px;', 'readonly' => !$model->isarrival]);
    echo $form->field($model, 'icaoto')->textInput(['style' => 'width: 100px;', 'readonly' => $model->isarrival == 1]);
    echo $form->field($model, 'timefrom')->widget(\kartik\widgets\TimePicker::className(), ['pluginOptions' => ['showMeridian' => false], 'options' => ['style' => 'width: 100px;']]);
    echo $form->field($model, 'timeto')->widget(\kartik\widgets\TimePicker::className(), ['pluginOptions' => ['showMeridian' => false], 'options' => ['style' => 'width: 100px;']]);
    echo \yii\bootstrap\Html::submitButton('<i class="fa fa-check"></i>Add', ['class' => 'btn btn-success btn-sm']);
    \kartik\form\ActiveForm::end();
    ?>
        <hr />
        <form method="post" class="form-horizontal" enctype="multipart/form-data">
            <div class="form-group field-batch-loading">
                <input id="form-token" type="hidden" name="<?php 
Beispiel #17
0
 * this js script allows people to press ctrl+s to save values
 * @var [type]
 * <label class="control-label" for="activity-text"><?= \Yii::t('net_frenzel_activity','Notes'); ?></label>
 */
$script = <<<SKRIPT

\$('#activity-text').focus(function() {
    \$('#container_activity_input').show( 1000 );
});

SKRIPT;
$this->registerJs($script);
?>

<?php 
$form = ActiveForm::begin(['action' => ['/activity/default/create'], 'method' => 'POST', 'options' => ['class' => 'form-horizontal', 'data-activity' => 'form', 'data-activity-action' => 'create']]);
?>

<div class="form-group" data-activity="form-group">
    <div class="col-sm-9">
        <?php 
echo net\frenzel\textareaautosize\yii2textareaautosize::widget(['model' => $model, 'attribute' => 'text']);
?>
        <?php 
echo Html::error($model, 'text', ['data-activity' => 'form-summary', 'class' => 'help-block hidden']);
?>
    </div>
    <div class="col-sm-3">
        <label class="control-label" for="net_frenzel_activity_quick_action">&nbsp;&nbsp;&nbsp;</label>
        <?php 
// a button group using Dropdown widget
Beispiel #18
0
<?php

/**
 * @link http://kangqingfei.cn/
 * @copyright Copyright (c) 2015 kangqingfei
 * @license MIT
 */
use yii\helpers\Html;
use kartik\form\ActiveForm;
use kartik\file\FileInput;
?>
<div class="container-fluid">
    <div class="row">
        <?php 
$form = ActiveForm::begin(['id' => 'form-register', 'options' => ['enctype' => 'multipart/form-data']]);
?>

        <div class="col-md-3 col-md-offset-1">
            <?php 
echo $form->field($model, 'avatar')->widget(FileInput::classname(), ['options' => ['accept' => 'image/*'], 'showMessage' => true, 'pluginOptions' => ['previewFileType' => 'image', 'showCaption' => false, 'showUpload' => false, 'showRemove' => false, 'browseClass' => 'btn btn-primary btn-block', 'browseIcon' => '<i class="glyphicon glyphicon-picture"></i> ', 'browseLabel' => '更换头像', 'initialPreview' => [Html::img($model['avatar'] ? $model['avatar'] : Yii::$app->params['defaultAvatar'] . '?imageView2/1/w/200/h/200', ['class' => 'file-preview-image', 'alt' => '没找到默认头像', 'title' => '头像'])]]]);
?>
        </div>

        <div class="col-md-4 col-md-offset-1">
            <br/>
            <?php 
echo $form->field($model, 'username', ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-user"></i>']], 'showLabels' => false, 'enableAjaxValidation' => true])->textInput(['placeholder' => '请输入用户名']);
?>
            <br/>

            <?php 
<?php

use yii\helpers\Html;
use kartik\form\ActiveForm;
use yii\helpers\ArrayHelper;
use kartik\widgets\Select2;
use kartik\widgets\FileInput;
use kartik\widgets\DepDrop;
use yii\helpers\Url;
?>

<div class="barang-form">
	<div class="row">
		<?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'method' => 'post', 'action' => ['/hrd/employe/edit-identity', 'id' => $model->EMP_ID], 'id' => 'form-employe', 'enableClientValidation' => true, 'options' => ['enctype' => 'multipart/form-data']]);
?>
			<?php 
// $form->field($model, 'cabID')->hiddenInput(['value'=>1,'maxlength' => true])->label(false)
?>

			<div class="col-lg-8 pull-right">

					<?php 
echo $form->field($model, 'vCorpID')->textInput(['value' => $model['corpOne']['CORP_NM'], 'maxlength' => true, 'readonly' => true, 'style' => []])->label('Corp');
?>

					<?php 
echo $form->field($model, 'vKarId')->textInput(['value' => $model->EMP_ID, 'maxlength' => true, 'readonly' => true, 'style' => []])->label('Emp.Id');
?>

				<?php 
    <?php 
/* $form = ActiveForm::begin([
       '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' => '',
           ],
       ],
   ]); */
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL, 'id' => $model->formName()]);
//        echo Form::widget([
//                'model'=>$model,
//                'form'=>$form,
//                'attributes'=>[
//                    'autoSave'=>[
//                        'type'=>Form::INPUT_HIDDEN,
//                    ],
//                ]
//            ]);
echo Html::hiddenInput('Ingreso[autoSave]', $model->autoSave);
echo Html::hiddenInput('id', $model->id);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['descripcion' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Ingrese Descripción...']], 'observaciones' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Ingrese Observaciones...']]]]);
echo Html::hiddenInput('action', null, array('id' => 'action'));
echo Html::hiddenInput('user_id', Yii::$app->user->id, array('id' => 'user_id'));
?>
Beispiel #21
0
$this->params['breadcrumbs'][] = ['label' => Yii::t('user', 'Users'), 'url' => [$actions[Module::ACTION_ADMIN_INDEX]]];
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="page-header">
    <div class="pull-right"><?php 
echo AdminMenu::widget(['ui' => 'create', 'user' => $model]);
?>
</div>
    <h1><?php 
echo $this->title;
?>
</h1>
</div>
<?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'formConfig' => ['labelSpan' => 4]]);
echo $form->errorSummary($model);
?>
<!-- dummy inputs to prevent auto fill -->
<input type="text" name="prevent_autofill" id="prevent_autofill" value="" style="display:none;" />
<input type="password" name="password_fake" id="password_fake" value="" style="display:none;" />
<div class="row">
    <div class="col-md-8">
        <?php 
echo $form->field($model, 'username')->textInput(['maxlength' => 128, 'autocomplete' => 'new_username']);
if (in_array(Module::SCN_ADMIN, $m->passwordSettings['strengthMeter'])) {
    echo $form->field($model, 'password')->widget(PasswordInput::classname(), []);
} else {
    echo $form->field($model, 'password')->passwordInput();
}
echo $form->field($model, 'email')->textInput(['maxlength' => 255]);
Beispiel #22
0
use yii\helpers\Html;
use kartik\form\ActiveForm;
use yii\helpers\ArrayHelper;
use common\models\User;
/* @var $this yii\web\View */
/* @var $model backend\modules\caja\models\Arqueo */
/* @var $form yii\widgets\ActiveForm */
/* @var $modelsNotas \backend\modules\caja\models\Conteonotas */
/* @var $modelNotas \backend\modules\caja\models\Conteonotas */
/* @var $ingresoegreso \backend\modules\caja\models\Tipoingresoegreso */
?>

<div class="arqueo-form fondo">
    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL]);
?>

    <div class="row">
        <div class="col-sm-9">
            <?php 
echo $form->field($model, 'comentario')->textarea(['rows' => 3]);
?>
        </div>

        <div class="col-sm-3">
            <?php 
echo $form->field($model, 'propina', ['showLabels' => false])->textInput(['placeholder' => 'Propina del día']);
?>
        </div>
Beispiel #23
0
 * file that was distributed with this source code.
 */
use yii\helpers\Html;
use kartik\form\ActiveForm;
/*
 * @var yii\web\View $this
 * @var jarrus90\User\models\User $user
 */
?>

<?php 
$this->beginContent('@jarrus90/User/views/admin/update.php', ['user' => $user]);
?>
<div class="box box-primary">
    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'enableAjaxValidation' => true, 'enableClientValidation' => false, 'formConfig' => ['labelSpan' => 3]]);
?>
    <div class="box-body">
        <?php 
echo $this->render('_user', ['form' => $form, 'user' => $user]);
?>
    </div>
    <div class="box-footer">
        <?php 
echo Html::submitButton(Yii::t('user', 'Update'), ['class' => 'btn btn-block btn-success']);
?>
    </div>
    <?php 
ActiveForm::end();
?>
</div>
Beispiel #24
0
$isAdmin = $isAdmin == true || $isAdmin === "true";
// admin mode flag
$inputOpts = [];
// readonly/disabled input options for node
$flagOptions = ['class' => 'kv-parent-flag'];
// node options for parent/child
// parse parent key
if (empty($parentKey)) {
    $parent = $node->parents(1)->one();
    $parentKey = empty($parent) ? '' : Html::getAttributeValue($parent, $keyAttribute);
}
// get module and setup form
$module = TreeView::module();
// the treemanager module
$formOptions['id'] = 'kv-' . uniqid();
$form = ActiveForm::begin(['action' => $action, 'options' => $formOptions]);
// the primary key input field
if ($showIDAttribute) {
    $options = ['readonly' => true];
    if ($node->isNewRecord) {
        $options['value'] = Yii::t('kvtree', '(new)');
    }
    $keyField = $form->field($node, $keyAttribute)->textInput($options);
} else {
    $keyField = Html::activeHiddenInput($node, $keyAttribute);
}
// initialize for create or update
$depth = ArrayHelper::getValue($breadcrumbs, 'depth');
$glue = ArrayHelper::getValue($breadcrumbs, 'glue');
$activeCss = ArrayHelper::getValue($breadcrumbs, 'activeCss');
$untitled = ArrayHelper::getValue($breadcrumbs, 'untitled');
Beispiel #25
0
<?php

use yii\helpers\Html;
use kartik\form\ActiveForm;
/* @var $this yii\web\View */
/* @var $model lukisongroup\models\esm\Distributor */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="distributor-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'method' => 'post', 'id' => 'form-', 'enableClientValidation' => true]);
?>

    <?php 
echo $form->field($model, 'NM_DISTRIBUTOR')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'ALAMAT')->textarea(['rows' => 6]);
?>

    <?php 
echo $form->field($model, 'PIC')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'TLP1')->textInput(['maxlength' => true]);
?>
Beispiel #26
0
    }
    var image = '';
    if(repo.brand_logo_full){
        image = '<img src="' + repo.brand_logo_full + '" style="width:50px" />';
    }
    var markup =
'<div class="row">' +
    '<div class="col-sm-1">' + image + '</div>'+
    '<div class="col-sm-3"><b style="margin-left:5px">' + repo.brand_name + '</b></div>' +
    '<div class="col-sm-3">SN:' + repo.brand_store_sn + '</div>' +
'</div>';
    return '<div style="overflow:hidden;">' + markup + '</div>';
};
JS;
$this->registerJs($formatJs, View::POS_HEAD);
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>
<div class="brand-form box-body">
    <?php 
echo $form->field($model, 'sn')->widget(\kartik\widgets\Select2::classname(), ['initValueText' => $model->sn, 'pluginOptions' => ['allowClear' => true, 'minimumInputLength' => 1, 'ajax' => ['url' => \yii\helpers\Url::to(['/admin/brand/get-brand']), 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term}; }')], 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), 'templateResult' => new JsExpression('formatRepo'), 'templateSelection' => new JsExpression('function (brand) {return brand.id;}')]]);
?>
    <?php 
echo $form->field($model, 'cn_name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'en_name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'py_name')->textInput(['maxlength' => true]);
.condition-contain,.condition-key,.condition-val{
    width: 200px;
}
.condition-val{
    height: 28px;
}
.form-group{
    margin-top: 10px;
}

CSS;
$this->registerCss($css);
?>

<?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_INLINE, 'id' => 'sms_config_set']);
?>
<div class="sms-config-form">
    <div class="panel panel-default">
        <div class="panel-heading">接收用户</div>
        <div class="panel-body">
            <?php 
echo $form->field($model, "receiverSelect")->widget(Select2::className(), ["data" => $users, 'options' => ['placeholder' => '选择接收用户'], 'pluginOptions' => ['allowClear' => true, 'multiple' => true]]);
?>
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-heading">消息模版</div>
        <div class="panel-body">
            <?php 
echo $form->field($model, "smsTemplate_id")->widget(Select2::className(), ["data" => $templates, 'options' => ['placeholder' => '选择消息模版'], 'pluginOptions' => ['allowClear' => true]]);
Beispiel #28
0
use yii\helpers\Html;
use kartik\form\ActiveForm;
use yii\helpers\ArrayHelper;
use kartik\widgets\Select2;
use kartik\widgets\FileInput;
use kartik\widgets\DepDrop;
use yii\helpers\Url;
use kartik\widgets\DatePicker;
use kartik\markdown\MarkdownEditor;
?>

<div class="barang-form">
	<div class="row">
		<?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'method' => 'post', 'action' => ['/hrd/employe/edit-profile', 'id' => $model->EMP_ID], 'id' => 'form-employe', 'enableClientValidation' => true]);
?>
			<?php 
// $form->field($model, 'cabID')->hiddenInput(['value'=>1,'maxlength' => true])->label(false)
?>

			<div class="col-lg-8 pull-right">

					<?php 
echo $form->field($model, 'vCorpID')->textInput(['value' => $model['corpOne']['CORP_NM'], 'maxlength' => true, 'readonly' => true, 'style' => []])->label('Corp');
?>

					<?php 
echo $form->field($model, 'vKarId')->textInput(['value' => $model->EMP_ID, 'maxlength' => true, 'readonly' => true, 'style' => []])->label('Emp.Id');
?>
Beispiel #29
0
            <li class="list-group-item"><?php 
echo Yii::t('setup', 'Finished');
?>
</li>
        </ul>
    </div>
    <div class="col-sm-8 form-wrapper">
        <?php 
echo Html::tag('h4', Yii::t('setup', 'Database Configuration'), ['class' => 'step-title']);
?>
        <p><?php 
echo Yii::t('setup', "To set up your Easy Forms database, enter the following information.");
?>
</p>
        <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL]);
?>
        <?php 
echo $form->field($model, 'db_name')->hint(Yii::t('setup', 'The name of the database where your data will be stored in. It must exist on your server before Easy Forms can be installed.'));
?>
        <?php 
echo $form->field($model, 'db_user');
?>
        <?php 
echo $form->field($model, 'db_pass')->passwordInput();
?>

        <style>
            .form-group:last-of-type {
                margin-bottom: 0;
            }
Beispiel #30
0
<?php

use yii\helpers\Html;
use kartik\form\ActiveForm;
/* @var $this yii\web\View */
/* @var $model lukisongroup\models\esm\Unitbarang */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="unitbarang-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'method' => 'post', 'action' => ['esm/unitbarang/simpan']]);
?>

    <?php 
echo $form->field($model, 'NM_UNIT')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'QTY')->textInput(['maxlength' => true]);
?>

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

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