From c9be7941e92f7d63ba65faffdb77f46be9a7553a Mon Sep 17 00:00:00 2001 From: Djamil Legato Date: Tue, 20 Apr 2021 23:42:58 -0700 Subject: [PATCH] More changes to the copy modal --- blueprints/admin/pages/copy.yaml | 30 ++++--------------- .../partials/blueprints-copy.html.twig | 2 +- 2 files changed, 6 insertions(+), 26 deletions(-) diff --git a/blueprints/admin/pages/copy.yaml b/blueprints/admin/pages/copy.yaml index 3bac0b18..ca54dd57 100644 --- a/blueprints/admin/pages/copy.yaml +++ b/blueprints/admin/pages/copy.yaml @@ -27,37 +27,17 @@ form: rule: slug required: true - route: - type: parents - label: PLUGIN_ADMIN.PARENT_PAGE - classes: fancy - validate: - required: true - - - name: - type: select - classes: fancy - label: PLUGIN_ADMIN.PAGE_FILE - help: PLUGIN_ADMIN.PAGE_FILE_HELP - data-options@: '\Grav\Plugin\AdminPlugin::pagesTypes' - data-default@: '\Grav\Plugin\Admin\Admin::getLastPageName' - validate: - required: true - - visible: + published: type: toggle - label: PLUGIN_ADMIN.VISIBLE - help: PLUGIN_ADMIN.VISIBLE_HELP - highlight: '' - default: '' + label: PLUGIN_ADMIN.PUBLISHED + help: PLUGIN_ADMIN.PUBLISHED_HELP + highlight: 1 + size: medium options: - '': Auto 1: PLUGIN_ADMIN.YES 0: PLUGIN_ADMIN.NO validate: type: bool - required: true blueprint: type: blueprint diff --git a/themes/grav/templates/partials/blueprints-copy.html.twig b/themes/grav/templates/partials/blueprints-copy.html.twig index d35ef729..40de6dd6 100644 --- a/themes/grav/templates/partials/blueprints-copy.html.twig +++ b/themes/grav/templates/partials/blueprints-copy.html.twig @@ -4,7 +4,7 @@
{% for field in blueprints.fields %} {% if field.type %} - {% set value = field.name ? (form.value(field.name) ?? data.value(field.name)) : data.toArray %} + {% set value = field.name ? (data.value(field.name) ?? form.value(field.name)) : data.toArray %}
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}