コード例 #1
0
 public function getKey_Department()
 {
     $sql1 = 'SELECT max(DEP_ID) as DEP_ID FROM departemen';
     $cntdept = Dept::findBySql($sql1)->one();
     $id_cnt_dept = $cntdept->DEP_ID + 1;
     return $id_cnt_dept;
 }
コード例 #2
0
ファイル: DeptSearch.php プロジェクト: C12D/advanced
 public function search($params)
 {
     /*[5.1] JOIN TABLE */
     $query = Dept::find()->Where('u0002a.DEP_STS<>3');
     $dataProvider_Dept = new ActiveDataProvider(['query' => $query]);
     /*[5.3] LOAD VALIDATION PARAMS */
     /*LOAD FARM VER 1*/
     $this->load($params);
     if (!$this->validate()) {
         return $dataProvider_Dept;
     }
     /*[5.4] FILTER WHERE LIKE (string/integer)*/
     /* FILTER COLUMN Author -ptr.nov-*/
     $query->andFilterWhere(['like', 'DEP_ID', $this->DEP_ID])->andFilterWhere(['like', 'DEP_NM', $this->DEP_NM]);
     return $dataProvider_Dept;
 }
コード例 #3
0
ファイル: _form.php プロジェクト: adem-team/advanced
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use kartik\select2\Select2;
use lukisongroup\models\hrd\Seq;
use kartik\widgets\DateTimePicker;
/* @var $this yii\web\View */
/* @var $model lukisongroup\models\hrd\Regulasi */
/* @var $form yii\widgets\ActiveForm */
$array = Seq::find()->all();
$arraygf = lukisongroup\models\hrd\Groupfunction::find()->all();
$arraydep = \lukisongroup\models\hrd\Dept::find()->all();
$arraysub = lukisongroup\models\hrd\Deptsub::find()->all();
$arraycorp = lukisongroup\models\hrd\Corp::find()->all();
$arrayjob = lukisongroup\models\hrd\Jobgrade::find()->all();
//data
$datadep = yii\helpers\ArrayHelper::map($arraydep, 'DEP_ID', 'DEP_NM');
$datagf = yii\helpers\ArrayHelper::map($arraygf, 'GF_ID', 'GF_NM');
$datasqid = yii\helpers\ArrayHelper::map($array, 'SEQ_ID', 'SEQ_NM');
$datasub = yii\helpers\ArrayHelper::map($arraysub, 'DEP_SUB_ID', 'DEP_ID');
$datacorp = yii\helpers\ArrayHelper::map($arraycorp, 'CORP_ID', 'CORP_NM');
$datajob = yii\helpers\ArrayHelper::map($arrayjob, 'JOBGRADE_ID', 'JOBGRADE_NM');
$datastatus = ['0' => 'Tidak aktif', '1' => 'aktif'];
?>

<!--<div class="regulasi-form">-->

    <?php 
$form = ActiveForm::begin(['id' => 'form', 'enableClientValidation' => true]);
?>
コード例 #4
0
ファイル: Employe.php プロジェクト: C12D/advanced
 public function getDeptOne()
 {
     return $this->hasOne(Dept::className(), ['DEP_ID' => 'DEP_ID']);
 }
コード例 #5
0
ファイル: index.php プロジェクト: C12D/advanced
use kartik\tabs\TabsX;
//use kartik\date\DatePicker;
use kartik\builder\Form;
use kartik\sidenav\SideNav;
//use backend\assets\AppAsset; 	/* CLASS ASSET CSS/JS/THEME Author: -ptr.nov-*/
//AppAsset::register($this);		/* INDEPENDENT CSS/JS/THEME FOR PAGE  Author: -ptr.nov-*/
/*Title page Modul*/
$this->sideCorp = 'HRM - Data Employee';
/* Title Select Company pada header pasa sidemenu/menu samping kiri */
$this->sideMenu = 'hrd_personalia';
/* kd_menu untuk list menu pada sidemenu, get from table of database */
$this->title = Yii::t('app', 'Personalia - List Data Employee');
/* title pada header page */
/*variable Dropdown*/
$Combo_Corp = ArrayHelper::map(Corp::find()->orderBy('SORT')->asArray()->all(), 'CORP_NM', 'CORP_NM');
$Combo_Dept = ArrayHelper::map(Dept::find()->orderBy('SORT')->asArray()->all(), 'DEP_NM', 'DEP_NM');
$Combo_SubDept = ArrayHelper::map(Deptsub::find()->orderBy('SORT')->asArray()->all(), 'DEP_SUB_NM', 'DEP_SUB_NM');
$Combo_GrpFnc = ArrayHelper::map(Groupfunction::find()->orderBy('SORT')->asArray()->all(), 'GF_NM', 'GF_NM');
$Combo_Seq = ArrayHelper::map(Groupseqmen::find()->orderBy('SEQ_NM')->asArray()->all(), 'SEQ_NM', 'SEQ_NM');
$Combo_Jab = ArrayHelper::map(Jobgrade::find()->orderBy('SORT')->asArray()->all(), 'JOBGRADE_NM', 'JOBGRADE_NM');
$Combo_Status = ArrayHelper::map(Status::find()->orderBy('SORT')->asArray()->all(), 'STS_NM', 'STS_NM');
//--EMPLOYE ACTIVED--
$tab_employe = GridView::widget(['id' => 'active', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'PIC', 'format' => 'html', 'value' => function ($data) {
    return Html::img(Yii::getAlias('@HRD_EMP_UploadUrl') . '/' . $data->EMP_IMG, ['width' => '40']);
}], 'EMP_ID', ['attribute' => 'EMP_NM'], 'EMP_NM_BLK', ['attribute' => 'corpOne.CORP_NM', 'filter' => $Combo_Corp], ['attribute' => 'deptOne.DEP_NM', 'filter' => $Combo_Dept], ['attribute' => 'deptsub.DEP_SUB_NM', 'filter' => $Combo_SubDept], ['attribute' => 'groupfunction.GF_NM', 'filter' => $Combo_GrpFnc], ['attribute' => 'groupseqmen.SEQ_NM', 'filter' => $Combo_Seq], ['attribute' => 'jobgrade.JOBGRADE_NM', 'filter' => $Combo_Jab], ['attribute' => 'sttOne.STS_NM', 'filter' => $Combo_Status], ['attribute' => 'EMP_JOIN_DATE', 'filterType' => \kartik\grid\GridView::FILTER_DATE_RANGE, 'filterWidgetOptions' => ['attribute' => 'EMP_JOIN_DATE', 'presetDropdown' => TRUE, 'convertFormat' => true, 'pluginOptions' => ['format' => 'Y-m-d', 'separator' => ' TO ', 'opens' => 'left']]], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{view}{edit}', 'header' => 'Action', 'buttons' => ['view' => function ($url, $model, $key) {
    return Html::a('<button type="button" class="btn btn-primary btn-xs" style="width:50px; height:50px">View </button>', ['/hrd/employe/view', 'id' => $model->EMP_ID], ['data-toggle' => "modal", 'data-target' => "#activity-emp", 'data-title' => $model->EMP_ID]);
}]]], 'panel' => ['type' => GridView::TYPE_SUCCESS, 'before' => Html::a('<i class="glyphicon glyphicon-plus"></i> ' . Yii::t('app', 'Create ', ['modelClass' => 'Employe']), '/hrd/employe/create', ['data-toggle' => "modal", 'data-target' => "#activity-emp", 'class' => 'btn btn-success'])], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'active'], 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => ['fontAwesome' => true, 'showConfirmAlert' => false, 'target' => GridView::TARGET_BLANK]]]);
//---EMPLOYE RESIGN --
$tab_employe_resign = GridView::widget(['id' => 'resign', 'dataProvider' => $dataProvider1, 'filterModel' => $searchModel1, 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view}', 'header' => 'Action', 'buttons' => ['view' => function ($url, $model, $key) {
    return Html::a('<button type="button" class="btn btn-danger btn-xs" style="width:50px; height:50px">View </button>', ['view', 'id' => $model->EMP_ID], ['data-toggle' => "modal", 'data-target' => "#activity-emp", 'data-title' => $model->EMP_ID]);
}]], ['attribute' => 'PIC', 'format' => 'html', 'value' => function ($data) {
コード例 #6
0
ファイル: _view.php プロジェクト: C12D/advanced
/*GROUP-FUNCTION*/
if (count($Gf_MDL) == 0) {
    $Val_GF = 'none';
} else {
    $Val_GF = $Gf_MDL->GF_NM;
}
/*GROUP-SEQUEN*/
if (count($GSeqmen_MDL) == 0) {
    $Val_SQMEN = 'none';
} else {
    $Val_SQMEN = $GSeqmen_MDL->SEQ_NM;
}
/*JOBGRADE*/
if (count($Jabatan_MDL) == 0) {
    $Val_Jabatan = 'none';
} else {
    $Val_Jabatan = $Jabatan_MDL->JOBGRADE_NM;
}
/*STATUS*/
if (count($Status_MDL) == 0) {
    $Val_Status = 'none';
} else {
    $Val_Status = $Status_MDL->STS_NM;
}
/*ADDITIONAL SELECTED DEPDOWN VALUE HTML FOR JS -Auth ptr.nov*/
echo Html::hiddenInput('selected-subdept', $model->DEP_SUB_ID, ['id' => 'selected-subdept']);
echo Html::hiddenInput('selected-grading', $model->JOBGRADE_ID, ['id' => 'selected-grading']);
$attribute = [['group' => true, 'label' => 'Employee Identification', 'rowOptions' => ['class' => 'info']], ['attribute' => 'upload_file', 'label' => '', 'value' => Yii::getAlias('@HRD_EMP_UploadUrl') . '/' . $model->EMP_IMG, 'format' => ['image', ['width' => '100', 'height' => '120']], 'type' => DetailView::INPUT_FILEINPUT, 'widgetOptions' => ['pluginOptions' => ['showPreview' => true, 'showCaption' => false, 'showRemove' => false, 'showUpload' => false]]], ['attribute' => 'EMP_ID', 'options' => ['readonly' => true]], ['attribute' => 'EMP_NM'], ['attribute' => 'EMP_NM_BLK'], ['group' => true, 'label' => 'Coorporate Information', 'rowOptions' => ['class' => 'info']], ['label' => 'Coorporate', 'attribute' => 'EMP_CORP_ID', 'format' => 'raw', 'value' => Html::a($Val_Corp, '#', ['class' => 'kv-author-link']), 'type' => DetailView::INPUT_SELECT2, 'widgetOptions' => ['data' => ArrayHelper::map(Corp::find()->orderBy('SORT')->asArray()->all(), 'CORP_ID', 'CORP_NM'), 'options' => ['placeholder' => 'Select ...'], 'pluginOptions' => ['allowClear' => true]]], ['label' => 'Department', 'attribute' => 'DEP_ID', 'format' => 'raw', 'value' => Html::a($Val_Dept, '#', ['class' => 'kv-author-link']), 'type' => DetailView::INPUT_SELECT2, 'widgetOptions' => ['data' => ArrayHelper::map(Dept::find()->orderBy('SORT')->asArray()->all(), 'DEP_ID', 'DEP_NM'), 'options' => ['id' => 'dept-id']]], ['label' => 'Department Sub', 'attribute' => 'DEP_SUB_ID', 'format' => 'raw', 'value' => Html::a($Val_DeptSub, '#', ['class' => 'kv-author-link']), 'type' => DetailView::INPUT_DEPDROP, 'widgetOptions' => ['options' => ['id' => 'subdept-id'], 'pluginOptions' => ['depends' => ['dept-id'], 'url' => Url::to(['/hrd/employe/subdept']), 'initialize' => true, 'params' => ['selected-subdept'], 'loadingText' => 'Sub Department ...']]], ['label' => 'Group Function', 'attribute' => 'GF_ID', 'format' => 'raw', 'value' => Html::a($Val_GF, '#', ['class' => 'kv-author-link']), 'type' => DetailView::INPUT_SELECT2, 'widgetOptions' => ['data' => ArrayHelper::map(Groupfunction::find()->orderBy('SORT')->asArray()->all(), 'GF_ID', 'GF_NM'), 'options' => ['id' => 'Groupfnc-id']]], ['label' => 'Group Seqmen', 'attribute' => 'SEQ_ID', 'format' => 'raw', 'value' => Html::a($Val_SQMEN, '#', ['class' => 'kv-author-link']), 'type' => DetailView::INPUT_SELECT2, 'widgetOptions' => ['data' => ArrayHelper::map(Groupseqmen::find()->orderBy('SEQ_NM')->asArray()->all(), 'SEQ_ID', 'SEQ_NM'), 'options' => ['id' => 'Groupseq-id']]], ['label' => 'Grading', 'attribute' => 'JOBGRADE_ID', 'format' => 'raw', 'value' => Html::a($Val_Jabatan, '#', ['class' => 'kv-author-link']), 'type' => DetailView::INPUT_DEPDROP, 'widgetOptions' => ['options' => ['id' => 'grading-id'], 'pluginOptions' => ['depends' => ['Groupfnc-id', 'Groupseq-id'], 'url' => Url::to(['/hrd/employe/grading']), 'initialize' => true, 'params' => ['selected-grading'], 'loadingText' => 'Sub Department ...']]], ['attribute' => 'EMP_STS', 'format' => 'raw', 'value' => Html::a($Val_Status, '#', ['class' => 'kv-author-link']), 'type' => DetailView::INPUT_SELECT2, 'widgetOptions' => ['data' => ArrayHelper::map(Status::find()->orderBy('SORT')->asArray()->all(), 'STS_ID', 'STS_NM'), 'options' => ['placeholder' => 'Select ...'], 'pluginOptions' => ['allowClear' => true]]], ['id' => 'my_datepicker', 'attribute' => 'EMP_JOIN_DATE', 'format' => 'date', 'type' => DetailView::INPUT_DATE, 'widgetOptions' => ['pluginOptions' => ['format' => 'yyyy-mm-dd'], 'pluginEvents' => ['show' => "function(e) {show}"]]], ['attribute' => 'EMP_RESIGN_DATE', 'format' => 'date', 'type' => DetailView::INPUT_DATE, 'widgetOptions' => ['pluginOptions' => ['format' => 'yyyy-mm-dd'], 'pluginEvents' => ['show' => "function(e) {show}"]]], ['group' => true, 'label' => 'Employee Data Information', 'rowOptions' => ['class' => 'info']], ['attribute' => 'EMP_KTP'], ['attribute' => 'EMP_ALAMAT'], ['attribute' => 'EMP_ZIP'], ['attribute' => 'EMP_TLP'], ['attribute' => 'EMP_HP'], ['attribute' => 'EMP_GENDER'], ['attribute' => 'EMP_TGL_LAHIR', 'format' => 'date', 'type' => DetailView::INPUT_DATE, 'widgetOptions' => ['pluginOptions' => ['format' => 'yyyy-mm-dd'], 'pluginEvents' => ['show' => "function(e) {show}"]], 'inputWidth' => '40%'], ['attribute' => 'EMP_EMAIL']];
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL, 'options' => ['enctype' => 'multipart/form-data']]);
echo DetailView::widget(['id' => 'dv-view-emp', 'model' => $model, 'condensed' => true, 'hover' => true, 'mode' => DetailView::MODE_VIEW, 'panel' => ['heading' => $model->EMP_NM . ' ' . $model->EMP_NM_BLK, 'type' => DetailView::TYPE_INFO], 'attributes' => $attribute, 'deleteOptions' => ['url' => ['delete', 'id' => $model->EMP_NM], 'data' => ['confirm' => Yii::t('app', 'Are you sure to deleted this record Name =' . $model->EMP_NM . '?'), 'method' => 'post']]]);
ActiveForm::end();
コード例 #7
0
ファイル: DeptController.php プロジェクト: C12D/advanced
 protected function findModel($id)
 {
     if (($model = Dept::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
コード例 #8
0
ファイル: _form.php プロジェクト: C12D/advanced
use lukisongroup\models\hrd\Groupfunction;
use lukisongroup\models\hrd\Groupseqmen;
use lukisongroup\models\hrd\Jobgrade;
use lukisongroup\models\hrd\Status;
use lukisongroup\models\hrd\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' => 1]], '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();
コード例 #9
0
ファイル: _form.php プロジェクト: C12D/advanced
<?php

use yii\helpers\Html;
use lukisongroup\models\hrd\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();
コード例 #10
0
ファイル: view.php プロジェクト: C12D/advanced
<?php

use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use lukisongroup\models\hrd\Dept;
use kartik\detail\DetailView;
use yii\bootstrap\Modal;
use kartik\widgets\ActiveField;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\icons\Icon;
use kartik\widgets\Growl;
$this->sideMenu = 'hrd_employee';
//$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Maxiprodaks'), 'url' => ['prodak']];
//$this->params['breadcrumbs'][] = $this->title;
$Dept_MDL = Dept::find()->where(['DEP_ID' => $model->DEP_ID])->orderBy('SORT')->one();
$Val_Jabatan = $Dept_MDL->DEP_NM;
$attribute = [['attribute' => 'DEP_ID'], ['attribute' => 'DEP_NM'], ['attribute' => 'DEP_DCRP', 'format' => 'raw', 'type' => DetailView::INPUT_TEXTAREA, 'widgetOptions' => ['data' => 'DEP_DCRP', 'options' => ['placeholder' => 'Position Description ...'], 'pluginOptions' => ['allowClear' => true]]], ['attribute' => 'SORT']];
echo DetailView::widget(['model' => $model, 'condensed' => true, 'hover' => true, 'mode' => DetailView::MODE_VIEW, 'panel' => ['heading' => $model->DEP_ID . '| ' . $model->DEP_NM, 'type' => DetailView::TYPE_INFO], 'attributes' => $attribute]);
?>