Ejemplo n.º 1
2
?>

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

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

    <label><?php 
echo Yii::t('app', 'Gender');
?>
</label>
    <?php 
echo SwitchInput::widget(['model' => $model, 'attribute' => 'gender', 'pluginOptions' => ['size' => 'medium', 'onColor' => 'success', 'offColor' => 'success', 'onText' => Yii::t('app', 'Male'), 'offText' => Yii::t('app', 'Female')]]);
?>

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

    <label><?php 
echo Yii::t('app', 'Birth Date');
?>
</label>

    <?php 
echo DatePicker::widget(['attribute' => 'birth_date', 'model' => $model, 'options' => ['placeholder' => 'Select date ...'], 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'autoclose' => true, 'todayHighlight' => false]]);
?>
Ejemplo n.º 2
0
use frontend\helper\StatusHelper;
use kartik\sortable\Sortable;
use kartik\switchinput\SwitchInput;
use yii\helpers\Html;
use yii\widgets\Pjax;
/* @var $modelAll frontend\models\Category */
$this->title = 'Категории';
$this->params['breadcrumbs'][] = $this->title;
$list = [];
/** @var \frontend\models\Category $model */
foreach ($modelAll as $model) {
    $switch = SwitchInput::widget(['name' => 'status_' . $model->id, 'value' => StatusHelper::getValueForHtml($model->status), 'options' => ['class' => 'switchInputCategory'], 'pluginOptions' => ['onText' => 'Отображать', 'offText' => 'Скрыть', 'onColor' => 'success', 'offColor' => 'danger', 'size' => 'small'], 'pluginEvents' => ["switchChange.bootstrapSwitch" => 'function(event, state) {
                                                    $.ajax({
                                                            url: "' . Yii::$app->urlManager->createUrl(["category/hidden-category", 'id' => $model->id]) . '",
                                                            type: "post",
                                                            data: {"value": +state},
                                                            cache: false,
                                                            success: function(data) {}
                                                    });
                                                }']]);
    $remove = '';
    if (!isset($model->base_category_id)) {
        $remove = Html::a('', Yii::$app->urlManager->createUrl(['category/remove', 'id' => $model->id]), ['class' => 'btn btn-danger glyphicon glyphicon-remove management-help', 'data-pjax' => 'false', 'data' => ['confirm' => 'Вы уверены, что хотите удалить категорию?', 'method' => 'post']]);
    }
    $list[] = ['content' => '
                        <div class="col-md-8">' . $model->title . '</div>
                        <div class="col-md-2">' . $switch . '</div>
                        <div class="col-md-2">' . Html::a('', Yii::$app->urlManager->createUrl(['category/edit', 'id' => $model->id]), ['class' => 'btn btn-info glyphicon glyphicon-pencil management-help', 'data-pjax' => 'false']) . $remove . '</div>', 'options' => ['data-icat' => $model->id]];
}
?>
</h5>
	<h5 style="color: #000000">From - <?php 
echo $prof_info->user_from_city . ", " . $prof_info->user_from_state . " ";
?>
</h5>
	</a>
	<h5 style="color: #000000">Revenue - <?php 
echo $name->designer_revenue;
?>
</h5>
	<h5>
	<?php 
echo '<label class="control-label">Want Investment</label>';
?>
	<?php 
echo SwitchInput::widget(['name' => 'status_13', 'pluginOptions' => ['onText' => 'Yes', 'offText' => 'No', 'size' => 'mini']]);
?>
</h5>
	</div>
	<div class="col-xs-3">
	<?php 
$endorsementmodel = new Endorsement(['sense_of_fashion' => $endorsement->sense_of_fashion, 'sense_of_style' => $endorsement->sense_of_style, 'creativity' => $endorsement->creativity, 'decisiveness' => $endorsement->decisiveness]);
?>
	
	<table>
	<tr>
	<td style="padding: 5px;">
	<label class="control-label" for="endorsement-decisiveness">Sense of Fashion</label>
	</td>
	<!-- Background image below can be changed but it has to have same height and width as below column-->
	<td background="uploads/siteimages/star.jpg" style="height:50px;width:80px">
Ejemplo n.º 4
0
 */
use yii\widgets\Pjax;
use kartik\switchinput\SwitchInput;
\meican\circuits\assets\reservation\Status::register($this);
$this->params['header'] = [Yii::t('circuits', 'Status'), ['Home', Yii::t('circuits', 'Circuits'), 'Status']];
?>

<div class="box box-default">
    <div class="box-header with-border">
        <h3 class="box-title"><?php 
echo Yii::t("circuits", "Circuits");
?>
</h3>
        <div class="box-tools pull-right">
            <?php 
echo SwitchInput::widget(['id' => 'auto-refresh-switch', 'name' => 'auto-refresh', 'value' => true, 'pluginOptions' => ['size' => 'small', 'labelText' => 'Auto update']]);
?>
        </div>
    </div>
    <div class="box-body">   
        <?php 
Pjax::begin(['id' => 'circuits-pjax']);
?>

        <?php 
echo $this->render('_grid', array('gridId' => 'circuits-grid', 'data' => $data, 'searchModel' => $searchModel, 'allowedDomains' => $allowedDomains));
?>
        
        <?php 
Pjax::end();
?>
Ejemplo n.º 5
0
        <?php 
ActiveForm::end();
?>

       <!--Komentari foreach-->
       <?php 
echo '<b>Comments:</b> </br>';
foreach ($comments as $value) {
    ?>
       
       <textarea rows="6" readonly><?php 
    echo $value->content;
    ?>
</textarea> </br>
       <td><?php 
    echo SwitchInput::widget(['type' => SwitchInput::CHECKBOX, 'name' => $value->id, 'value' => false]);
    ?>
</td>
    
      <?php 
}
?>

        
       <div class="comment-form">
    <?php 
$form = ActiveForm::begin(['action' => 'index.php?r=admin%2Fcomment%2Fcreate']);
?>

    <?php 
echo $form->field($comment, 'content')->textarea(['rows' => 6]);
Ejemplo n.º 6
0
         ?>
                     <div class="help-text">
                         <?php 
         echo $subItem['full_description'];
         ?>
                     </div>
                 <?php 
     }
     ?>
             </div>
             <div class="col-sm-4 col-xs-5">
                 <?php 
     if ($subItem['type'] == 'checkbox') {
         ?>
                     <?php 
         echo \kartik\switchinput\SwitchInput::widget(['name' => 'rights[' . $key2 . ']', 'value' => isset($rights[$key2]) && (int) $rights[$key2] ? 1 : 0, 'pluginOptions' => ['size' => 'medium', 'onColor' => 'success', 'offColor' => 'danger', 'onText' => 'Да', 'offText' => 'Нет'], 'pluginEvents' => ["switchChange.bootstrapSwitch" => "function(event, state) {\n                                        if(state) \$(this).val(1);\n                                        else \$(this).val(0);\n                                    }"]]);
         ?>
                 <?php 
     } elseif ($subItem['type'] == 'text') {
         ?>
                     <?php 
         echo \yii\helpers\Html::input('text', 'rights[' . $key2 . ']', isset($rights[$key2]) ? $rights[$key2] : "", ['class' => 'form-control input-sm']);
         ?>
                 <?php 
     }
     ?>
             </div>
         </div>
     <?php 
 }
 ?>
Ejemplo n.º 7
-2
        if ($mpc->status == $mpc::STATUS_YES) {
            $value = 1;
        } else {
            if ($mpc->status == $mpc::STATUS_NO) {
                $value = 0;
            } else {
                if ($mpc->status == $mpc::STATUS_UNKNOWN) {
                    $value = -1;
                }
            }
        }
        echo SwitchInput::widget(['type' => SwitchInput::CHECKBOX, 'name' => 'meeting-place-choice', 'id' => 'mpc-' . $mpc->id, 'tristate' => true, 'indeterminateValue' => -1, 'indeterminateToggle' => false, 'disabled' => true, 'value' => $value, 'pluginOptions' => ['size' => 'mini', 'onText' => '<i class="glyphicon glyphicon-ok"></i>', 'offText' => '<i class="glyphicon glyphicon-remove"></i>', 'onColor' => 'success', 'offColor' => 'danger']]);
    }
}
?>
  </td>
  <td style>
      
      <?php 
if ($placeCount > 1) {
    if ($model->status == $model::STATUS_SELECTED) {
        $value = $model->id;
    } else {
        $value = 0;
    }
    echo SwitchInput::widget(['type' => SwitchInput::RADIO, 'name' => 'place-chooser', 'items' => [['value' => $model->id]], 'value' => $value, 'pluginOptions' => ['size' => 'mini', 'handleWidth' => 60, 'onText' => '<i class="glyphicon glyphicon-ok"></i>', 'offText' => '<i class="glyphicon glyphicon-remove"></i>'], 'labelOptions' => ['style' => 'font-size: 12px']]);
}
?>
  </td>
</tr>