コード例 #1
0
ファイル: academic_info.php プロジェクト: aoopvn/EduSec4.0.0
    <div class="col-xs-12 col-sm-6 col-lg-6">
	 <?php 
echo $form->field($model, 'stu_master_batch_id')->dropDownList(ArrayHelper::map(app\modules\course\models\Batches::find()->where(['batch_course_id' => $model->stu_master_course_id, 'is_status' => 0])->all(), 'batch_id', 'batch_name'), ['prompt' => '---Select Batch---', 'onchange' => '
                        $.get( "' . Url::toRoute('dependent/studsection') . '", { id: $(this).val() } )
                            .done(function( data ) {
                                $( "#' . Html::getInputId($model, 'stu_master_section_id') . '" ).html( data );
                            }
                        );']);
?>
    </div>
 </div>

   <div class="col-xs-12 col-sm-12 col-lg-12 no-padding">
    <div class="col-xs-12 col-sm-6 col-lg-6">
	<?php 
echo $form->field($model, 'stu_master_section_id')->dropDownList(ArrayHelper::map(app\modules\course\models\Section::find()->where(['section_batch_id' => $model->stu_master_batch_id, 'is_status' => 0])->all(), 'section_id', 'section_name'), ['' => '---Select Section---']);
?>
    </div>
    <div class="col-xs-12 col-sm-6 col-lg-6">
	<?php 
echo $form->field($info, 'stu_admission_date')->widget(yii\jui\DatePicker::className(), ['clientOptions' => ['changeMonth' => true, 'yearRange' => '1900:' . (date('Y') + 1), 'changeYear' => true, 'readOnly' => true, 'autoSize' => true], 'options' => ['class' => 'form-control']]);
?>
    </div>
   </div>
   <div class="col-xs-12 col-sm-12 col-lg-12 no-padding">
	<div class="col-xs-12 col-sm-6 col-lg-6">
	<?php 
echo $form->field($model, 'is_status')->dropDownList(['' => '---Select Status---', '0' => 'Active', '1' => 'InActive']);
?>
        </div>
	<div class="col-xs-12 col-sm-6 col-lg-6">
コード例 #2
0
ファイル: index.php プロジェクト: EduSec/EduSec
}
?>
	</div>
  </div>
</div>

<div class="col-xs-12" style="padding-top: 10px;">
   <div class="box">
      <div class="box-body table-responsive">
	<div class="stu-master-index">
	<?php 
$visible = Yii::$app->user->can("/student/stu-master/view") ? true : false;
?>
	<?php 
Pjax::begin(['enablePushState' => false]);
?>
	    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'summary' => '', 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['label' => Yii::t('stu', 'Student ID'), 'attribute' => 'stu_unique_id', 'value' => 'stuMasterStuInfo.stu_unique_id'], ['label' => Yii::t('stu', 'First Name'), 'attribute' => 'stu_first_name', 'value' => 'stuMasterStuInfo.stu_first_name'], ['label' => Yii::t('stu', 'Last Name'), 'attribute' => 'stu_last_name', 'value' => 'stuMasterStuInfo.stu_last_name'], ['label' => Yii::t('stu', 'Section'), 'attribute' => 'stu_master_section_id', 'value' => 'stuMasterSection.section_name', 'filter' => ArrayHelper::map(app\modules\course\models\Section::find()->where(['is_status' => 0])->all(), 'section_id', 'section_name', 'sectionBatch.batch_name')], ['label' => Yii::t('stu', 'Batch'), 'attribute' => 'stu_master_batch_id', 'value' => 'stuMasterBatch.batch_name', 'filter' => ArrayHelper::map(app\modules\course\models\Batches::find()->where(['is_status' => 0])->all(), 'batch_id', 'batch_name', 'batchCourse.course_name')], ['label' => Yii::t('stu', 'Course'), 'attribute' => 'stu_master_course_id', 'value' => 'stuMasterCourse.course_name', 'filter' => ArrayHelper::map(app\modules\course\models\Courses::find()->where(['is_status' => 0])->all(), 'course_id', 'course_name')], ['class' => 'app\\components\\CustomActionColumn', 'template' => '{view} {delete}', 'buttons' => ['view' => function ($url, $model) {
    return Yii::$app->user->can("/student/stu-master/view") ? Html::a('<span class="glyphicon glyphicon-search"></span>', $url, ['title' => Yii::t('stu', 'View')]) : '';
}, 'delete' => function ($url, $model) {
    return Yii::$app->user->can("/student/stu-master/delete") ? Html::a('<span class="glyphicon glyphicon-remove"></span>', $url, ['title' => Yii::t('stu', 'Delete'), 'data' => ['confirm' => Yii::t('stu', 'Are you sure you want to delete this item?'), 'method' => 'post']]) : '';
}], 'visible' => $visible]]]);
?>
	<?php 
Pjax::end();
?>
   	</div>
      </div>
    </div>
</div>