Commit 6e6d46f7 authored by Tino Goratsch's avatar Tino Goratsch

first part at making the seo fields not mandatory anymore

parent 1d4989cc
......@@ -5,7 +5,6 @@
<ul class="nav nav-tabs">
<li class="active"><a href="#tab-1" data-toggle="tab">{lang t="system|publication_period"}</a></li>
<li><a href="#tab-2" data-toggle="tab">{lang t="articles|page_statements"}</a></li>
<li><a href="#tab-3" data-toggle="tab">{lang t="seo|seo"}</a></li>
</ul>
<div class="tab-content">
<div id="tab-1" class="tab-pane fade in active">
......@@ -19,9 +18,7 @@
{include file="asset:Menus/Partials/create_menu_item.tpl"}
{/if}
</div>
<div id="tab-3" class="tab-pane fade">
{include file="asset:Seo/Partials/seo_fields.tpl" seo=$SEO_FORM_FIELDS}
</div>
{include file="asset:Seo/Partials/tab_seo_fields.tpl" seo=$SEO_FORM_FIELDS}
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/articles"}}
......
......@@ -7,7 +7,6 @@
<ul class="nav nav-tabs">
<li class="active"><a href="#tab-1" data-toggle="tab">{lang t="system|publication_period"}</a></li>
<li><a href="#tab-2" data-toggle="tab">{lang t="files|file_statements"}</a></li>
<li><a href="#tab-3" data-toggle="tab">{lang t="seo|seo"}</a></li>
</ul>
<div class="tab-content">
<div id="tab-1" class="tab-pane fade in active">
......@@ -55,9 +54,7 @@
{include file="asset:System/Partials/form_group.checkbox.tpl" options=$options label={lang t="system|options"}}
{/if}
</div>
<div id="tab-3" class="tab-pane fade">
{include file="asset:Seo/Partials/seo_fields.tpl" seo=$SEO_FORM_FIELDS}
</div>
{include file="asset:Seo/Partials/tab_seo_fields.tpl" seo=$SEO_FORM_FIELDS}
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/files"}}
......
......@@ -4,16 +4,13 @@
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab-1" data-toggle="tab">{lang t="system|general_statements"}</a></li>
<li><a href="#tab-2" data-toggle="tab">{lang t="seo|seo"}</a></li>
</ul>
<div class="tab-content">
<div id="tab-1" class="tab-pane fade in active">
{datepicker name=['start', 'end'] value=[$form.start, $form.end]}
{include file="asset:System/Partials/form_group.input_text.tpl" name="title" value=$form.title required=true maxlength=120 data_attributes=['seo-slug-base' => 'true'] label={lang t="gallery|title"}}
</div>
<div id="tab-2" class="tab-pane fade">
{include file="asset:Seo/Partials/seo_fields.tpl" seo=$SEO_FORM_FIELDS}
</div>
{include file="asset:Seo/Partials/tab_seo_fields.tpl" seo=$SEO_FORM_FIELDS}
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/gallery"}}
......
......@@ -6,7 +6,6 @@
<li class="active"><a href="#tab-1" data-toggle="tab">{lang t="system|publication_period"}</a></li>
<li><a href="#tab-2" data-toggle="tab">{lang t="news|news"}</a></li>
<li><a href="#tab-3" data-toggle="tab">{lang t="news|hyperlink"}</a></li>
<li><a href="#tab-4" data-toggle="tab">{lang t="seo|seo"}</a></li>
</ul>
<div class="tab-content">
<div id="tab-1" class="tab-pane fade in active">
......@@ -31,9 +30,7 @@
{include file="asset:System/Partials/form_group.input_url.tpl" name="uri" value=$form.uri maxlength=120 label={lang t="news|uri"}}
{include file="asset:System/Partials/form_group.select.tpl" options=$target label={lang t="news|target_page"}}
</div>
<div id="tab-4" class="tab-pane fade">
{include file="asset:Seo/Partials/seo_fields.tpl" seo=$SEO_FORM_FIELDS}
</div>
{include file="asset:Seo/Partials/tab_seo_fields.tpl" seo=$SEO_FORM_FIELDS}
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/news"}}
......
jQuery(document).ready(function() {
$('[data-add-tab-identifier]').each(function() {
var tabIdentifier = $(this).data('add-tab-identifier'),
$element = $(tabIdentifier),
$tabContent = $element.closest('.tab-content'),
$tabs = $tabContent.prev('.nav-tabs'),
tabTitle = $(this).data('add-tab-title'),
newTabItem = '<li><a href="' + tabIdentifier + '" data-toggle="tab">' + tabTitle + '</a></li>';
$tabs.append(newTabItem);
});
});
<div id="tab-seo" class="tab-pane fade" data-add-tab-title="{lang t="seo|seo"}" data-add-tab-identifier="#tab-seo">
{include file="asset:Seo/Partials/seo_fields.tpl" seo=$seo}
</div>
{javascripts}
{include_js module="seo" file="add_seo_tab"}
{/javascripts}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment