Example #1
0
} else {
    $action = ['create'];
}
?>
	
    <?php 
$form = ActiveForm::begin(['id' => 'national-holidays-form', 'action' => $action, 'enableAjaxValidation' => true]);
?>
<div class="col-sm-6">
    <?php 
echo $form->field($model, 'national_holiday_name', ['inputOptions' => ['class' => 'form-control', 'placeholder' => Yii::t('app', 'National Holiday')]])->textInput(['maxlength' => 50])->label(false);
?>
</div>
<div class="col-sm-6">
    <?php 
echo $form->field($model, 'national_holiday_date')->widget(yii\jui\DatePicker::className(), ['options' => ['placeholder' => Yii::t('app', 'Holiday Date')], 'clientOptions' => ['dateFormat' => 'dd-mm-yyyy', 'changeMonth' => true, 'changeYear' => true, 'autoSize' => true, 'buttonImage' => Yii::$app->homeUrl . "images/calendar.png", 'htmlOptions' => ['style' => 'width:250px;', 'class' => 'form-control']]])->label(false);
?>
 
 </div>
<div class="col-sm-12">
    <?php 
echo $form->field($model, 'national_holiday_remarks', ['inputOptions' => ['class' => 'form-control', 'placeholder' => Yii::t('app', 'Remarks')]])->textInput(['maxlength' => 100])->label(false);
?>
</div>

   <div class="form-group col-xs-12 col-sm-6 col-lg-4 no-padding edusecArLangCss">
	<div class="col-xs-6">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-block btn-success' : 'btn btn-block btn-info']);
?>
	</div>
Example #2
0
    <div class="col-xs-12 col-sm-6 col-lg-6">
    <?php 
echo $form->field($model, 'fees_collect_start_date')->widget(yii\jui\DatePicker::className(), ['clientOptions' => ['dateFormat' => 'dd-mm-yyyy', 'changeMonth' => true, 'changeYear' => true, 'autoSize' => true, 'yearRange' => '1900:' . (date('Y') + 1)], 'options' => ['class' => 'form-control', 'placeholder' => $model->getAttributeLabel('fees_collect_start_date')]]);
?>
    </div>

    <div class="col-xs-12 col-sm-6 col-lg-6">
    <?php 
echo $form->field($model, 'fees_collect_end_date')->widget(yii\jui\DatePicker::className(), ['clientOptions' => ['dateFormat' => 'dd-mm-yyyy', 'changeMonth' => true, 'changeYear' => true, 'autoSize' => true, 'yearRange' => '1900:' . (date('Y') + 1)], 'options' => ['class' => 'form-control', 'placeholder' => $model->getAttributeLabel('fees_collect_end_date')]]);
?>
    </div>

    <div class="col-xs-12 col-sm-6 col-lg-6">
    <?php 
echo $form->field($model, 'fees_collect_due_date')->widget(yii\jui\DatePicker::className(), ['clientOptions' => ['dateFormat' => 'dd-mm-yyyy', 'changeMonth' => true, 'changeYear' => true, 'autoSize' => true, 'yearRange' => '1900:' . (date('Y') + 1)], 'options' => ['class' => 'form-control', 'placeholder' => $model->getAttributeLabel('fees_collect_due_date')]]);
?>
    </div>

    <div class="col-xs-12 col-sm-6 col-lg-6">
    <?php 
if (Yii::$app->controller->action->id === 'create') {
    echo $form->field($model, 'fees_collect_batch_id[]')->dropDownList(ArrayHelper::map(app\modules\course\models\Batches::find()->where(['is_status' => 0])->all(), 'batch_id', 'batch_name', 'batchCourse.course_name'), ['multiple' => "multiple", 'class' => 'form-control', 'placeholder' => $model->getAttributeLabel('fees_collect_batch_id')]);
} else {
    echo $form->field($model, 'fees_collect_batch_id')->dropDownList(ArrayHelper::map(app\modules\course\models\Batches::find()->where(['is_status' => 0])->all(), 'batch_id', 'batch_name', 'batchCourse.course_name'), ['class' => 'form-control', 'placeholder' => $model->getAttributeLabel('fees_collect_batch_id')]);
}
?>
    </div>

    <div class="form-group col-xs-12 col-sm-6 col-lg-4 no-padding edusecArLangCss">
	<div class="col-xs-6">
Example #3
0
echo $form->field($model, 'notice_description')->textArea(['maxlength' => 255, 'placeholder' => 'Enter Description']);
?>
    
    <?php 
echo $form->field($model, 'notice_user_type')->radioList(["S" => 'Student', "E" => 'Employee', '0' => 'General'], ['item' => function ($index, $label, $name, $checked, $value) {
    $return = '<label class="left-padding">';
    $return .= Html::radio($name, $checked, ['value' => $value]);
    $return .= '<i></i>';
    $return .= '<span>&nbsp;&nbsp;&nbsp;' . ucwords($label) . '</span>';
    $return .= '</label>';
    return $return;
}])->label('User Type');
?>

    <?php 
echo $form->field($model, 'notice_date')->widget(yii\jui\DatePicker::className(), ['clientOptions' => ['dateFormat' => 'dd-mm-yyyy', 'changeMonth' => true, 'changeYear' => true, 'autoSize' => true], 'options' => ['class' => 'form-control', 'placeholder' => 'Select Date']]);
?>

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

    <?php 
echo $form->field($model, 'is_status')->checkBox(['value' => 0, 'uncheck' => 1], true);
?>

    <div class="form-group col-xs-12 col-sm-6 col-lg-4 no-padding">
	<div class="col-xs-6">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-block btn-success' : 'btn btn-block btn-info']);
?>
Example #4
0
?>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-12">
                            <?php 
echo $form->field($user, 'tags')->textInput(['placeholder' => Yii::t('TourModule.views_tour_welcome', 'Your skills, knowledge and experience (comma seperated)')]);
?>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-6">
                            <?php 
echo $form->field($user->profile, 'birthday')->widget(yii\jui\DatePicker::className(), ['dateFormat' => \humhub\modules\user\models\fieldtype\Birthday::DATEPICKER_FORMAT, 'clientOptions' => [], 'options' => ['class' => 'form-control']]);
?>
                        </div>
                        <div class="col-md-6">
                            <br><br>
                            <?php 
echo $form->field($user->profile, 'birthday_hide_year')->checkbox(['label' => Yii::t('TourModule.views_tour_welcome', 'Hide my year of birth')]);
?>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-12">
                            <hr>
                        </div>
                    </div>
Example #5
0
/* @var $model app\models\Books */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="books-form">

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

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

    <?php 
echo $form->field($model, 'date_create')->widget(yii\jui\DatePicker::className(), ['language' => 'ru', 'dateFormat' => 'yyyy-MM-dd']);
?>

    <?php 
echo $form->field($model, 'preview')->fileInput();
?>
    <?php 
if ($model->getPreviewUrl()) {
    ?>
        <?php 
    echo Html::img($model->getPreviewUrl(), ['width' => 150]);
    ?>
    <?php 
}
?>
Example #6
0
?>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-12">
                            <?php 
echo $form->field($user, 'tags')->textInput(['placeholder' => Yii::t('TourModule.views_tour_welcome', 'Your skills, knowledge and experience (comma seperated)')]);
?>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-6">
                            <?php 
echo $form->field($user->profile, 'birthday')->widget(yii\jui\DatePicker::className(), ['clientOptions' => [], 'options' => ['class' => 'form-control', 'placeholder' => Yii::t('TourModule.views_tour_welcome', 'mm/dd/yyyy')]]);
?>
                        </div>
                        <div class="col-md-6">
                            <br><br>
                            <?php 
echo $form->field($user->profile, 'birthday_hide_year')->checkbox(['label' => Yii::t('TourModule.views_tour_welcome', 'Hide my year of birth')]);
?>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-12">
                            <hr>
                        </div>
                    </div>
Example #7
0
?>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-12">
                            <?php 
echo $form->field($user, 'tags')->textInput(['placeholder' => Yii::t('TourModule.views_tour_welcome', 'Your skills, knowledge and experience (comma seperated)')]);
?>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-6">
                            <?php 
echo $form->field($user->profile, 'birthday')->widget(yii\jui\DatePicker::className(), ['dateFormat' => Yii::$app->params['formatter']['defaultDateFormat'], 'clientOptions' => [], 'options' => ['class' => 'form-control']]);
?>
                        </div>
                        <div class="col-md-6">
                            <br><br>
                            <?php 
echo $form->field($user->profile, 'birthday_hide_year')->checkbox(['label' => Yii::t('TourModule.views_tour_welcome', 'Hide my year of birth')]);
?>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-12">
                            <hr>
                        </div>
                    </div>
Example #8
0
                    <?php 
echo $form->field($task, 'assignedUserGuids')->textInput(['id' => 'assignedUserGuids']);
?>

                    <?php 
// attach mention widget to it
echo humhub\modules\user\widgets\UserPicker::widget(array('model' => $task, 'inputId' => 'assignedUserGuids', 'attribute' => 'assignedUserGuids', 'userSearchUrl' => $this->context->contentContainer->createUrl('/space/membership/search', array('keyword' => '-keywordPlaceholder-')), 'maxUsers' => 10, 'placeholderText' => Yii::t('TasksModule.views_task_edit', 'Assign users')));
?>

                </div>
                <div class="col-md-4">

                    <div class="form-group">
                        <?php 
echo $form->field($task, 'deadline')->widget(yii\jui\DatePicker::className(), ['dateFormat' => Yii::$app->params['formatter']['defaultDateFormat'], 'clientOptions' => [], 'options' => ['class' => 'form-control', 'placeholder' => Yii::t('TasksModule.views_task_edit', 'Deadline')]]);
?>
                    </div>

                </div>
            </div>
            <br>

            <div class="row">
                <div class="col-md-12">
                    <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('TasksModule.views_task_edit', 'Save'), 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression('function(){ setModalLoader(); }'), 'success' => new yii\web\JsExpression('function(html){ $("#globalModal").html(html); }'), 'url' => $task->content->container->createUrl('/tasks/task/edit', ['id' => $task->id])], 'htmlOptions' => ['class' => 'btn btn-primary']]);
?>

                    <button type="button" class="btn btn-primary"
                            data-dismiss="modal"><?php 
Example #9
0
use app\modules\business\models\CustomerDetails;
use kartik\widgets\DepDrop;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $model app\modules\business\models\Trips */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="trips-form">

    <?php 
$form = ActiveForm::begin();
?>
    
    <?php 
echo $form->field($model, 'date_of_travel')->widget(yii\jui\DatePicker::className(), ['clientOptions' => ['dateFormat' => 'dd-mm-yyyy', 'changeMonth' => true, 'changeYear' => true, 'autoSize' => true, 'yearRange' => '1900:' . (date('Y') + 1)], 'options' => ['class' => 'form-control', 'placeholder' => $model->getAttributeLabel('date_of_travel'), 'style' => 'width:500px']]);
?>

	<?php 
echo $form->field($model, 'merchant')->dropDownList(ArrayHelper::map(CustomerDetails::find()->where(['status' => 1, 'customer_type' => 1])->all(), 'id', 'name'), ['prompt' => 'Select Merchant', 'style' => 'width:500px', 'onChange' => 'merchantAmount();']);
?>
      
      <?php 
echo $form->field($model, 'buyer')->dropDownList(ArrayHelper::map(CustomerDetails::find()->where(['status' => 1, 'customer_type' => 2])->all(), 'id', 'name'), ['prompt' => 'Select Buyer', 'style' => 'width:500px', 'onChange' => 'buyerAmount();']);
?>
      
      
    <?php 
echo $form->field($model, 'vehicle_id')->dropDownList(ArrayHelper::map(VehicleDetails::find()->where(['status' => 1])->all(), 'id', 'name'), ['prompt' => 'Select Vehicle', 'style' => 'width:500px', 'id' => 'vehicle-id', 'onChange' => 'calculateKMA();']);
?>