Ejemplo n.º 1
0
<?php

/**
 * Created by PhpStorm.
 * User: PC
 * Date: 2015/12/24
 * Time: 19:37
 */
use app\components\JquploadWidget;
?>


<?php 
//=JquploadWidget::widget(['data'=>[
//    ['width'=>100,'height'=>'120','label'=>'头像上传','id'=>'fileupload','link'=>'http://www.baidu.com','url'=>''],
//    ['width'=>200,'height'=>'220','label'=>'logo上传','id'=>'fileupload1','link'=>'http://www.baidu.com','url'=>'http://localhost:8282/updemo/server/php/files/Hydrangeas%20%283%29.jpg'],
//    ['width'=>200,'height'=>'220','label'=>'logo上传','id'=>'fileupload1','link'=>'http://www.baidu.com','url'=>'http://localhost:8282/updemo/server/php/files/Hydrangeas%20%283%29.jpg']
//]])
?>

<?php 
echo JquploadWidget::widget(['data' => [['label' => '头像上传', 'width' => '100', 'height' => '100', 'link' => '', 'url' => $model->user_portrait, 'name' => 'User[user_portrait]']]]);
Ejemplo n.º 2
0
?>

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

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

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

   <?php 
echo $form->field($model, 'user_portrait')->render(JquploadWidget::widget(['data' => [['label' => '头像上传', 'width' => '100', 'height' => '100', 'link' => '', 'url' => $model->user_portrait, 'name' => 'User[user_portrait]']]]));
?>


    <?php 
if (!$model->isNewRecord) {
    ?>
        <?php 
    echo $form->field($model, 'create_time')->textInput(['readonly' => true, 'maxlength' => true, 'value' => Yii::$app->formatter->asDate($model->create_time)]);
    ?>

        <?php 
    echo $form->field($model, 'last_login_time')->textInput(['readonly' => true, 'maxlength' => true, 'value' => Yii::$app->formatter->asDate($model->last_login_time)]);
    ?>

        <?php 
Ejemplo n.º 3
0
    <?php 
echo $form->field($model, 'link')->textInput(['maxlength' => true]);
?>

    <?php 
//= $form->field($model, 'tmp')->textInput()
?>

    <?php 
//= $form->field($model, 'images')->textarea(['rows' => 6])
?>


    <?php 
echo $form->field($model, 'images')->widget(JquploadWidget::className(), ['data' => $model->images]);
?>


    <?php 
//= $form->field($model, 'parentId')->textInput()
?>

    <?php 
echo $form->field($model, 'parentId')->dropDownList($menuList)->label('父级菜单');
?>

    <?php 
echo $form->field($model, 'mtitle')->textInput(['maxlength' => true]);
?>
Ejemplo n.º 4
0
    ?>
        <?php 
    echo JquploadWidget::widget(['data' => [['label' => '菜单图标AA'], ['label' => '菜单副图片AA'], ['label' => '分享图片AA']]]);
    ?>
    <?php 
} else {
    ?>
        <?php 
    echo JquploadWidget::widget(['data' => $model->menu_images]);
    ?>
    <?php 
}
?>

    <?php 
echo JquploadWidget::widget(['data' => [['label' => '上传视频'], ['label' => '上传音乐']], 'type' => 'files']);
?>




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

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