Esempio n. 1
0
<div class="text-block-form">

    <?php 
$form = ActiveForm::begin();
?>

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

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

    <?php 
echo $form->field($model, 'body')->widget(trntv\aceeditor\AceEditor::className(), ['mode' => 'html']);
?>

    <?php 
echo $form->field($model, 'status')->checkbox();
?>

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

    <?php 
ActiveForm::end();
?>
Esempio n. 2
0
?>

    <?php 
echo $form->errorSummary($model);
?>

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

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

    <?php 
echo $form->field($model, 'items')->widget(trntv\aceeditor\AceEditor::className(), ['mode' => 'json']);
?>

    <?php 
echo $form->field($model, 'status')->checkbox();
?>

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

    <?php 
ActiveForm::end();
?>
Esempio n. 3
0
    ?>
">
                                <?php 
    echo $lang['label'];
    ?>
                            </option>
                        <?php 
}
?>
                    </select>
                    <p class="help-block help-block-error"></p>
                </div>
            </div>
        </div>
        <?php 
echo $form->field($model, 'code')->widget(trntv\aceeditor\AceEditor::className(), ['mode' => $model->language, 'theme' => Yii::$app->userSettings->aceStyle])->hint(Yii::t('happycode', 'You can paste whatever shitty code you want, remember that this code will be (hopefully) available to everyone!'));
?>
        <?php 
echo $form->field($model, 'verifyCode')->widget(Captcha::className(), ['template' => '<div class="row"><div class="col-lg-2">{image}</div><div class="col-lg-3">{input}</div></div>']);
?>
        <?php 
echo $form->field($model, 'author')->hint(Yii::t('happycode', 'Fill that field if you want people to know who is an author of this paste.'));
?>
        <?php 
echo $form->field($model, 'description')->textArea(['rows' => 3])->hint(Yii::t('happycode', 'You can describe your paste with few words, if it needs some explanation or context. You can use {markdown}.', ['markdown' => Html::a('Github flavored markdown', 'https://help.github.com/articles/github-flavored-markdown/')]));
?>
        <div class="for m-group">
            <?php 
echo Html::submitButton('Submit', ['class' => 'btn btn-primary', 'name' => 'contact-button']);
?>
        </div>