Beispiel #1
0
<?php

use softark\duallistbox\DualListbox;
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
$form = ActiveForm::begin(['id' => 'favorite-form', 'enableAjaxValidation' => false]);
echo Html::activeHiddenInput($model, 'term_id');
$options = ['multiple' => true, 'size' => 20];
//    // echo Html::activeListBox($model, $attribute, $items, $options);
echo DualListbox::widget(['model' => $model, 'attribute' => 'INVES_ID', 'items' => $items, 'options' => $options, 'clientOptions' => ['moveOnSelect' => false, 'selectedListLabel' => 'Selected Items', 'nonSelectedListLabel' => 'Available Items']]);
?>

   <div class="form-group">
       <?php 
echo Html::submitButton('Update', ['class' => 'btn btn-primary']);
?>
   </div>

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

<?php 
// $this->registerJs("
//     $('#favorite-form').click(function() {
//       alert('tes');
//     return false;
//   });
// ",$this::POS_READY);
Beispiel #2
0
             ],
        
    ]);?> -->

    <?php 
$options = ['multiple' => true];
// echo $form->field($model, $attribute)->listBox($items, $options);
echo $form->field($model, 'DEP_SUB_ID')->widget(DualListbox::className(), ['items' => $dep, 'options' => $options, 'clientOptions' => ['moveOnSelect' => false, 'selectedListLabel' => 'Selected Items', 'nonSelectedListLabel' => 'Available Items']]);
?>


    <?php 
echo $form->field($model, 'DESTINATION_TO')->widget(Select2::classname(), ['data' => $dropemploy, 'options' => ['placeholder' => 'Pilih Karyawan ...'], 'pluginOptions' => ['allowClear' => true]]);
$options = ['multiple' => true];
// echo $form->field($model, $attribute)->listBox($items, $options);
echo $form->field($model, 'USER_CC')->widget(DualListbox::className(), ['items' => $dropemploy, 'options' => $options, 'clientOptions' => ['moveOnSelect' => false, 'selectedListLabel' => 'Selected Items', 'nonSelectedListLabel' => 'Available Items']]);
?>
	
 

  <?php 
echo $form->field($model, 'PLAN_DATE1')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Enter...', 'value' => $tgl], 'pluginOptions' => ['autoclose' => true], 'pluginEvents' => ['show' => "function(e) {show}"]]);
?>


  <?php 
echo $form->field($model, 'PLAN_DATE2')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Enter...', 'value' => $tgl_1], 'pluginOptions' => ['autoclose' => true], 'pluginEvents' => ['show' => "function(e) {show}"]]);
?>

   
Beispiel #3
0
$options = ['multiple' => true, 'size' => 20];
//    // echo Html::activeListBox($model, $attribute, $items, $options);
//  echo DualListbox::widget([
//     'model' => $model,
//     'attribute' => 'Person',
//    // 'name' => 'coy',
//     'items' => $items,
//     // 'selection' => $items1,
//     'options' => $options,
//     'clientOptions' => [
//         'moveOnSelect' => false,
//         'selectedListLabel' => 'Selected Items',
//         'nonSelectedListLabel' => 'Available Items',
//     ],
// ]);
echo $form->field($person_form, 'Person')->widget(DualListbox::className(), ['options' => $options, 'clientOptions' => ['moveOnSelect' => false, 'selectedListLabel' => 'Selected Items', 'nonSelectedListLabel' => 'Available Items']]);
?>



   <div class="form-group">
       <?php 
echo Html::submitButton('Update', ['class' => 'btn btn-primary']);
?>

       <!-- <button type="button" id="btn-add">Click Me!</button> -->
   </div>

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