Ejemplo n.º 1
0
/**
 * @var yii\web\View $this
 * @var common\models\User $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<?php 
$form = ActiveForm::begin(['options' => ['class' => 'form-horizontal', 'role' => 'form'], 'fieldConfig' => ['template' => "{label}\n<div class=\"col-sm-4 col-xs-12\">{input}</div><div class=\"help-block col-xs-12 col-sm-reset inline\">{error}</div>", 'labelOptions' => ['class' => 'col-sm-2 control-label no-padding-right']]]);
?>
        <?php 
echo $form->field($model, 'flow_name')->textInput(['class' => 'col-xs-12']);
?>

        <?php 
echo $form->field($model, 'category_id')->dropDownList(ArrayHelper::map(FlowCategory::find()->all(), 'category_id', 'category_name'), ['class' => 'col-xs-12', 'prompt' => Yii::t('app', 'Please Select')]);
?>

        <?php 
echo $form->field($model, 'form_id')->dropDownList(ArrayHelper::map(FlowForm::find()->all(), 'form_id', 'form_name'), ['class' => 'col-xs-12', 'prompt' => Yii::t('app', 'Please Select')]);
?>

        <div class="form-group">
            <label class="col-sm-2 control-label no-padding-right"><?php 
echo Yii::t('app', 'Flow Type');
?>
</label>

            <div class="radio inline">
                <label>
                    <input name="FlowItem[Flow_type]" value="1" type="radio" class="ace" <?php 
Ejemplo n.º 2
0
                            <?php 
foreach ($rows as $row) {
    ?>
                            <tr>
                                <td>
                                    <?php 
    echo $row['flow_id'];
    ?>
                                </td>
                                <td><?php 
    echo $row['flow_name'];
    ?>
</td>
                                <td>
                                    <?php 
    $category = \backend\models\FlowCategory::findOne($row['category_id']);
    if ($category) {
        echo $category['category_name'];
    } else {
        echo Yii::t('app', 'Unknown');
    }
    ?>
                                </td>
                                <td>
                                    <?php 
    if ($row['flow_status'] == 1) {
        echo '<span class="label label-success arrowed">' . Yii::t('app', 'Enable') . '</span>';
    } else {
        echo '<span class="label label-warning">' . Yii::t('app', 'Disable') . '</span>';
    }
    ?>