예제 #1
0
    ?>
			<?php 
}
?>
		</div>
	</div>

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

</div>

<?php 
BootstrapSwitch::widget();
CKEditor::widget();
?>

<?php 
if (!$model->isNewRecord) {
    ?>

	<?php 
    echo Cropper::widget(['acceptUrl' => Url::to(['/slider/slider-image/crop']), 'fileInputName' => 'cropperFileUpload', 'imageSelector' => '#slider-image', 'resultSize' => array($model->slider->width, $model->slider->height), 'cropParams' => array('setSelect' => array(0, 0, $model->slider->width, $model->slider->height), 'aspectRatio' => $model->slider->width / $model->slider->height), 'customParams' => array('modelId' => $model->id)]);
}
?>

<?php 
$this->registerCss(<<<CSS
#slider-image img {
\tmax-width: 100%
예제 #2
0
				<?php 
}
?>

			</div>

			<?php 
if ($model->type == ContentPage::TYPE_TEXT) {
    ?>
				<?php 
    echo $form->field($model, 'body', ['enableClientValidation' => false, 'enableAjaxValidation' => false])->textarea(['rows' => 6, 'class' => 'form-control ck-text'])->widget(MultiLanguageActiveField::className(), ['inputType' => 'textArea', 'inputOptions' => ['rows' => 6, 'class' => 'form-control ck-text']]);
    ?>

				<?php 
    CKEditor::widget(['type' => CKEditor::TYPE_STANDARD, 'height' => '320px', 'replaceByClass' => 'ck-text']);
    ?>
			<?php 
}
?>



			<div class="form-group">
				<div class="col-sm-offset-3_ col-sm-9_">
					<?php 
if ($model->isNewRecord) {
    ?>
						<?php 
    echo Html::submitButton('<span class="glyphicon glyphicon-plus-sign"></span> ' . ContentModule::t('app', 'Create'), ['class' => 'btn btn-success']);
    ?>