Ejemplo n.º 1
0
<?php

use Ffcms\Core\Helper\HTML\Form;
use Ffcms\Core\Helper\Url;
/** @var Apps\Model\Admin\Comments\FormCommentUpdate $model */
/** @var string $type */
$this->title = __('Edit comment');
$this->breadcrumbs = [Url::to('main/index') => __('Main'), Url::to('widget/index') => __('Widgets'), Url::to('comments/index') => __('Comments'), __('Edit comment or answer')];
// use wysiwyg for comment editing by className
echo Ffcms\Widgets\Ckeditor\Ckeditor::widget(['targetClass' => 'wysi-comments', 'config' => 'config-small']);
?>

<?php 
echo $this->render('comments/_tabs');
?>

<h1><?php 
echo __('Edit comment/answer');
?>
</h1>
<hr />
<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'method' => 'post']);
echo $form->start();
?>

<?php 
echo $form->field('guestName', 'text', ['class' => 'form-control'], __('Guest name for this comment or answer if defined'));
echo $form->field('message', 'textarea', ['class' => 'form-control wysi-comments', 'html' => true], __('Comment message text'));
?>
Ejemplo n.º 2
0
<?php

use Apps\ActiveRecord\ContentCategory;
use Ffcms\Core\Helper\HTML\Bootstrap\Nav;
use Ffcms\Core\Helper\HTML\Form;
use Ffcms\Core\Helper\Type\Str;
use Ffcms\Core\Helper\Url;
/** @var $this \Ffcms\Core\Arch\View */
/** @var $model \Apps\Model\Front\Content\FormNarrowContentUpdate */
echo Ffcms\Widgets\Ckeditor\Ckeditor::widget(['targetClass' => 'wysiwyg', 'config' => 'config-medium']);
$this->title = __('Content update');
$this->breadcrumbs = [Url::to('/') => __('Home'), Url::to('content/index') => __('Contents'), Url::to('content/my') => __('My content'), __('Content edit')];
?>

<h1><?php 
echo __('Content edit');
?>
</h1>
<hr />
<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'enctype' => 'multipart/form-data']);
echo $form->start();
?>

<?php 
$items = [];
foreach (\App::$Properties->get('languages') as $lang) {
    $items[] = ['type' => 'tab', 'text' => __('Lang') . ': ' . Str::upperCase($lang), 'content' => $form->field('title.' . $lang, 'text', ['class' => 'form-control'], __('Please, enter the title of your material for current language locale')) . $form->field('text.' . $lang, 'textarea', ['class' => 'form-control wysiwyg', 'rows' => 7, 'html' => true]), 'html' => true, 'active' => $lang === \App::$Request->getLanguage(), '!secure' => true];
}
echo Nav::display(['property' => ['class' => 'nav-pills'], 'blockProperty' => ['class' => 'nav-locale-block'], 'tabAnchor' => 'content-update-general-locale', 'items' => $items]);
?>