Skip to content

Commit

Permalink
More template path tightening
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Feb 21, 2023
1 parent 25243e0 commit 3a5ca05
Show file tree
Hide file tree
Showing 20 changed files with 36 additions and 36 deletions.
8 changes: 4 additions & 4 deletions src/templates/_components/fieldtypes/Assets/settings.twig
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{% extends "_components/fieldtypes/elementfieldsettings" %}
{% import "_includes/forms" as forms %}
{% extends '_components/fieldtypes/elementfieldsettings.twig' %}
{% import '_includes/forms.twig' as forms %}

{% macro uploadLocationField(config) %}
{% embed '_includes/forms/field' with config %}
{% embed '_includes/forms/field.twig' with config %}
{% block input %}
{% import '_includes/forms' as forms %}
{% import '_includes/forms.twig' as forms %}
<div class="flex flex-nowrap">
<div>
{{ forms.select({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% import "_includes/forms" as forms %}
{% import '_includes/forms.twig' as forms %}

{% set sourceOptions = field.getSourceOptions() %}
{% set elementType = elementType ?? pluralElementType %}
Expand Down
2 changes: 1 addition & 1 deletion src/templates/_components/utilities/AssetIndexes.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% import "_includes/forms" as forms %}
{% import '_includes/forms.twig' as forms %}

<form id="asset-indexes" class="utility" method="post" accept-charset="UTF-8">

Expand Down
2 changes: 1 addition & 1 deletion src/templates/_includes/revisionmenu.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Only an existing element should be passed to this.
#}

{% import "_includes/forms" as forms %}
{% import '_includes/forms.twig' as forms %}

{% set showDrafts = showDrafts ?? false %}
{% set drafts = element.id and showDrafts ? element.find()
Expand Down
2 changes: 1 addition & 1 deletion src/templates/_layouts/cp.twig
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
└────────────────────────────────────────────────────────────────────────────────────┘
#}

{% extends "_layouts/basecp" %}
{% extends '_layouts/basecp.twig' %}

{# The control panel only supports queue components that implement QueueInterface #}
{% set queue = craft.app.queue %}
Expand Down
2 changes: 1 addition & 1 deletion src/templates/_layouts/elementindex.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "_layouts/cp" %}
{% extends '_layouts/cp.twig' %}

{% set elementInstance = craft.app.elements.createElement(elementType) %}
{% set title = title ?? elementInstance.pluralDisplayName() %}
Expand Down
2 changes: 1 addition & 1 deletion src/templates/assets/index.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "_layouts/elementindex" %}
{% extends '_layouts/elementindex.twig' %}
{% set title = "Assets"|t('app') %}
{% set elementType = 'craft\\elements\\Asset' %}

Expand Down
4 changes: 2 additions & 2 deletions src/templates/login.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "_layouts/basecp" %}
{% import "_includes/forms" as forms %}
{% extends '_layouts/basecp.twig' %}
{% import '_includes/forms.twig' as forms %}
{% set title = "Sign In"|t('app') %}
{% set bodyClass = 'login' %}
{% do view.registerAssetBundle("craft\\web\\assets\\login\\LoginAsset") %}
Expand Down
8 changes: 4 additions & 4 deletions src/templates/settings/assets/transforms/_settings.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "_layouts/cp" %}
{% extends '_layouts/cp.twig' %}

{% import "_includes/forms" as forms %}
{% import '_includes/forms.twig' as forms %}

{% set crumbs = [
{ label: "Settings"|t('app'), url: url('settings') },
Expand Down Expand Up @@ -101,12 +101,12 @@
errors: (transform is defined ? transform.getErrors('height') : null),
}) }}

{% embed '_includes/forms/field' with {
{% embed '_includes/forms/field.twig' with {
label: 'Quality'|t('app'),
errors: (transform is defined ? transform.getErrors('quality') : null),
} %}
{% block input %}
{% import '_includes/forms' as forms %}
{% import '_includes/forms.twig' as forms %}
<div class="flex flex-nowrap">
<div>
{{ forms.select({
Expand Down
2 changes: 1 addition & 1 deletion src/templates/settings/assets/volumes/_edit.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% import "_includes/forms" as forms %}
{% import '_includes/forms.twig' as forms %}


{% if not isNewVolume %}{{ hiddenInput('volumeId', volume.id) }}{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions src/templates/settings/categories/_edit.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% extends "_layouts/cp" %}
{% extends '_layouts/cp.twig' %}

{% set fullPageForm = true %}

{% import "_includes/forms" as forms %}
{% import '_includes/forms.twig' as forms %}

{% set headlessMode = craft.app.config.general.headlessMode %}

Expand Down
4 changes: 2 additions & 2 deletions src/templates/settings/email/_index.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% requireAdmin %}

{% extends "_layouts/cp" %}
{% extends '_layouts/cp.twig' %}

{% set crumbs = [
{ label: "Settings"|t('app'), url: url('settings') }
Expand All @@ -9,7 +9,7 @@
{% set fullPageForm = true %}
{% set title = "Email Settings"|t('app') %}

{% import "_includes/forms" as forms %}
{% import '_includes/forms.twig' as forms %}

{% do view.registerTranslations('app', [
"Email sent successfully! Check your inbox.",
Expand Down
4 changes: 2 additions & 2 deletions src/templates/settings/fields/_edit.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "_layouts/cp" %}
{% extends '_layouts/cp.twig' %}
{% set fullPageForm = true %}
{% set formActions = [
{
Expand All @@ -18,7 +18,7 @@
},
]|filter %}

{% import "_includes/forms" as forms %}
{% import '_includes/forms.twig' as forms %}

{% block content %}
{{ actionInput('fields/save-field') }}
Expand Down
2 changes: 1 addition & 1 deletion src/templates/settings/filesystems/_edit.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% import "_includes/forms" as forms %}
{% import '_includes/forms.twig' as forms %}

{% if oldHandle %}{{ hiddenInput('oldHandle', oldHandle) }}{% endif %}

Expand Down
4 changes: 2 additions & 2 deletions src/templates/settings/globals/_edit.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "_layouts/cp" %}
{% extends '_layouts/cp.twig' %}
{% set fullPageForm = true %}

{% import "_includes/forms" as forms %}
{% import '_includes/forms.twig' as forms %}


{% block content %}
Expand Down
4 changes: 2 additions & 2 deletions src/templates/settings/sections/_edit.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'settings/sections/_layout' %}
{% extends 'settings/sections/_layout.twig' %}
{% set selectedTab = 'settings' %}
{% set fullPageForm = true %}
{% set formActions = [
Expand All @@ -10,7 +10,7 @@
},
] %}

{% import "_includes/forms" as forms %}
{% import '_includes/forms.twig' as forms %}

{% set headlessMode = craft.app.config.general.headlessMode %}

Expand Down
4 changes: 2 additions & 2 deletions src/templates/settings/sites/_edit.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% extends "_layouts/cp" %}
{% extends '_layouts/cp.twig' %}

{% set fullPageForm = true %}

{% import "_includes/forms" as forms %}
{% import '_includes/forms.twig' as forms %}


{% block content %}
Expand Down
4 changes: 2 additions & 2 deletions src/templates/settings/tags/_edit.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% extends "_layouts/cp" %}
{% extends '_layouts/cp.twig' %}

{% set fullPageForm = true %}

{% import "_includes/forms" as forms %}
{% import '_includes/forms.twig' as forms %}

{% block content %}
{{ actionInput('tags/save-tag-group') }}
Expand Down
2 changes: 1 addition & 1 deletion src/templates/users/_accountfields.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% import "_includes/forms" as forms %}
{% import '_includes/forms.twig' as forms %}
{% set static = static ?? false %}

{% if not craft.app.config.general.useEmailAsUsername %}
Expand Down
6 changes: 3 additions & 3 deletions src/templates/users/_edit.twig
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{% extends "_layouts/cp" %}
{% extends '_layouts/cp.twig' %}

{% if CraftEdition == CraftPro and currentUser.can('editUsers') %}
{% set crumbs = [
{ label: "Users"|t('app'), url: url('users') },
] %}
{% endif %}

{% import "_includes/forms" as forms %}
{% import '_includes/forms.twig' as forms %}

{% do view.registerAssetBundle("craft\\web\\assets\\fileupload\\FileUploadAsset") %}
{% do view.setIsDeltaRegistrationActive(true) %}
Expand Down Expand Up @@ -158,7 +158,7 @@
{% do view.registerDeltaName('groups') %}
{% set assignableGroups = craft.app.userGroups.getAssignableGroups(user) %}

{% embed '_includes/forms/field' with {
{% embed '_includes/forms/field.twig' with {
fieldId: 'user-groups',
} %}
{% block input %}
Expand Down

0 comments on commit 3a5ca05

Please sign in to comment.