echo $form->field($model, 'mediaId', ['inputTemplate' => '<div class="input-group"><span class="input-group-btn">' . $a . '</span>{input}</div>'])->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'mediaId')->widget(FileApiInputWidget::className(), ['template' => "\n<div id=\"{id}\" class=\"input-group\">\n<div class=\"input-group-btn\">\n{button}{fields}\n</div>\n{input}\n<div class=\"input-group-btn\">\n{$a}\n</div></div>\n", 'fields' => Html::hiddenInput('mediaType'), 'jsOptions' => ['url' => $uploadUrl]]);
?>
    <?php 
echo $form->field($model, 'mediaId')->widget(FileApiInputWidget::className(), ['fields' => Html::hiddenInput('mediaType'), 'jsOptions' => ['url' => $uploadUrl]]);
?>

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

    <?php 
echo $form->field($model, 'musicUrl')->widget(FileApiInputWidget::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
Beispiel #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(FileApiInputWidget::className(), ['jsOptions' => ['url' => ['upload', 'id' => $model->id]]]);
    ?>

        <?php 
    echo $form->field($model, 'qrcode')->widget(FileApiInputWidget::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