Example #1
0
echo TimePicker::widget(['name' => 'GLtimeStart', 'options' => ['id' => 'GLtimeStart'], 'pluginOptions' => ['defaultTime' => substr($competition->start_date, 11, 5), 'minuteStep' => 1, 'showMeridian' => false]]);
?>
	</div>


	<div class="col-lg-3">
		<label class="control-label">Flight time</label>
		<?php 
echo TouchSpin::widget(['name' => 'GLdeltaStart', 'options' => ['id' => 'GLdeltaStart'], 'pluginOptions' => ['postfix' => 'min', 'initval' => $competition->flight_time ? $competition->flight_time : Competition::FLIGHT_TIME_DEFAULT, 'min' => 4, 'max' => 30]]);
?>
	</div>

	<div class="col-lg-3">
		<label class="control-label">Flight size</label>
		<?php 
echo TouchSpin::widget(['name' => 'GLflightSize', 'options' => ['id' => 'GLflightSize'], 'pluginOptions' => ['postfix' => 'golfers', 'initval' => 4, 'min' => 1, 'max' => $competition->flight_size ? $competition->flight_size : Competition::FLIGHT_SIZE_DEFAULT], 'pluginEvents' => ['change' => 'cleanUp']]);
?>
	</div>

</div>

<ul id="flight-case">

    <?php 
// each flight
foreach ($flights as $flight) {
    echo '<li>';
    echo $this->render('flight', ['flight' => $flight]);
    echo '</li>';
}
// new flight
Example #2
0
	<?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['frequency' => ['label' => Yii::t('igolf', 'Recurrence'), 'type' => Form::INPUT_DROPDOWN_LIST, 'items' => Recurrence::getLocalizedConstants('FREQUENCY_'), 'columnOptions' => ['colspan' => 4]], 'interval' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => TouchSpin::className(), 'options' => ['pluginOptions' => ['initval' => 1, 'min' => 1, 'max' => 30]], 'columnOptions' => ['colspan' => 4]], 'repeat' => ['label' => Yii::t('igolf', 'every'), 'type' => Form::INPUT_STATIC, 'columnOptions' => ['colspan' => 4]]]]);
echo '<div class="recurrence_byweekday">';
echo $form->field($model, 'byweekday')->checkboxButtonGroup(Enum::dayList())->label(false);
echo '</div>';
echo '<div class="recurrence_bymonth">';
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['option' => ['type' => Form::INPUT_RADIO_LIST, 'items' => ['bymonthday' => Yii::t('igolf', 'on day')], 'columnOptions' => ['colspan' => 2], 'label' => false], 'bymonthday' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::dateList(1, 31), 'columnOptions' => ['colspan' => 2], 'label' => false]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['option' => ['type' => Form::INPUT_RADIO_LIST, 'items' => ['byposday' => Yii::t('igolf', 'on the')], 'columnOptions' => ['colspan' => 2], 'label' => false], 'bypos4month' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Recurrence::getLocalizedConstants('POSITION_'), 'columnOptions' => ['colspan' => 4], 'label' => false], 'weekday4month' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::dayList() + Recurrence::getLocalizedConstants('DAY_'), 'columnOptions' => ['colspan' => 4], 'label' => false]]]);
echo '</div>';
echo '<div class="recurrence_byyear">';
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['option' => ['type' => Form::INPUT_RADIO_LIST, 'items' => ['bymonth' => Yii::t('igolf', 'on')], 'columnOptions' => ['colspan' => 2], 'label' => false], 'bymonth' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::monthList(), 'columnOptions' => ['colspan' => 4], 'label' => false], 'monthday4year' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::dateList(1, 31), 'columnOptions' => ['colspan' => 2], 'label' => false]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['option' => ['type' => Form::INPUT_RADIO_LIST, 'items' => ['byposmonth' => Yii::t('igolf', 'on the')], 'columnOptions' => ['colspan' => 2], 'label' => false], 'bypos4year' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Recurrence::getLocalizedConstants('POSITION_'), 'columnOptions' => ['colspan' => 3], 'label' => false], 'weekday4year' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::dayList() + Recurrence::getLocalizedConstants('DAY_'), 'columnOptions' => ['colspan' => 3], 'label' => false], 'month4year' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::monthList(), 'columnOptions' => ['colspan' => 4], 'label' => false]]]);
echo '</div>';
echo '<div class="recurrence_until">';
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['until' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Recurrence::getLocalizedConstants('UNTIL_'), 'columnOptions' => ['colspan' => 4]], 'count' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => TouchSpin::className(), 'options' => ['pluginOptions' => ['initval' => 1, 'min' => 1, 'max' => 20]], 'columnOptions' => ['colspan' => 4]], 'date_end' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DatePicker::className(), 'options' => ['pluginOptions' => ['format' => 'yyyy/mm/dd', 'todayHighlight' => true]], 'columnOptions' => ['colspan' => 4], 'label' => Yii::t('igolf', 'End Date')]]]);
echo '</div>';
?>

	<div class="form-group">
	    <?php 
echo Html::button(Yii::t('igolf', 'Cancel'), ['class' => 'btn btn-danger', 'data' => ['dismiss' => 'modal']]);
?>
	    <?php 
echo Html::button(Yii::t('igolf', 'OK'), ['class' => 'btn btn-success action-ok', 'data' => ['dismiss' => 'modal']]);
?>
	</div>

</div>
<script type="text/javascript">
<?php 
Example #3
0
?>
	 <?php 
echo $form->field($model, 'RT')->hiddenInput(['value' => Yii::$app->user->identity->warga, 'readonly' => true])->label(false);
?>
     <?php 
echo $form->field($model, 'KK_NM')->textInput(['maxlength' => true]);
?>
	<div>
		<div style="float:right; width:25%">
		  <?php 
echo $form->field($model, 'noAlfa')->textInput(['maxlength' => true]);
?>
		</div>
		<div style="float:right; width:25%">
			<?php 
echo $form->field($model, 'noInt')->widget(TouchSpin::classname(), ['name' => 't4', 'options' => ['placeholder' => 'No Rumah ...'], 'pluginOptions' => ['buttonup_class' => 'btn btn-primary', 'buttondown_class' => 'btn btn-info', 'buttonup_txt' => '<i class="glyphicon glyphicon-plus-sign"></i>', 'buttondown_txt' => '<i class="glyphicon glyphicon-minus-sign"></i>']]);
?>
			
		</div>		
		<div style=" width:50%">
			<?php 
echo $form->field($model, 'RUMAH_BLOCK')->dropDownList($dataBlock, ['id' => 'data-warga-block']);
?>
		</div>
	</div>
	<?php 
echo $form->field($model, 'RUMAH_STT')->dropDownList($sttNm, ['id' => 'data-warga-rumastatus']);
?>

      <div class="form-group">
        <?php 
Example #4
0
?>
        </div>
        <div class="clearfix"></div>
        <div class="col-sm-3">
            <?php 
echo $form->field($model, 'buy_price', ['addon' => ['prepend' => ['content' => '₱'], 'append' => ['content' => '.00']]])->textInput(['class' => 'text-align-right'])->hint('Buy price per item');
?>
        </div>
        <div class="col-sm-3">
            <?php 
echo $form->field($model, 'sell_price', ['addon' => ['prepend' => ['content' => '₱'], 'append' => ['content' => '.00']]])->textInput(['class' => 'text-align-right'])->hint('Selling price per item');
?>
        </div>
        <div class="col-md-3">
            <?php 
echo $form->field($model, 'quantity')->widget(TouchSpin::classname(), ['pluginOptions' => ['min' => 1]])->label('Number of Items');
?>
        </div>
        <div class="clearfix"></div>
    </div>



    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        <?php 
echo Html::a('Cancel', ['index'], ['class' => 'btn btn-danger margin-10-left']);
?>
    </div>
Example #5
0
//echo $form->field($model, 'CUST_NM')->textInput(['maxlength' => true])
?>

    <?php 
echo $form->field($model, 'KD_BARANG')->widget(Select2::classname(), ['data' => $esm_brg, 'options' => ['placeholder' => 'Search for a Item Barang ...'], 'pluginOptions' => ['maximumInputLength' => 3]]);
?>

    <?php 
//= $form->field($model, 'NM_BARANG')->textInput(['maxlength' => true])
?>

    <?php 
echo $form->field($model, 'STOCK_GUDANG_UNIT')->widget(TouchSpin::classname(), ['name' => 't4', 'options' => ['placeholder' => 'Entry Jumlah Stok per Item Barang ...'], 'pluginOptions' => ['buttonup_class' => 'btn btn-primary', 'buttondown_class' => 'btn btn-info', 'buttonup_txt' => '<i class="glyphicon glyphicon-plus-sign"></i>', 'buttondown_txt' => '<i class="glyphicon glyphicon-minus-sign"></i>']]);
?>
	<?php 
echo $form->field($model, 'STOCK_GUDANG_PCS')->widget(TouchSpin::classname(), ['name' => 't5', 'options' => ['placeholder' => 'Entry Jumlah Stok per Item Barang ...'], 'pluginOptions' => ['buttonup_class' => 'btn btn-primary', 'buttondown_class' => 'btn btn-info', 'buttonup_txt' => '<i class="glyphicon glyphicon-plus-sign"></i>', 'buttondown_txt' => '<i class="glyphicon glyphicon-minus-sign"></i>']]);
?>

    <?php 
//= $form->field($model, 'PRODAK_LINE')->textInput(['maxlength' => true])
?>

    <?php 
//= $form->field($model, 'CORP_ID')->textInput(['maxlength' => true])
?>

    <?php 
//= $form->field($model, 'KD_DISTRIBUTOR')->textInput(['maxlength' => true])
?>

    <?php 
Example #6
0


<div class="kategoricus-form">

    <?php 
$form = ActiveForm::begin(['id' => $model->formName(), 'enableClientValidation' => true]);
?>


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

     <?php 
echo $form->field($model, 'JEDA_PEKAN')->widget(TouchSpin::classname(), ['options' => ['placeholder' => 'jeda pekan ...']]);
?>

      <?php 
echo $form->field($model, 'DCRIPT')->textArea(['rows' => 6]);
?>


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

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

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

    <div class="row">
        <div class="col-sm-12 col-md-4 col-lg-3">
            <?php 
echo $form->field($model, 'width')->widget(TouchSpin::classname(), ['options' => ['maxlength' => 5, 'tabindex' => 2], 'pluginOptions' => ['min' => 0, 'max' => 1920, 'step' => 1, 'postfix' => 'px', 'buttonup_txt' => '<i class="glyphicon glyphicon-plus-sign"></i>', 'buttondown_txt' => '<i class="glyphicon glyphicon-minus-sign"></i>']]);
?>
    
        </div>
        <div class="col-sm-12 col-md-4 col-lg-3">
            <?php 
echo $form->field($model, 'height')->widget(TouchSpin::classname(), ['options' => ['maxlength' => 5, 'tabindex' => 3], 'pluginOptions' => ['min' => 0, 'max' => 99999, 'step' => 1, 'postfix' => 'px', 'buttonup_txt' => '<i class="glyphicon glyphicon-plus-sign"></i>', 'buttondown_txt' => '<i class="glyphicon glyphicon-minus-sign"></i>']]);
?>
    
        </div>
    </div>

    <div class="buttons form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'tabindex' => 4]);
?>
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create & close') : Yii::t('app', 'Update & close'), ['class' => 'btn btn-default', 'name' => 'close', 'tabindex' => 5]);
?>
        <?php 
echo Html::submitButton(Yii::t('app', $model->isNewRecord ? 'Create & new' : 'Update & new'), ['class' => 'btn btn-default', 'name' => 'new', 'tabindex' => 6]);
?>
Example #8
0
echo $form->field($model, 'TGL')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Enter date start ...'], 'pluginOptions' => ['todayHighlight' => true, 'autoclose' => true, 'format' => 'yyyy-m-dd'], 'pluginEvents' => ['show' => "function(e) {show}"]]);
?>

     <!-- $form->field($model, 'STT_DEFAULT')->textInput() ?> -->

     <?php 
echo $form->field($model, 'SCORE_RSLT')->widget(Select2::classname(), ['options' => ['placeholder' => 'Select...'], 'data' => $score]);
?>


     <?php 
echo $form->field($model, 'SCORE_PERCENT_MIN')->widget(TouchSpin::classname(), ['options' => ['placeholder' => 'Enter rating 0 to 100...'], 'pluginOptions' => ['postfix' => '%']]);
?>

        <?php 
echo $form->field($model, 'SCORE_PERCENT_MAX')->widget(TouchSpin::classname(), ['options' => ['placeholder' => 'Enter rating 0 to 100...'], 'pluginOptions' => ['postfix' => '%']]);
?>
     

    

  

    
    <!-- $form->field($model, 'KATEGORI')->textInput(['maxlength' => true]) ?> -->

    <!-- $form->field($model, 'BOBOT_PERCENT')->textInput() ?> -->

     <!-- $form->field($model, 'TARGET_MONTH')->textInput() ?> -->

     <!-- $form->field($model, 'TARGET_DAY')->textInput() ?> -->
Example #9
0
?>

    <?php 
echo $form->field($model, 'hardness')->textInput();
?>

    <?php 
echo $form->field($model, 'shine')->widget(Select2::classname(), ['language' => $lang, 'data' => ArrayHelper::map(Shine::find()->asArray()->all(), 'id', 'name'), 'options' => ['multiple' => true], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10, 'allowClear' => true]]);
?>

    <?php 
echo $form->field($model, 'cleavage')->widget(Select2::classname(), ['language' => $lang, 'data' => $model->getCleavageList(), 'pluginOptions' => ['allowClear' => true]]);
?>

    <?php 
echo $form->field($model, 'cleavage_way')->widget(TouchSpin::classname(), ['pluginOptions' => ['initval' => 0, 'min' => 0, 'max' => 3, 'step' => 1, 'buttonup_txt' => '<i class="glyphicon glyphicon-plus"></i>', 'buttondown_txt' => '<i class="glyphicon glyphicon-minus"></i>']]);
?>

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

    <?php 
echo $form->field($model, 'separate_state')->widget(Select2::classname(), ['language' => $lang, 'data' => $model->getSeparateStates(), 'pluginOptions' => ['allowClear' => true]]);
?>

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

    <?php 
Example #10
0
 /**
  * Numeric field
  *
  * @param array $options
  * @return array
  */
 public static function numericField($options = [])
 {
     return ArrayHelper::merge(['type' => Form::INPUT_WIDGET, 'widgetClass' => TouchSpin::className(), 'options' => ['pluginOptions' => ['verticalbuttons' => true]]], $options);
 }
echo $this->render('_flash_messages');
?>

    <?php 
$form = ActiveForm::begin();
?>

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

    <?php 
if (Yii::$app->user->can('Superadmin')) {
    ?>
    <?php 
    echo $form->field($model, 'max_level')->widget(TouchSpin::classname(), ['pluginOptions' => ['initval' => 2, 'min' => $model->isNewRecord ? 1 : $model->getCurrentMaxLevel()]]);
    ?>
    <?php 
}
?>
    
    <div class="form-group">&nbsp;</div>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create & close') : Yii::t('app', 'Update & close'), ['class' => 'btn btn-default', 'name' => 'close']);
?>
        <?php 
Example #12
0
	<p>Save teams or Reset to restart new fresh list.</p>
</div>

<div class="row">
	<div class="col-lg-2">
		<label class="control-label">Competition start</label> 
		<p><strong><?php 
echo Yii::$app->formatter->asDate($competition->start_date);
?>
</strong></p>
	</div>

	<div class="col-lg-3">
		<label class="control-label">Team size</label>
		<?php 
echo TouchSpin::widget(['name' => 'GLflightSize', 'options' => ['id' => 'GLflightSize'], 'pluginOptions' => ['postfix' => 'golfers', 'initval' => 2, 'min' => 2, 'max' => 4], 'pluginEvents' => ['change' => 'cleanUp']]);
?>
	</div>

</div>

<ul id="flight-case">

	<li>
		<ul id="flight-new" class="flight bench">
		    <?php 
// each flight
foreach ($registrations->each() as $registration) {
    $golfer = $registration->golfer;
    $teesColor = isset($registration->tees->color) ? $registration->tees->color : 'black';
    echo '<li id="registration-' . $registration->id . '" class="golfer"  data-handicap="' . $golfer->handicap . '">' . $golfer->name . ' (' . '<span class="glyphicon glyphicon-filter" style="color: ' . $teesColor . ';"></span> ' . $golfer->handicap . ')</li>';
Example #13
0
        </div>
    </div>
    <div class="col-md-3">
       <div class="box box-success direct-chat direct-chat-success">
           <div class="box-header with-border">
             <h3 class="box-title">Direct Chat</h3>
             <div class="box-tools pull-right">
               <span data-toggle="tooltip" title="" class="badge bg-green" data-original-title="3 New Messages">3</span>
               <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
               <button class="btn btn-box-tool" data-toggle="tooltip" title="" data-widget="chat-pane-toggle" data-original-title="Contacts"><i class="fa fa-comments"></i></button>
               <button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
             </div>
           </div><!-- /.box-header -->
           <div class="box-body">
            <?php 
echo TouchSpin::widget(['name' => 't6', 'pluginOptions' => ['verticalbuttons' => true]]);
?>
           </div> <!-- /.box-body-->           
           <div class="box-footer">
            
           </div><!-- /.box-footer-->           
        </div>
        <div class="box box-success direct-chat direct-chat-success">
            <div class="box-header with-border">
              <h3 class="box-title"Hoa don</h3>
              <div class="box-tools pull-right">
                <span data-toggle="tooltip" title="" class="badge bg-green" data-original-title="3 New Messages">3</span>
                <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                <button class="btn btn-box-tool" data-toggle="tooltip" title="" data-widget="chat-pane-toggle" data-original-title="Contacts"><i class="fa fa-comments"></i></button>
                <button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
              </div>
Example #14
-1
 public function __construct($config = [])
 {
     $pluginOptions = ['verticalbuttons' => true];
     if (self::configHasModel($config) && !isset($config['pluginOptions']['min']) && !isset($config['pluginOptions']['max']) && !isset($config['pluginOptions']['decimals'])) {
         $validators = $config['model']->getActiveValidators($config['attribute']);
         foreach ($validators as $validator) {
             if ($validator instanceof NumberValidator) {
                 if ($validator->min !== null) {
                     $pluginOptions['min'] = $validator->min;
                 }
                 if ($validator->max !== null) {
                     $pluginOptions['max'] = $validator->max;
                 }
                 $pluginOptions['decimals'] = $validator->integerOnly ? 0 : 2;
             }
         }
     }
     parent::__construct(ArrayHelper::merge(compact('pluginOptions'), $config));
 }