Beispiel #1
0
 /**
  * Set model send method type. Allowed: post, get
  * @param string $acceptMethod
  */
 public final function setSubmitMethod($acceptMethod)
 {
     $this->_sendMethod = Str::upperCase($acceptMethod);
 }
Beispiel #2
0
echo __('Manage addition field');
?>
</h1>
<hr />
<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'action' => '', 'method' => 'post']);
?>

<?php 
echo $form->start();
?>

<?php 
$nameTab = [];
foreach (\App::$Properties->get('languages') as $lang) {
    $nameTab[] = ['type' => 'tab', 'text' => __('Lang') . ': ' . Str::upperCase($lang), 'content' => $form->field('name.' . $lang, 'text', ['class' => 'form-control'], __('Define field name, which be displayed for user for current language locale')), 'active' => $lang === \App::$Request->getLanguage(), 'html' => true, '!secure' => true];
}
?>

<?php 
echo Nav::display(['property' => ['class' => 'nav-pills'], 'blockProperty' => ['class' => 'nav-locale-block nav-border'], 'tabAnchor' => 'fieldlist', 'items' => $nameTab]);
?>

<?php 
echo $form->field('type', 'select', ['class' => 'form-control', 'options' => ['text', 'link']], __('Select type of additional field'));
echo $form->field('reg_exp', 'text', ['class' => 'form-control'], __('Set regular expression to validate input data from user for this field. Example: /^[0-9]*$/'));
echo $form->field('reg_cond', 'select', ['class' => 'form-control', 'options' => ['0' => __('Reverse (exclude) condition'), '1' => __('Direct (include) condition')], 'optionsKey' => true], __('Specify condition type of validation expression. Direct - if(cond), reverse - if(!cond)'));
if ($model->reg_exp) {
    ?>
<div class="row">
    <div class="col-md-3">
Beispiel #3
0
echo __('Category manage');
?>
</h1>
<hr />
<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'action' => '']);
?>

<?php 
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'], __('Enter category title, visible for users')) . $form->field('description.' . $lang, 'text', ['class' => 'form-control'], __('Enter category description')), 'html' => true, 'active' => $lang === \App::$Request->getLanguage(), '!secure' => true];
}
?>

<?php 
echo Nav::display(['property' => ['class' => 'nav-pills'], 'blockProperty' => ['class' => 'nav-locale-block nav-border'], 'tabAnchor' => 'category-update-locale', 'items' => $items]);
?>

<?php 
$pathProperty = ['class' => 'form-control'];
if ((int) $model->id == '1') {
    $pathProperty['disabled'] = '';
} else {
    echo $form->field('dependId', 'select', ['class' => 'form-control', 'options' => $model->categoryList(), 'optionsKey' => true], __('Select owner category for this category'));
}
?>
Beispiel #4
0
?>

<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]);
?>

<?php 
echo $form->field('path', 'text', ['class' => 'form-control'], __('Set path slug for content item. Allowed items: a-z, 0-9, -'));
echo $form->field('categoryId', 'select', ['class' => 'form-control', 'size' => 4, 'options' => ContentCategory::getSortedCategories(), 'optionsKey' => true], __('Select content category'));
?>

<?php 
echo $form->field('poster', 'file', null, __('Select poster image for this content'));
?>

<div class="col-md-offset-3 col-md-9">
    <?php