Usage example: php use kartik\form\ActiveForm; use kartik\builder\FormGrid; $form = ActiveForm::begin($options); // $options is array for your form config echo FormGrid::widget([ 'model' => $model, // your model 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [ [ 'attributes' => [ 'username' => ['type' => Form::INPUT_TEXT, 'options'=> ['placeholder'=>'Enter username...']], 'password' => ['type' => Form::INPUT_PASSWORD], ] ], [ 'attributes' => [ 'first_name' => ['type' => Form::INPUT_TEXT], 'last_name' => ['type' => Form::INPUT_PASSWORD], ] ] ] ]); ActiveForm::end();
부터: 1.0
저자: Kartik Visweswaran (kartikv2@gmail.com)
상속: extends yii\bootstrap\Widget
예제 #1
0
파일: _form_view.php 프로젝트: ptrnov/WND-W
<?php

use yii\helpers\Html;
use app\models\hrd\Corp;
use app\models\hrd\Dept;
use app\models\hrd\Jabatan;
use app\models\hrd\Status;
use app\models\hrd\Employe;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\builder\FormGrid;
use kartik\widgets\FileInput;
use yii\helpers\ArrayHelper;
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL]);
//$form = ActiveForm::begin(['type'=>ActiveForm::TYPE_VERTICAL]);
$nlDigit = Employe::find()->count() + 1;
$nl = 'LG' . $nlDigit;
echo FormGrid::widget(['model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['contentBefore' => '<legend class="text-info"><small>EMPLOYE IDENTITY</small></legend>', 'columns' => 1, 'autoGenerateColumns' => false, 'attributes' => ['employe_identity' => ['label' => 'Employee.ID', 'columns' => 5, 'attributes' => ['EMP_ID' => ['type' => Form::INPUT_TEXT, 'Form::SIZE_LARGE', 'options' => ['value' => $nl], 'columnOptions' => ['colspan' => 3]], 'EMP_NM' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter First Name...'], 'columnOptions' => ['colspan' => 4]], 'EMP_NM_BLK' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Last Name...'], 'columnOptions' => ['colspan' => 4]]]]]], ['contentBefore' => '<legend class="text-info"><small>CORPORATE IDENTITY</small></legend>', 'columns' => 2, 'autoGenerateColumns' => false, 'attributes' => ['employe_identity' => ['label' => 'Company', 'columns' => 2, 'attributes' => ['EMP_CORP_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Corp::find()->orderBy('SORT')->asArray()->all(), 'CORP_ID', 'CORP_NM'), 'columnOptions' => ['colspan' => 1]], 'DEP_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Dept::find()->orderBy('SORT')->asArray()->all(), 'DEP_ID', 'DEP_NM'), 'hint' => 'Select Department', 'columnOptions' => ['colspan' => 1]], 'JAB_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Jabatan::find()->orderBy('SORT')->asArray()->all(), 'JAB_ID', 'JAB_NM'), 'hint' => 'Select	Position ', 'columnOptions' => ['colspan' => 1]], 'EMP_STS' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Status::find()->orderBy('SORT')->asArray()->all(), 'STS_ID', 'STS_NM'), 'hint' => 'Select Employee Status', 'columnOptions' => ['colspan' => 1]], 'EMP_JOIN_DATE' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker', 'options' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'todayHighlight' => true]], 'hint' => 'Enter Join Date (yyyy-mm-dd)', 'columnOptions' => ['colspan' => 1]], 'EMP_RESIGN_DATE' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker', 'options' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'todayHighlight' => true]], 'hint' => 'Enter Resign Date (yyyy-mm-dd)', 'columnOptions' => ['colspan' => 1]]]]]], ['contentBefore' => '<legend class="text-info"><small>EMPLOYEE PROFILE</small></legend>', 'columns' => 3, 'autoGenerateColumns' => false, 'attributes' => ['address_detail' => ['label' => 'Address', 'columns' => 6, 'attributes' => ['EMP_KTP' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter NO KTP...'], 'columnOptions' => ['colspan' => 2]], 'EMP_ALAMAT' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Enter address...'], 'columnOptions' => ['colspan' => 6]], 'EMP_ZIP' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Zip...'], 'columnOptions' => ['colspan' => 1]], 'EMP_HP' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Phone...'], 'columnOptions' => ['colspan' => 2]], 'EMP_GENDER' => ['type' => Form::INPUT_RADIO_LIST, 'items' => ['Male' => 'Male', 'Female' => 'Female'], 'options' => ['inline' => 'Male'], 'columnOptions' => ['colspan' => 4]], 'EMP_TGL_LAHIR' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker', 'options' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'todayHighlight' => true]], 'hint' => 'Enter birthday  (yyyy-mm-dd)', 'columnOptions' => ['colspan' => 3]], 'EMP_EMAIL' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'acount@domain.com...', 'addon' => ['prepend' => ['content' => '@']]], 'columnOptions' => ['colspan' => 3]]]]]], ['columns' => 3, 'attributes' => ['address_detail' => ['label' => 'Picture', 'columns' => 6, 'attributes' => ['EMP_IMG' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\FileInput', 'columnOptions' => ['colspan' => 2]]]]]], ['attributes' => ['actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="text-align: right; margin-top: 20px">' . Html::resetButton('Reset', ['class' => 'btn btn-default']) . ' ' . Html::submitButton('Submit', ['class' => 'btn btn-primary']) . '</div>']]]]]);
ActiveForm::end();
예제 #2
0
<?php

use yii\helpers\Html;
use lukisongroup\hrd\models\Dept;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\builder\FormGrid;
use kartik\widgets\FileInput;
use yii\helpers\ArrayHelper;
$this->sideMenu = 'hrd';
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL]);
$nlDigit = Dept::find()->count() + 1;
$nl = 'LG' . $nlDigit;
?>

<?php 
echo FormGrid::widget(['model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['contentBefore' => '<legend class="text-info"><small>DEPARTMENT IDENTITY</small></legend>', 'columns' => 1, 'autoGenerateColumns' => false, 'attributes' => ['employe_identity' => ['label' => 'Dept.ID', 'columns' => 5, 'attributes' => ['DEP_ID' => ['type' => Form::INPUT_TEXT, 'Form::SIZE_LARGE', 'options' => [], 'columnOptions' => ['colspan' => 3]], 'DEP_NM' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Department Name...'], 'columnOptions' => ['colspan' => 4]], 'DEP_DCRP' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Department Description ...'], 'columnOptions' => ['colspan' => 4]], 'SORT' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'SORT...'], 'columnOptions' => ['colspan' => 4]]]]]], ['attributes' => ['actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="text-align: right; margin-top: 20px">' . Html::resetButton('Reset', ['class' => 'btn btn-default']) . ' ' . Html::submitButton('Submit', ['class' => 'btn btn-primary']) . '</div>']]]]]);
ActiveForm::end();
예제 #3
0
파일: _form.php 프로젝트: C12D/advanced
<?php

use yii\helpers\Html;
use kartik\widgets\ActiveForm;
use kartik\grid\GridView;
use kartik\builder\Form;
use kartik\builder\FormGrid;
use dosamigos\ckeditor\CKEditor;
use dosamigos\datetimepicker\DateTimePicker;
//use dosamigos\datepicker\DatePicker;
use kartik\editable\Editable;
use kartik\widgets\DepDrop;
$this->sideMenu = 'itprogrammer';
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]);
?>
<div class="row">
    <div class="col-md-8">
        <?php 
echo FormGrid::widget(['model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['contentBefore' => '<div class="box box-warning box-solid "> <div class="box-header with-border ">Manage Jobs</div></div>', 'columns' => 4, 'attributes' => ['employe_identity' => ['columns' => 4, 'label' => 'Entry Jobs :', 'attributes' => ['proggres_id' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter First Name...', 'readonly' => true], 'columnOptions' => ['colspan' => 1], 'hint' => 'Job.Id '], 'modul' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter First Name...'], 'columnOptions' => ['colspan' => 2], 'hint' => 'Corp Modul '], 'judul' => ['hint' => 'Job Titles ', 'type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter First Name...'], 'columnOptions' => ['colspan' => 3]], 'user_id' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter First Name...', 'value' => Yii::$app->user->identity->id], 'hint' => 'Author By', 'columnOptions' => ['colspan' => 1]], 'keterangan' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => 'dosamigos\\ckeditor\\CKEditor', 'options' => ['preset' => 'basic'], 'columnOptions' => ['colspan' => 4], 'hint' => 'Job Descriptions ']]]]], ['attributes' => ['employe_identity' => ['label' => 'Progress :', 'columns' => 4, 'attributes' => ['start_data' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker', 'options' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'todayHighlight' => true]], 'hint' => 'Enter Join Date (yyyy-mm-dd)', 'columnOptions' => ['colspan' => 2]], 'end_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker', 'options' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'todayHighlight' => true]], 'hint' => 'Enter Join Date (yyyy-mm-dd)', 'columnOptions' => ['colspan' => 2]], 'proggres' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter First Name...'], 'columnOptions' => ['colspan' => 2]], 'status' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter First Name...'], 'columnOptions' => ['colspan' => 2]]]]]], ['attributes' => ['actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="text-align: left; margin-top: 20px; margin-bottom: 20px;  margin-left: 20px">' . Html::resetButton('Reset', ['class' => 'btn btn-default']) . ' ' . Html::submitButton('Submit', ['class' => 'btn btn-primary']) . '</div>']]]]]);
ActiveForm::end();
?>
    </div>
</div>
예제 #4
0
            </div>

            <div class="wrapper headline">

                <label class="head">
                    <i class="fa fa-map-marker"></i>&nbsp;
                    <?php 
echo Yii::t('app', 'User profile info');
?>
                </label>
                <i class="fa fa-chevron-right chevron"></i>
            </div>

            <div class="wrapper body" style="border-top:none;">
<?php 
echo FormGrid::widget(['model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['options' => ['tag' => 'div'], 'attributes' => ['first_name' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter first name...']], 'last_name' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter last name...']]]], ['options' => ['tag' => 'div'], 'attributes' => ['street' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter address...'], 'columnOptions' => ['colspan' => 3]], 'zip' => ['type' => Form::INPUT_HTML5, 'options' => ['placeholder' => 'Zip...'], 'columnOptions' => ['colspan' => 1], 'html5type' => 'number'], 'city' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'city...'], 'columnOptions' => ['colspan' => 2]], 'country' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'country...'], 'columnOptions' => ['colspan' => 2]]]]]]);
?>
            </div>

<?php 
echo FormGrid::widget(['model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['options' => ['tag' => 'div'], 'attributes' => ['actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="text-align: right; margin-top: 20px">' . Html::resetButton('Reset', ['class' => 'btn btn-default']) . ' ' . Html::submitButton('Submit', ['class' => 'btn btn-primary']) . '</div>']]]]]);
?>

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


예제 #5
0
파일: login.php 프로젝트: C12D/advanced
<?php

require '_index_nologin.php';
use yii\helpers\Html;
use kartik\icons\Icon;
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \common\models\LoginForm */
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\builder\FormGrid;
use yii\bootstrap\Modal;
//use kartik\widgets\FileInput;
//echo $pk_emp.'ok';
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL]);
$formlogin = FormGrid::widget(['model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['contentBefore' => '<legend class="text-info"><small>User Login</small></legend>', 'columns' => 1, 'autoGenerateColumns' => false, 'attributes' => ['employe_identity' => ['columns' => 2, 'attributes' => ['username' => ['type' => Form::INPUT_TEXT, 'Form::SIZE_LARGE', 'options' => ['placeholder' => 'Enter username...'], 'columnOptions' => ['colspan' => 2]]]]]], ['columns' => 1, 'autoGenerateColumns' => false, 'attributes' => ['employe_identity' => ['columns' => 2, 'attributes' => ['password' => ['type' => Form::INPUT_PASSWORD, 'options' => ['placeholder' => 'Enter Password...'], 'columnOptions' => ['colspan' => 2]]]]]], ['columns' => 1, 'attributes' => ['actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="text-align: right; margin-top: 25px">' . Html::submitButton('Login', ['class' => 'btn btn-primary']) . '</div>']]]]]);
?>
<!-- <div class="col-md-3 col-md-offset-5" style="margin-top: 10px"> !-->
<?php 
Modal::begin(['id' => 'modal_login']);
echo $formlogin;
Modal::end();
ActiveForm::end();
?>
</div>




예제 #6
0
파일: view_2_2.php 프로젝트: ptrnov/WND-W
	<?php 
/*	
composer
detail view
form builder
*/
// mengunakan modal
//Modal::begin([
// 'header' => '<h4 class="modal-title">Detail View Demo</h4>',
//  'toggleButton' => ['label' => '<i class="glyphicon glyphicon-th-list"></i> Detail View in Modal', 'class' => 'btn btn-primary']
//]);
//use kartik\builder\Form;
//Bulider Standard
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_INLINE]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => $model->FormAttribs]);
ActiveForm::end();
//Bulder Grid
use kartik\builder\FormGrid;
$form = ActiveForm::begin();
echo FormGrid::widget(['model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['attributes' => ['EMP_ID' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter username...']], 'EMP_NM' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter password...']]]], ['attributes' => ['EMP_ID' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter username...']], 'EMP_NM' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter password...']]]]]]);
ActiveForm::end();
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_INLINE]);
echo Growl::widget(['type' => Growl::TYPE_MINIMALIST, 'title' => 'Kartik Visweswaran', 'icon' => 'http://placeimg.com/200/150/people/2', 'iconOptions' => ['class' => 'img-circle pull-left'], 'body' => 'Momentum reduce child mortality effectiveness incubation empowerment connect.', 'showSeparator' => false, 'delay' => 700, 'pluginOptions' => ['icon_type' => 'image', 'showProgressbar' => false, 'placement' => ['from' => 'top', 'align' => 'right']]]);
ActiveForm::end();
use kartik\widgets\FileInput;
$form = ActiveForm::begin();
echo FileInput::widget(['name' => 'attachment_49[]', 'options' => ['multiple' => true], 'pluginOptions' => ['initialPreview' => [Html::img("http://placeimg.com/200/150/people/1.jpg", ['class' => 'file-preview-image', 'alt' => 'The Moon', 'title' => 'The Moon']), Html::img("http://placeimg.com/200/150/people/2.jpg", ['class' => 'file-preview-image', 'alt' => 'The Earth', 'title' => 'The Earth'])], 'initialPreviewConfig' => ['{caption: "People-1.jpg", width: "20px", url: "/site/file-delete", key: 1}', '{caption: "People-2.jpg", width: "20px", url: "/site/file-delete", key: 2}'], 'initialCaption' => "The Moon and the Earth", 'overwriteInitial' => false]]);
ActiveForm::end();
?>
</div>
예제 #7
0
파일: _form.php 프로젝트: C12D/advanced
<?php

use kartik\helpers\Html;
use kartik\builder\Form;
use kartik\widgets\ActiveForm;
use kartik\builder\FormGrid;
use yii\helpers\ArrayHelper;
use kartik\markdown\Markdown;
$form = ActiveForm::begin(['id' => 'grading-id', 'type' => ActiveForm::TYPE_HORIZONTAL]);
$GradingInput = FormGrid::widget(['id' => 'fg-grading', 'model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['columns' => 1, 'attributes' => ['JOBGRADE_ID' => ['label' => 'Jobgrade.ID', 'type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Input Jobgrade ID...'], 'columnOptions' => ['colspan' => 5]], 'JOBGRADE_NM' => ['label' => 'Jobgrade.NM', 'type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Input Jobgrade Name...'], 'columnOptions' => ['colspan' => 6]], 'JOBGRADE_DCRP' => ['label' => 'Description', 'type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Input Jobgrade Description...'], 'columnOptions' => ['colspan' => 6]], 'SORT' => ['label' => 'Sort', 'type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Input nilai Urutan...'], 'columnOptions' => ['colspan' => 6]]]], ['columns' => 1, 'attributes' => ['actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="text-align: right; margin-top: 20px">' . Html::resetButton('Reset', ['class' => 'btn btn-default']) . ' ' . Html::submitButton('Submit', ['class' => 'btn btn-primary']) . '</div>']]]]]);
/*Panel List Group*/
echo Html::listGroup([['content' => 'INPUT GRADING', 'url' => '#', 'badge' => '', 'active' => true], ['content' => $GradingInput]]);
ActiveForm::end();
?>

예제 #8
0
use kartik\builder\FormGrid;
/* @var $this yii\web\View */
/* @var $model app\forms\ApplicantForm */
$this->title = 'Form to PDF tool';
$reportGenerated = Yii::$app->session->getFlash('reportGenerated', false);
?>
<div class="form-wrapper">
    <?php 
if (!$reportGenerated) {
    ?>
        <div class="site-index">
            <?php 
    $form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL]);
    ?>
            <?php 
    echo FormGrid::widget(['model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['contentBefore' => '<legend class="text-info"><small>Applicant</small></legend>', 'columns' => 3, 'attributes' => ['applicantFirstName' => ['type' => Form::INPUT_TEXT], 'applicantLastName' => ['type' => Form::INPUT_TEXT], 'applicantAddress' => ['type' => Form::INPUT_TEXT]]], ['contentBefore' => '<legend class="text-info"><small>Boat Owner</small></legend>', 'columns' => 3, 'attributes' => ['ownerFirstName' => ['type' => Form::INPUT_TEXT], 'ownerLastName' => ['type' => Form::INPUT_TEXT], 'ownerAddress' => ['type' => Form::INPUT_TEXT]]], ['contentBefore' => '<legend class="text-info"><small>Boat</small></legend>', 'columns' => 4, 'attributes' => ['boatName' => ['type' => Form::INPUT_TEXT], 'boatNationality' => ['type' => Form::INPUT_TEXT], 'boatRegisteredTonnage' => ['type' => Form::INPUT_TEXT], 'boatColor' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\ColorInput']]], ['columns' => 4, 'attributes' => ['boatPortOfRegistry' => ['type' => Form::INPUT_TEXT], 'boatRegistrationNumber' => ['type' => Form::INPUT_TEXT], 'boatRegistrationDate' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker'], 'boatLength' => ['type' => Form::INPUT_TEXT]]], ['columns' => 4, 'attributes' => ['boatLastPortCall' => ['type' => Form::INPUT_TEXT], 'boatNextPortCall' => ['type' => Form::INPUT_TEXT], 'boatType' => ['type' => Form::INPUT_RADIO_LIST, 'items' => [ApplicantForm::TYPE_SAIL => ApplicantForm::TYPE_SAIL, ApplicantForm::TYPE_POWER => ApplicantForm::TYPE_POWER]], 'boatHull' => ['type' => Form::INPUT_RADIO_LIST, 'items' => [ApplicantForm::HULL_MONOHULL => ApplicantForm::HULL_MONOHULL, ApplicantForm::HULL_MULTIHULL => ApplicantForm::HULL_MULTIHULL]]]]]]);
    ?>
            <?php 
    echo Html::submitButton('Generate Report', ['class' => 'btn btn-primary']);
    ?>
            <?php 
    ActiveForm::end();
    ?>
        </div>
    <?php 
} else {
    ?>
        <div class="site-success">
            <h3>Report generated</h3>
            <p><?php 
    echo Html::a('Download PDF', Yii::$app->session->getFlash('reportURL'));
예제 #9
0
<?php

use kartik\helpers\Html;
use kartik\builder\Form;
use kartik\widgets\ActiveForm;
use kartik\builder\FormGrid;
use yii\helpers\ArrayHelper;
use kartik\markdown\Markdown;
use lukisongroup\hrd\models\Groupfunction;
use lukisongroup\hrd\models\Groupseqmen;
use lukisongroup\hrd\models\Jobgrade;
$form = ActiveForm::begin(['id' => 'grading-form-id', 'type' => ActiveForm::TYPE_HORIZONTAL]);
$GradingInput = FormGrid::widget(['model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['columns' => 1, 'attributes' => ['GF_ID' => ['label' => 'GRP FUNCTION', 'type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Groupfunction::find()->orderBy('SORT')->asArray()->all(), 'GF_ID', 'GF_NM'), 'options' => ['id' => 'Groupfnc-id'], 'hint' => 'Pilih Group Function', 'columnOptions' => ['colspan' => 6]], 'SEQ_ID' => ['label' => 'GRP SEQMEN', 'type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Groupseqmen::find()->orderBy('SEQ_NM')->asArray()->all(), 'SEQ_ID', 'SEQ_NM'), 'options' => ['id' => 'Groupseq-id'], 'hint' => 'Pilih Group Sequen', 'columnOptions' => ['colspan' => 6]], 'JOBGRADE_ID' => ['label' => 'GRADING', 'type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Jobgrade::find()->orderBy('SORT')->asArray()->all(), 'JOBGRADE_ID', 'JOBGRADE_NM'), 'options' => ['id' => 'grading-id'], 'hint' => 'Pilih Grading Karyawan', 'columnOptions' => ['colspan' => 6]], 'SORT' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter First Name...'], 'columnOptions' => ['colspan' => 6]], 'JOBGRADE_DCRP' => ['label' => 'DCRP', 'type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Last Name...'], 'columnOptions' => ['colspan' => 6]]]], ['columns' => 1, 'attributes' => ['actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="text-align: right; margin-top: 20px">' . Html::resetButton('Reset', ['class' => 'btn btn-default']) . ' ' . Html::submitButton('Submit', ['class' => 'btn btn-primary']) . '</div>']]]]]);
/*Panel List Group*/
echo Html::listGroup([['content' => 'INPUT GRADING MODUL', 'url' => '#', 'badge' => '', 'active' => true], ['content' => $GradingInput]]);
ActiveForm::end();
예제 #10
0
use lukisongroup\hrd\models\Groupfunction;
use lukisongroup\hrd\models\Groupseqmen;
use lukisongroup\hrd\models\Jobgrade;
use lukisongroup\hrd\models\Status;
use lukisongroup\hrd\models\Employe;
use yii\helpers\Url;
use kartik\widgets\DepDrop;
//use lukisongroup\models\system\side_menu\M1000;
//use kartik\sidenav\SideNav;
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL, 'options' => ['enctype' => 'multipart/form-data'], 'id' => 'emp-form1-create', 'enableClientValidation' => true]);
//$form = ActiveForm::begin(['type'=>ActiveForm::TYPE_HORIZONTAL]);
//$form = ActiveForm::begin(['type'=>ActiveForm::TYPE_VERTICAL]);
/*Author: -ptr.nov- Generate digit EMP_ID */
/*Get Id count Author:-ptr.nov-*/
//$cnt= (Employe::find()->count())+1;
/*get ID Sparator Array , Author: -ptr.nov-*/
//$sql = 'SELECT max(EMP_ID) as EMP_ID FROM a0001';
//$cnt= Employe::findBySql($sql)->one();
///$arySplit=explode('.',$cnt->EMP_ID);
//$str_id_cnt=trim($arySplit[2]);
//print_r($str_id_cnt+1);
//$id_cnt=$str_id_cnt+1;
/*Combine String and Digit Author: -ptr.nov- */
//$digit=str_pad($id_cnt,4,"0",STR_PAD_LEFT);
//$thn=date("Y");
//$nl='LG'.'.'.$thn.'.'.$digit;
/*Author: Eka Side Menu */
//$side_menu=\yii\helpers\Json::decode(M1000::find()->findMenu('hrd')->one()->jval);
$EmployeeInput = FormGrid::widget(['model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['columns' => 1, 'attributes' => ['employe_identity' => ['label' => 'GENERATE CODE BY COORPORATE :', 'attributes' => ['EMP_CORP_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Corp::find()->orderBy('SORT')->asArray()->all(), 'CORP_ID', 'CORP_NM'), 'options' => ['id' => 'cat-id'], 'columnOptions' => ['colspan' => 1]]]]]], ['contentBefore' => '<legend class="text-info"><small>EMPLOYEE IDENTITY</small></legend>', 'columns' => 1, 'autoGenerateColumns' => false, 'attributes' => ['employe_identity' => ['label' => 'Employee.ID', 'attributes' => ['EMP_ID' => ['disabled' => true, 'type' => Form::INPUT_WIDGET, 'widgetClass' => 'kartik\\widgets\\DepDrop', 'options' => ['options' => ['id' => 'subcat-id', 'readonly' => true, 'selected' => false], 'pluginOptions' => ['depends' => ['cat-id'], 'url' => Url::to(['/hrd/employe/subcat']), 'initialize' => true, 'placeholder' => false]], 'columnOptions' => ['colspan' => 3]], 'EMP_NM' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter First Name...'], 'columnOptions' => ['colspan' => 1]], 'EMP_NM_BLK' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Last Name...'], 'columnOptions' => ['colspan' => 1]]]]]], ['contentBefore' => '<legend class="text-info"><small>COORPORATE IDENTITY</small></legend>', 'columns' => 1, 'autoGenerateColumns' => false, 'attributes' => ['employe_identity' => ['attributes' => ['EMP_CORP_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Corp::find()->orderBy('SORT')->asArray()->all(), 'CORP_ID', 'CORP_NM'), 'options' => ['placeholder' => 'Select Coorporate...'], 'hint' => 'Pilih Perusahaan', 'columnOptions' => ['colspan' => 12]], 'DEP_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Dept::find()->orderBy('SORT')->asArray()->all(), 'DEP_ID', 'DEP_NM'), 'options' => ['id' => 'dept-id'], 'hint' => 'Pilih Department', 'columnOptions' => ['colspan' => 12]], 'DEP_SUB_ID' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DepDrop', 'options' => ['id' => 'subdept-id', 'pluginOptions' => ['depends' => ['dept-id'], 'url' => Url::to(['/hrd/employe/subdept']), 'initialize' => true, 'params' => [''], 'loadingText' => 'Sub Department ...']], 'hint' => 'Pilih Sub Department', 'columnOptions' => ['colspan' => 12]], 'GF_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Groupfunction::find()->orderBy('SORT')->asArray()->all(), 'GF_ID', 'GF_NM'), 'options' => ['id' => 'Groupfnc-id'], 'hint' => 'Pilih Group Function', 'columnOptions' => ['colspan' => 12]], 'SEQ_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Groupseqmen::find()->orderBy('SEQ_NM')->asArray()->all(), 'SEQ_ID', 'SEQ_NM'), 'options' => ['id' => 'Groupseq-id'], 'hint' => 'Pilih Group Sequen', 'columnOptions' => ['colspan' => 12]], 'JOBGRADE_ID' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DepDrop', 'options' => ['id' => 'grading-id', 'pluginOptions' => ['depends' => ['Groupfnc-id', 'Groupseq-id'], 'url' => Url::to(['/hrd/employe/grading']), 'initialize' => true, 'params' => [''], 'loadingText' => 'Sub Department ...']], 'hint' => 'Pilih Grading Karyawan ', 'columnOptions' => ['colspan' => 12]], 'EMP_STS' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Status::find()->orderBy('SORT')->asArray()->all(), 'STS_ID', 'STS_NM'), 'hint' => 'Pilih Status Karyawan', 'columnOptions' => ['colspan' => 12]], 'EMP_JOIN_DATE' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker', 'options' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'enableonreadonly' => false, 'todayHighlight' => true], 'pluginEvents' => ['show' => "function(e) {show}"]], 'hint' => 'Enter Join Date (yyyy-mm-dd)', 'columnOptions' => ['colspan' => 12]], 'EMP_RESIGN_DATE' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker', 'options' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'todayHighlight' => true], 'pluginEvents' => ['show' => "function(e) {show}"]], 'hint' => 'Enter Resign Date (yyyy-mm-dd)', 'columnOptions' => ['colspan' => 12]]]]]], ['contentBefore' => '<legend class="text-info"><small>EMPLOYEE PROFILE</small></legend>', 'columns' => 1, 'autoGenerateColumns' => false, 'attributes' => ['address_detail' => ['label' => 'Address', 'attributes' => ['EMP_KTP' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter NO KTP...'], 'columnOptions' => ['colspan' => 12]], 'EMP_ALAMAT' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => 'kartik\\markdown\\MarkdownEditor', 'value' => '<span class="text-justify"><em>' . $model->EMP_ALAMAT . '</em></span>', 'columnOptions' => ['colspan' => 12]], 'EMP_ZIP' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Zip...'], 'columnOptions' => ['colspan' => 6]], 'EMP_HP' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Phone...'], 'columnOptions' => ['colspan' => 6]], 'EMP_TGL_LAHIR' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker', 'options' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'startView' => true], 'pluginEvents' => ['show' => "function(e) {show}"]], 'hint' => 'Enter birthday  (yyyy-mm-dd)', 'columnOptions' => ['colspan' => 6]], 'EMP_GENDER' => ['type' => Form::INPUT_RADIO_LIST, 'items' => ['Male' => 'Male', 'Female' => 'Female'], 'options' => ['inline' => 'Male'], 'columnOptions' => ['colspan' => 6]], 'EMP_EMAIL' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => '*****@*****.**', 'addon' => ['prepend' => ['content' => '@']]], 'columnOptions' => ['colspan' => 6]]]]]], ['columns' => 3, 'attributes' => ['address_detail' => ['label' => 'Picture', 'columns' => 6, 'attributes' => ['upload_file' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\FileInput', 'options' => ['pluginOptions' => ['showPreview' => true, 'showCaption' => false, 'showRemove' => false, 'showUpload' => false]], 'columnOptions' => ['colspan' => 2]]]]]], ['attributes' => ['actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="text-align: right; margin-top: 20px">' . Html::resetButton('Reset', ['class' => 'btn btn-default']) . ' ' . Html::submitButton('Submit', ['class' => 'btn btn-primary']) . '</div>']]]]]);
echo Html::listGroup([['content' => 'IINPUT DATA KARYAWAN', 'url' => '#', 'badge' => '', 'active' => true], ['content' => $EmployeeInput]]);
ActiveForm::end();
예제 #11
0
echo FormGrid::widget(['model' => $formModel, 'form' => $form, 'autoGenerateColumns' => true, 'columnSize' => Form::SIZE_TINY, 'rows' => [['contentBefore' => Html::tag('legend', Yii::t('app', 'Form Settings'), ['class' => 'text-primary']), 'attributes' => ['name' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => Yii::t("app", "Enter the form name...")]]]], ['attributes' => ['status' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\switchinput\\SwitchInput', 'hint' => Yii::t("app", "Disables the form at any time.")], 'language' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\select2\\Select2', 'hint' => Yii::t("app", "This language will be used to display your form messages."), 'options' => ['data' => \app\helpers\Language::supportedLanguages()]]]], ['attributes' => ['message' => ['type' => Form::INPUT_TEXTAREA, 'hint' => Yii::t("app", "Message displayed to the user when the form is disabled."), 'options' => ['placeholder' => Yii::t("app", "Enter message...")]]]], ['attributes' => ['schedule' => ['type' => Form::INPUT_RAW, 'value' => $form->field($formModel, 'schedule')->radioButtonGroup([$formModel::ON => Yii::t('app', 'Yes'), $formModel::OFF => Yii::t('app', 'No')], ['itemOptions' => ['labelOptions' => ['class' => 'btn btn-primary']], 'style' => 'display:block; margin-bottom:15px; overflow:hidden'])]]], ['attributes' => ['schedule_start_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \kartik\datecontrol\DateControl::className(), 'options' => ['type' => \kartik\datecontrol\DateControl::FORMAT_DATETIME, 'displayTimezone' => Yii::$app->timeZone, 'options' => ['options' => ['placeholder' => 'Select start date...']]]], 'schedule_end_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \kartik\datecontrol\DateControl::className(), 'options' => ['type' => \kartik\datecontrol\DateControl::FORMAT_DATETIME, 'displayTimezone' => Yii::$app->timeZone, 'options' => ['options' => ['placeholder' => 'Select end date...']]]]]], ['contentBefore' => Html::tag('legend', Yii::t('app', 'Advanced Options'), ['class' => 'text-primary']), 'attributes' => ['save' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\switchinput\\SwitchInput', 'hint' => Yii::t("app", "Saves all form submissions in the database.")], 'analytics' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\switchinput\\SwitchInput', 'hint' => Yii::t("app", "Enable Form Tracking.")], 'honeypot' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\switchinput\\SwitchInput', 'hint' => Yii::t("app", "Adds a hidden text field to filter spam.")], 'resume' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\switchinput\\SwitchInput', 'hint' => Yii::t("app", "Auto save incomplete form filling and resume later.")]]], ['contentBefore' => Html::tag('legend', Yii::t('app', 'Submission Limit'), ['class' => 'text-primary']), 'attributes' => ['total_limit' => ['type' => Form::INPUT_RAW, 'value' => $form->field($formModel, 'total_limit')->radioButtonGroup([$formModel::ON => Yii::t('app', 'Yes'), $formModel::OFF => Yii::t('app', 'No')], ['itemOptions' => ['labelOptions' => ['class' => 'btn btn-primary']], 'style' => 'display:block; margin-bottom:15px; overflow:hidden'])]]], ['attributes' => ['total_limit_number' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => Yii::t("app", "Enter the total number...")]], 'total_limit_period' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\select2\\Select2', 'options' => ['data' => $formModel->getTimePeriods(), 'pluginOptions' => ['placeholder' => Yii::t('app', 'Select time period'), 'allowClear' => true]]]]], ['attributes' => ['ip_limit' => ['type' => Form::INPUT_RAW, 'value' => $form->field($formModel, 'ip_limit')->radioButtonGroup([$formModel::ON => Yii::t('app', 'Yes'), $formModel::OFF => Yii::t('app', 'No')], ['itemOptions' => ['labelOptions' => ['class' => 'btn btn-primary']], 'style' => 'display:block; margin-bottom:15px; overflow:hidden'])]]], ['attributes' => ['ip_limit_number' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => Yii::t("app", "Enter the max number...")]], 'ip_limit_period' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\select2\\Select2', 'options' => ['data' => $formModel->getTimePeriods(), 'pluginOptions' => ['placeholder' => Yii::t('app', 'Select time period'), 'allowClear' => true]]]]]]]);
?>
                </div>
                <div role="tabpanel" class="tab-pane fade" id="form_confirmation_settings">
                    <?php 
echo FormGrid::widget(['model' => $formConfirmationModel, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['contentBefore' => Html::tag('legend', Yii::t('app', 'Confirmation Settings'), ['class' => 'text-primary']), 'attributes' => ['type' => ['type' => Form::INPUT_RAW, 'value' => $form->field($formConfirmationModel, 'type')->radioButtonGroup($formConfirmationModel->getTypes(), ['itemOptions' => ['labelOptions' => ['class' => 'btn btn-primary']], 'style' => 'display:block; margin-bottom:15px; overflow:hidden'])]]], ['attributes' => ['message' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => Yii::t("app", "Your Confirmation Message...")]]]], ['attributes' => ['url' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => Yii::t("app", "Enter URL...")]]]], ['attributes' => ['send_email' => ['type' => Form::INPUT_RAW, 'value' => $form->field($formConfirmationModel, 'send_email')->radioButtonGroup([$formConfirmationModel::CONFIRM_BY_EMAIL_ENABLE => Yii::t('app', 'Yes'), $formConfirmationModel::CONFIRM_BY_EMAIL_DISABLE => Yii::t('app', 'No')], ['itemOptions' => ['labelOptions' => ['class' => 'btn btn-primary']], 'style' => 'display:block; margin-bottom:15px; overflow:hidden'])]]], ['attributes' => ['mail_to' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\select2\\Select2', 'hint' => Yii::t("app", "Your form must have an email field to use this feature."), 'options' => ['data' => $emailFields, 'options' => ['placeholder' => Yii::t("app", "Select an e-mail field...")], 'pluginOptions' => ['allowClear' => true]]], 'mail_from' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => Yii::t("app", "Enter your e-mail address...")]], 'mail_from_name' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => Yii::t("app", "Enter your name or company...")]]]], ['attributes' => ['mail_subject' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => Yii::t("app", "Enter subject...")]]]], ['attributes' => ['mail_message' => ['type' => Form::INPUT_TEXTAREA, 'hint' => Yii::t("app", "Allowed HTML Tags:") . ' ' . Html::encode('<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>'), 'options' => ['placeholder' => Yii::t("app", "Your Confirmation Message by E-Mail...")]]]], ['attributes' => ['mail_receipt_copy' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\switchinput\\SwitchInput', 'hint' => '']]]]]);
?>
                </div>
                <div role="tabpanel" class="tab-pane fade" id="form_notification_settings">
                    <?php 
echo FormGrid::widget(['model' => $formEmailModel, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['contentBefore' => Html::tag('legend', Yii::t('app', 'To Email Address'), ['class' => 'text-primary']), 'attributes' => ['subject' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => Yii::t("app", "Enter subject...")]]]], ['attributes' => ['to' => ['type' => Form::INPUT_TEXT, 'hint' => Yii::t("app", "Notifications wil be e-mailed to this address, e.g. '*****@*****.**'."), 'options' => ['placeholder' => Yii::t("app", "Enter e-mail address...")]], 'from' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\select2\\Select2', 'options' => ['data' => $emails]]]], ['attributes' => ['cc' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => Yii::t("app", "Enter e-mail address...")]], 'bcc' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => Yii::t("app", "Enter e-mail address...")]]]], ['autoGenerateColumns' => false, 'columns' => 12, 'attributes' => ['type' => ['columnOptions' => ['colspan' => 6], 'type' => Form::INPUT_RAW, 'value' => $form->field($formEmailModel, 'type')->radioButtonGroup([$formEmailModel::TYPE_ALL => Yii::t("app", "All Data"), $formEmailModel::TYPE_LINK => Yii::t("app", "Only Link"), $formEmailModel::TYPE_MESSAGE => Yii::t("app", "Custom Message")], ['itemOptions' => ['labelOptions' => ['class' => 'btn btn-primary']], 'style' => 'display:block; margin-bottom:15px; overflow:hidden'])->hint(Yii::t("app", "This email may contain all submitted data,\n                                            a link to saved data or a custom message."))], 'attach' => ['columnOptions' => ['colspan' => 3], 'type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\switchinput\\SwitchInput', 'hint' => ''], 'plain_text' => ['columnOptions' => ['colspan' => 3], 'type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\switchinput\\SwitchInput', 'hint' => '']]], ['attributes' => ['message' => ['type' => Form::INPUT_TEXTAREA, 'hint' => Yii::t("app", "Allowed HTML Tags:") . ' ' . Html::encode('<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>'), 'options' => ['placeholder' => Yii::t("app", "Enter your custom message...")]]]]]]);
?>
                </div>
                <div role="tabpanel" class="tab-pane fade" id="form_theme_settings">
                    <?php 
echo FormGrid::widget(['model' => $formUIModel, 'form' => $form, 'autoGenerateColumns' => true, 'columnSize' => Form::SIZE_TINY, 'rows' => [['contentBefore' => Html::tag('legend', Yii::t('app', 'UI Settings'), ['class' => 'text-primary']), 'attributes' => ['js_file' => ['type' => Form::INPUT_TEXT, 'hint' => Yii::t("app", "This custom javascript file will be loaded each time the form is being displayed."), 'options' => ['placeholder' => Yii::t("app", "Enter URL...")]]]], ['attributes' => ['theme_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\select2\\Select2', 'label' => Yii::t('app', 'Select a Theme'), 'hint' => Yii::t("app", "Select the theme that fits best to your form."), 'options' => ['data' => $themes, 'pluginOptions' => ['placeholder' => Yii::t('app', 'Select a Theme'), 'allowClear' => true], 'pluginEvents' => ["select2:select" => "previewSelected", "select2:unselect" => "previewUnselected"]]]]]]]);
?>

                    <!-- Preview panel -->
                    <div class="panel panel-default" id="preview-container" style="display:none;">
                        <div class="panel-heading clearfix">
                            <div class="summary pull-left"><strong><?php 
echo Yii::t("app", "Preview");
?>
</strong></div>
                            <div class="pull-right">
                                <a id="resizeFull" class="toogleButton" href="javascript:void(0)">
                                    <i class="glyphicon glyphicon-resize-full"></i>
                                </a>
                                <a id="resizeSmall" class="toogleButton" style="display: none"
                                   href="javascript:void(0)">
예제 #12
0
<?php

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

<?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'method' => 'get', 'options' => ['class' => 'col-sm-5']]);
echo FormGrid::widget(['model' => $model, 'form' => $form, 'columnSize' => Form::SIZE_TINY, 'autoGenerateColumns' => true, 'rows' => [['attributes' => ['from' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker', 'options' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]], 'to' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker', 'options' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]]]], ['attributes' => ['userId' => ['type' => Form::INPUT_TEXT], 'visitorId' => ['type' => Form::INPUT_TEXT]]], ['attributes' => ['pageSize' => ['type' => Form::INPUT_TEXT, 'options' => ['name' => 'per-page']], 'actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="text-align: right;">' . Html::a('重置', '/' . \yii::$app->request->pathInfo, ['class' => 'btn btn-default']) . ' ' . Html::submitButton('搜索', ['class' => 'btn btn-primary']) . '</div>']]]]]);
ActiveForm::end();
예제 #13
0
/*get ID Sparator Array , Author: -ptr.nov-*/
//$sql = 'SELECT max(EMP_ID) as EMP_ID FROM a0001';
//$cnt= Employe::findBySql($sql)->one();
///$arySplit=explode('.',$cnt->EMP_ID);
//$str_id_cnt=trim($arySplit[2]);
//print_r($str_id_cnt+1);
//$id_cnt=$str_id_cnt+1;
/*Combine String and Digit Author: -ptr.nov- */
//$digit=str_pad($id_cnt,4,"0",STR_PAD_LEFT);
//$thn=date("Y");
//$nl='LG'.'.'.$thn.'.'.$digit;
/*Author: Eka Side Menu */
//$side_menu=\yii\helpers\Json::decode(M1000::find()->findMenu('hrd')->one()->jval);
?>

    <?php 
echo $form->field($model, 'image')->widget(FileInput::classname(), ['pluginOptions' => ['browseIcon' => '<i class="glyphicon glyphicon-folder-open"></i>', 'overwriteInitial' => true, 'showCaption' => false, 'showClose' => false, 'browseLabel' => '', 'removeLabel' => '', 'removeIcon' => '<i class="glyphicon glyphicon-remove"></i>', 'removeTitle' => 'Cancel or reset changes', 'showUpload' => false, 'defaultPreviewContent' => '<img src="https://www.mautic.org/media/images/default_avatar.png" alt="Your Avatar" style="width:160px">']]);
?>


<?php 
$EmployeeInput = FormGrid::widget(['model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['columns' => 1, 'attributes' => ['employe_identity' => ['label' => 'GENERATE CODE BY COORPORATE :', 'attributes' => ['EMP_CORP_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Corp::find()->orderBy('SORT')->asArray()->all(), 'CORP_ID', 'CORP_NM'), 'options' => ['id' => 'cat-id'], 'columnOptions' => ['colspan' => 1]]]]]], ['contentBefore' => '<legend class="text-info"><small>EMPLOYEE IDENTITY</small></legend>', 'columns' => 1, 'autoGenerateColumns' => false, 'attributes' => ['employe_identity' => ['label' => 'Employee.ID', 'attributes' => ['EMP_ID' => ['disabled' => true, 'type' => Form::INPUT_WIDGET, 'widgetClass' => 'kartik\\widgets\\DepDrop', 'options' => ['options' => ['id' => 'subcat-id', 'readonly' => true, 'selected' => false], 'pluginOptions' => ['depends' => ['cat-id'], 'url' => Url::to(['/hrd/employe/subcat']), 'initialize' => true, 'placeholder' => false]], 'columnOptions' => ['colspan' => 3]], 'EMP_NM' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter First Name...'], 'columnOptions' => ['colspan' => 1]], 'EMP_NM_BLK' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Last Name...'], 'columnOptions' => ['colspan' => 1]]]]]], ['attributes' => ['actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="text-align: right; margin-top: 20px">' . Html::resetButton('Reset', ['class' => 'btn btn-default']) . ' ' . Html::submitButton('Submit', ['class' => 'btn btn-primary']) . '</div>']]]]]);
?>

<?php 
echo Html::listGroup([['content' => 'IINPUT DATA KARYAWAN', 'url' => '#', 'badge' => '', 'active' => true], ['content' => $EmployeeInput]]);
?>


<?php 
ActiveForm::end();