Exemple #1
0
 protected function collectJsTemplates($except = [])
 {
     $view = $this->context->getView();
     $output = [];
     if (is_array($view->js) && array_key_exists(View::POS_READY, $view->js)) {
         foreach ($view->js[View::POS_READY] as $key => $js) {
             if (array_key_exists($key, $except)) {
                 continue;
             }
             if (preg_match('/^[^{]+{multiple_index}.*$/m', $js) === 1) {
                 $output[$key] = $js;
                 unset($view->js[View::POS_READY][$key]);
             }
         }
     }
     return $output;
 }
Exemple #2
0
                    <?php 
$identity = Yii::$app->getUser()->getIdentity();
//                    $identity = Yii::$app->getUser()->identity;
//                    echo '<pre>';print_r($identity);
if (isset($identity->perfil)) {
    //                        VarDumper::dump($identity->perfil, 10, true);
}
?>

                </div>
            </div>
        </div>
    </div>


    <div class="row">
        <?php 
$form = ActiveForm::begin(['id' => 'articulo', "enableClientValidation" => false, 'enableAjaxValidation' => true, 'validateOnChange' => false, 'validateOnSubmit' => true, 'validateOnBlur' => false, 'options' => ['validateOnSubmit' => true, 'enctype' => 'multipart/form-data', 'class' => 'enviarForm form', 'role' => 'form'], 'fieldConfig' => ['template' => "{label}\n{beginWrapper}\n{input}\n{hint}\n{error}\n{endWrapper}", 'hintOptions' => ['tag' => 'span'], 'errorOptions' => ['tag' => 'span'], 'horizontalCssClasses' => ['label' => 'col-sm-3', 'offset' => 'col-sm-offset-3', 'wrapper' => 'col-sm-9', 'error' => 'error-block', 'hint' => 'help-block']]]);
?>

        <?php 
echo $form->field($model, 'empresa')->widget(MultipleInput::className(), ['limit' => 6, 'allowEmptyList' => true, 'enableGuessTitle' => true, 'min' => 1, 'addButtonPosition' => MultipleInput::POS_ROW])->label(false);
?>

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

    </div>
</div>