improved concernement admin form

This commit is contained in:
Bachir Soussi Chiadmi 2023-05-22 11:35:55 +02:00
parent 180436dfce
commit a6bb304bff
9 changed files with 76 additions and 16 deletions

View File

@ -121,7 +121,7 @@ third_party_settings:
group_sources: group_sources:
children: children:
- field_sources - field_sources
label: Sources label: 'Expériences vécues'
region: content region: content
parent_name: group_tabs parent_name: group_tabs
weight: 15 weight: 15

View File

@ -6,7 +6,12 @@ dependencies:
- field.storage.node.body - field.storage.node.body
- node.type.besoin - node.type.besoin
module: module:
- allowed_formats
- text - text
third_party_settings:
allowed_formats:
allowed_formats:
- linkonly
id: node.besoin.body id: node.besoin.body
field_name: body field_name: body
entity_type: node entity_type: node

View File

@ -12,7 +12,7 @@ id: node.entite.field_sources
field_name: field_sources field_name: field_sources
entity_type: node entity_type: node
bundle: entite bundle: entite
label: Sources label: 'Experiences vécues'
description: 'Comment avez-vous eu connaissance de cette menace / ce maintient ?' description: 'Comment avez-vous eu connaissance de cette menace / ce maintient ?'
required: false required: false
translatable: false translatable: false
@ -25,12 +25,15 @@ settings:
source: source source: source
negate: 0 negate: 0
target_bundles_drag_drop: target_bundles_drag_drop:
action: doleance:
weight: 4 weight: 5
enabled: false enabled: false
entite_concernement: entite_concernement:
weight: 5 weight: 5
enabled: false enabled: false
etape:
weight: 7
enabled: false
source: source:
weight: 6 weight: 6
enabled: true enabled: true

View File

@ -3,7 +3,7 @@ langcode: fr
status: true status: true
dependencies: { } dependencies: { }
id: source id: source
label: source label: 'Expérience vécue'
icon_uuid: null icon_uuid: null
icon_default: null icon_default: null
description: 'action''s source' description: 'action''s source'

View File

@ -206,6 +206,9 @@ div[data-drupal-selector=edit-actions] > * {
#node-concernement-edit-form .ief-entity-operations input[type=submit].ief-submit-remove { #node-concernement-edit-form .ief-entity-operations input[type=submit].ief-submit-remove {
display: none; display: none;
} }
#node-concernement-edit-form .field--name-field-date > * {
display: inline-block;
}
#boussole-layout { #boussole-layout {
display: flex; display: flex;

View File

@ -1 +1 @@
{"version":3,"sourceRoot":"","sources":["../scss/ouatminimal.scss"],"names":[],"mappings":"AAAA;AACA;EACE;EACA;;;AAEF;AAAA;EAEE;;;AAEF;EACE;;;AAGF;EACE;EACA;;;AAGF;AAKI;EACE;;;AAKN;EACE;EACA;;AACA;EACE;EACA;;;AAIJ;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;AACE;EACA;EACA;;;AAEF;AAAA;EAEE;EACA;;;AAEF;AAAA;EAEE;EACA;;;AAGF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAGF;AAAA;AAAA;AAIA;AACA;EACE;;;AAGF;AACA;EAIE;IACE;IACA;IACA;;EAGF;IACE;IACA;;EAGF;AACE;IACA;IACA;IAEA;AACA;IACA;;EAGF;IACE;IACA;IACA;;EAGF;AACE;IACA;IACA;AACA;IACA;;EAGF;IACE;;AAGF;EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;IASE;IACA;IACA;;;AAIJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA;EAEE;IACE;;EAEF;AAAA;AAAA;IAGE;IACA;IACA;;;AAKJ;AAEE;EACE;EACA;EACA;EAAU;EACV;AAeA;AAAA;AAAA;;AAbA;EACE;;AAEF;EACE;EACA;EACA;;AAEF;AAAA;EAEE;EACA;;AAQJ;AACE;EACA;;AAEF;EACE;;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;EAGE;;AAEF;AAAA;AAAA;AAAA;AAAA;AAAA;EAGE;;AAKJ;EACE;;;AAOJ;EACE;EACA;EACA;;AAEA;EACE;;AAKF;EACE;EACA;EACA;;AAGE;EACE;EACA;EACA;;AAIF;EACE;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;;AAKR;EACE;EACA;EACA;;AAEA;EACE;;AAIA;EACE;;AAEF;EACE;;AAWN;EACE;EACA;;AAKA;AAAA;EACE;;AAGF;AAAA;EACE;;AACA;AAAA;EACE;;AAMN;EACE;;AAeJ;EACE;EACA;AAEA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;AACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EAAY;EACZ;EACA;EACA;EACA;;AAEA;EACE;;AAEF;EACE;EACA;;AAEF;EACE;;AAGF;EACE;;;AAYV;AAAA;AAAA;EAGE;;;AAGF;AAAA;EAEE;;;AAMF;EACE;EACA;EACA;;AACA;EACE;;AAEF;EACE","file":"ouatminimal.css"} {"version":3,"sourceRoot":"","sources":["../scss/ouatminimal.scss"],"names":[],"mappings":"AAAA;AACA;EACE;EACA;;;AAEF;AAAA;EAEE;;;AAEF;EACE;;;AAGF;EACE;EACA;;;AAGF;AAKI;EACE;;;AAKN;EACE;EACA;;AACA;EACE;EACA;;;AAIJ;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;AACE;EACA;EACA;;;AAEF;AAAA;EAEE;EACA;;;AAEF;AAAA;EAEE;EACA;;;AAGF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAGF;AAAA;AAAA;AAIA;AACA;EACE;;;AAGF;AACA;EAIE;IACE;IACA;IACA;;EAGF;IACE;IACA;;EAGF;AACE;IACA;IACA;IAEA;AACA;IACA;;EAGF;IACE;IACA;IACA;;EAGF;AACE;IACA;IACA;AACA;IACA;;EAGF;IACE;;AAGF;EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;IASE;IACA;IACA;;;AAIJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA;EAEE;IACE;;EAEF;AAAA;AAAA;IAGE;IACA;IACA;;;AAKJ;AAEE;EACE;EACA;EACA;EAAU;EACV;AAeA;AAAA;AAAA;;AAbA;EACE;;AAEF;EACE;EACA;EACA;;AAEF;AAAA;EAEE;EACA;;AAQJ;AACE;EACA;;AAEF;EACE;;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;EAGE;;AAEF;AAAA;AAAA;AAAA;AAAA;AAAA;EAGE;;AAKJ;EACE;;AAIA;EACE;;;AAQN;EACE;EACA;EACA;;AAEA;EACE;;AAKF;EACE;EACA;EACA;;AAGE;EACE;EACA;EACA;;AAIF;EACE;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;;AAKR;EACE;EACA;EACA;;AAEA;EACE;;AAIA;EACE;;AAEF;EACE;;AAWN;EACE;EACA;;AAKA;AAAA;EACE;;AAGF;AAAA;EACE;;AACA;AAAA;EACE;;AAMN;EACE;;AAeJ;EACE;EACA;AAEA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;AACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EAAY;EACZ;EACA;EACA;EACA;;AAEA;EACE;;AAEF;EACE;EACA;;AAEF;EACE;;AAGF;EACE;;;AAYV;AAAA;AAAA;EAGE;;;AAGF;AAAA;EAEE;;;AAMF;EACE;EACA;EACA;;AACA;EACE;;AAEF;EACE","file":"ouatminimal.css"}

View File

@ -157,17 +157,16 @@ function ouatminimal_preprocess_input(&$variables) {
if (preg_match('/^ief-field_entite-\d+-subform-field_entite-form-add$/', $name)) { if (preg_match('/^ief-field_entite-\d+-subform-field_entite-form-add$/', $name)) {
$element['#value'] = $element['#attributes']['value'] = $variables['attributes']['value'] = "Editer l'entité"; $element['#value'] = $element['#attributes']['value'] = $variables['attributes']['value'] = "Editer l'entité";
} }
// // rename entité reference in paragraphe "Ajouter un node existant" to "ajouyer entite existante"
// // "ief-field_entite-0-subform-field_entite-form-add"
// if (preg_match('/^ief-field_entite-\d+-subform-field_entite-form-add-existing$/', $name)) {
// $element['#value'] = $element['#attributes']['value'] = $variables['attributes']['value'] = "Ajouter une entité éxistante";
// }
// // rename entité reference in paragraphe "Ajout de node" to "Ajouter" // ief-add-submit-field_entite-15-subform-field_entite-form
// // "ief-reference-submit-field_entite-7-subform-field_entite-form" if (preg_match('/^ief-add-submit-field_entite-\d+-subform-field_entite-form$/', $name)) {
// if (preg_match('/^ief-reference-submit-field_entite-\d+-subform-field_entite-form$/', $name)) { $element['#value'] = $element['#attributes']['value'] = $variables['attributes']['value'] = "Créer l'entité";
// $element['#value'] = $element['#attributes']['value'] = $variables['attributes']['value'] = "Ajouter"; }
// }
// ief-edit-submit-field_entite-14-subform-field_entite-form-0
if (preg_match('/^ief-edit-submit-field_entite-\d+-subform-field_entite-form-\d+$/', $name)) {
$element['#value'] = $element['#attributes']['value'] = $variables['attributes']['value'] = "Enregistrer l'entité";
}
// rename remove (paragraphe) to "supprimer" // rename remove (paragraphe) to "supprimer"
if (preg_match('/field_entite_\d+_remove/', $name)) { if (preg_match('/field_entite_\d+_remove/', $name)) {

View File

@ -222,6 +222,12 @@ div[data-drupal-selector="edit-actions"]{
.ief-entity-operations input[type="submit"].ief-submit-remove{ .ief-entity-operations input[type="submit"].ief-submit-remove{
display: none; display: none;
} }
.field--name-field-date{
>*{
display: inline-block;
}
}
} }

View File

@ -0,0 +1,44 @@
{#
/**
* @file
* Default theme implementation for an individual form element.
*
* Available variables for all fields:
* - multiple: Whether there are multiple instances of the field.
*
* Available variables for single cardinality fields:
* - elements: Form elements to be rendered.
*
* Available variables when there are multiple fields.
* - table: Table of field items.
* - description: The description element containing the following properties:
* - content: The description content of the form element.
* - attributes: HTML attributes to apply to the description container.
* - button: "Add another item" button.
*
* @see template_preprocess_field_multiple_value_form()
*
* @ingroup themeable
*/
#}
{% if multiple %}
{%
set classes = [
'js-form-item',
'form-item'
]
%}
<div{{ attributes.addClass(classes) }}>
{% if description.content %}
<div{{ description.attributes.addClass('description') }} >{{ description.content }}</div>
{% endif %}
{{ table }}
{% if button %}
<div class="clearfix">{{ button }}</div>
{% endif %}
</div>
{% else %}
{% for element in elements %}
{{ element }}
{% endfor %}
{% endif %}