Ejemplo n.º 1
0
?>

    <?php 
echo $form->field($model, 'description')->textarea();
?>

    <?php 
echo $form->field($model, 'thumbMediaId')->widget(FileApi::className(), ['jsOptions' => ['url' => $uploadUrl]]);
?>

    <?php 
echo $form->field($model, 'mediaId')->widget(FileApi::className(), ['jsOptions' => ['url' => $uploadUrl]]);
?>

    <?php 
echo $form->field($model, 'musicUrl')->widget(FileApi::className(), ['jsOptions' => ['url' => $uploadUrl]]);
?>

    <div class="form-group submit-button">
        <div class="col-sm-offset-3 col-sm-6">
            <?php 
echo Html::submitButton('发送', ['class' => 'btn btn-block btn-primary']);
?>
        </div>
    </div>

<?php 
ActiveForm::end();
$this->registerJs(<<<EOF
    \$('#messageForm').message();
EOF
Ejemplo n.º 2
0
    ?>

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

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

        <?php 
    echo $form->field($model, 'avatar')->widget(FileApi::className(), ['jsOptions' => ['url' => ['upload', 'id' => $model->id]]]);
    ?>

        <?php 
    echo $form->field($model, 'qrcode')->widget(FileApi::className(), ['jsOptions' => ['url' => ['upload', 'id' => $model->id]]]);
    ?>

    <?php 
}
?>

    <div class="form-group">
        <div class="col-sm-offset-3 col-sm-6">
            <?php 
echo Html::submitButton($model->isNewRecord ? '创建' : '更新', ['class' => $model->isNewRecord ? 'btn btn-block btn-success' : 'btn btn-block btn-primary']);
?>
        </div>
    </div>

    <?php