More changes to the copy modal

This commit is contained in:
Djamil Legato
2021-04-20 23:42:58 -07:00
parent cf5974b4d4
commit c9be7941e9
2 changed files with 6 additions and 26 deletions

View File

@@ -27,37 +27,17 @@ form:
rule: slug rule: slug
required: true required: true
route: published:
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:
type: toggle type: toggle
label: PLUGIN_ADMIN.VISIBLE label: PLUGIN_ADMIN.PUBLISHED
help: PLUGIN_ADMIN.VISIBLE_HELP help: PLUGIN_ADMIN.PUBLISHED_HELP
highlight: '' highlight: 1
default: '' size: medium
options: options:
'': Auto
1: PLUGIN_ADMIN.YES 1: PLUGIN_ADMIN.YES
0: PLUGIN_ADMIN.NO 0: PLUGIN_ADMIN.NO
validate: validate:
type: bool type: bool
required: true
blueprint: blueprint:
type: blueprint type: blueprint

View File

@@ -4,7 +4,7 @@
<form {% if form_action %}action="{{ form_action }}"{% endif %} id="{{ form_id }}" method="post" data-grav-form="{{ form_id }}" {% if form.novalidate %}novalidate{% endif %} data-grav-keepalive="true"> <form {% if form_action %}action="{{ form_action }}"{% endif %} id="{{ form_id }}" method="post" data-grav-form="{{ form_id }}" {% if form.novalidate %}novalidate{% endif %} data-grav-keepalive="true">
{% for field in blueprints.fields %} {% for field in blueprints.fields %}
{% if field.type %} {% 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 %}
<div class="block block-{{field.type}}"> <div class="block block-{{field.type}}">
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %} {% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
</div> </div>