Файл: templates/modern/controllers/content/item_form.tpl.php
Строк: 63
<?php
$this->addTplJSName('content');
$this->setPageTitle($page_title);
if(!empty($group)){
$this->addBreadcrumb(LANG_GROUPS, href_to('groups'));
$this->addBreadcrumb($group['title'], href_to('groups', $group['slug']));
if ($ctype['options']['list_on']){
$this->addBreadcrumb((empty($ctype['labels']['profile']) ? $ctype['title'] : $ctype['labels']['profile']), href_to('groups', $group['slug'], array('content', $ctype['name'])));
}
} else {
if ($ctype['options']['list_on'] && !$parent){
$this->addBreadcrumb($ctype['title'], href_to($ctype['name']));
}
}
$this->addBreadcrumb($page_title);
if(!empty($show_save_button) || !isset($show_save_button)){
$this->addToolButton(array(
'class' => 'save',
'icon' => 'save',
'title' => $button_save_text,
'href' => "javascript:icms.forms.submit()"
));
}
if(!$hide_draft_btn){
$this->addToolButton(array(
'class' => 'save_draft',
'icon' => 'bookmark',
'title' => $button_draft_text,
'href' => "javascript:icms.forms.submit('.button.to_draft')"
));
}
if ($cancel_url){
$this->addToolButton(array(
'class' => 'cancel',
'icon' => 'window-close',
'title' => LANG_CANCEL,
'href' => $cancel_url
));
}
?>
<h1><?php echo html($page_title) ?></h1>
<?php if ($is_premoderation && !$is_moderator) { ?>
<div class="alert alert-info content_moderation_notice" role="alert">
<?php echo LANG_MODERATION_NOTICE; ?>
</div>
<?php } ?>
<?php
$this->renderForm($form, $item, array(
'action' => '',
'submit' => array('title' => $button_save_text, 'show' => (isset($show_save_button) ? $show_save_button : true)),
'cancel' => array('show' => (bool)$cancel_url, 'href' => $cancel_url),
'buttons' => $hide_draft_btn ? [] : array(
array(
'title' => $button_draft_text,
'name' => 'to_draft',
'attributes' => array(
'type' => 'submit',
'class' => 'to_draft'
)
)
),
'method' => 'post',
'toolbar' => false,
'hook' => array(
'event' => "content_{$ctype['name']}_form_html",
'param' => array(
'do' => $do,
'id' => $do=='edit' ? $item['id'] : null
)
),
), $errors);
?>
<?php ob_start(); ?>
<script>
$(function(){
icms.content.initMultiCats();
<?php if ($props){ ?>
icms.content.initProps('<?php echo href_to($ctype['name'], 'props'); ?>'<?php if($do=='edit'){ ?>, <?php echo $item['id']; ?><?php } ?>);
<?php if ($is_load_props){ ?>
icms.content.loadProps();
<?php } ?>
<?php } ?>
});
</script>
<?php $this->addBottom(ob_get_clean()); ?>