Skip to content

Commit

Permalink
Remove twitter tab from field settings
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenckens committed Feb 25, 2024
1 parent 05c7d07 commit 90a4530
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 92 deletions.
7 changes: 2 additions & 5 deletions src/templates/_components/fields/SeoField_input.twig
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@
{% endif %}
{% if field.tabs.facebook %}
{% set tabSelected = false %}
{% include 'seo-fields/_components/fields/_tabs/_facebook.twig' with { tabSelected : tabSelected} %}
{% endif %}
{% if field.tabs.twitter %}
{% set tabSelected = false %}
{% include 'seo-fields/_components/fields/_tabs/_twitter.twig' with { tabSelected : tabSelected} %}
{% include 'seo-fields/_components/fields/_tabs/_social.twig' with { tabSelected : tabSelected} %}
{% endif %}

{% if (field.tabs.advanced is defined and field.tabs.advanced) %}
{% set tabSelected = false %}
{% include 'seo-fields/_components/fields/_tabs/_advanced.twig' with { tabSelected : tabSelected} %}
Expand Down
9 changes: 1 addition & 8 deletions src/templates/_components/fields/SeoField_settings.twig
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,12 @@
}) }}

{{ forms.lightswitchField({
label: "Show Facebook Tab"|t("seo-fields"),
label: "Show Social Media Tab"|t("seo-fields"),
id: "showFacebookTab",
name: "tabs[facebook]",
on: field.tabs|length ? field.tabs.facebook : 1,
}) }}

{{ forms.lightswitchField({
label: "Show Twitter Tab"|t("seo-fields"),
id: "showTwitterTab",
name: "tabs[twitter]",
on: field.tabs|length ? field.tabs.twitter : 1,
}) }}

{{ forms.lightswitchField({
label: "Show advanced tab"|t("seo-fields"),
id: "showAdvancedTab",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% import "_includes/forms" as forms %}

<input type="radio" name="tabs" id="facebook-tab" class="seofields-tab" {% if tabSelected %}checked="checked"{% endif %}>
<label for="facebook-tab" class="label">{{ "Facebook"|t("seo-fields") }}</label>
<label for="facebook-tab" class="label">{{ "Social Media"|t("seo-fields") }}</label>
<div class="seofields-tab-content">
<div class="fb-preview-container">
<div class="fb-preview">
Expand All @@ -25,7 +25,7 @@
</div>
<div class="seo-fields-facebook-text">
{{ forms.textField({
label: "Facebook OG title"|t("seo-fields"),
label: "Social Media title"|t("seo-fields"),
id: name ~ "-facebookTitle",
name: name ~ "[facebookTitle]",
value: value.facebookTitle,
Expand All @@ -34,7 +34,7 @@
<div class="field" id="{{ name ~ "-facebookDescription" }}-field">
<div class="heading">
<label id="{{ name ~ "[facebookDescription]" }}-label"
for="{{ name ~ "-facebookDescription" }}">{{ "Facebook OG description"|t("seo-fields") }}</label>
for="{{ name ~ "-facebookDescription" }}">{{ "Social Media description"|t("seo-fields") }}</label>
</div>
<div class="input ltr">
{{ forms.textArea({
Expand All @@ -53,7 +53,7 @@

{% if craft.app.volumes.getAllVolumes()|length %}
{{ forms.elementSelectField({
label: "Facebook OG image"|t('seo-fields'),
label: "Social Media image"|t('seo-fields'),
id: name ~ "-facebookImage",
name: name ~ "[facebookImage]",
elements: value.facebookImage|length ? craft.assets.id(value.facebookImage|first).all() : null,
Expand Down
75 changes: 0 additions & 75 deletions src/templates/_components/fields/_tabs/_twitter.twig

This file was deleted.

0 comments on commit 90a4530

Please sign in to comment.