adresse field details

This commit is contained in:
2023-11-28 15:55:45 +01:00
parent 9cc2c5922d
commit 533895fd6f
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
/web/sites/*/settings.local.php
/web/sites/*/services*.yml
/web/sites/*/salt.txt
/web/sites/development.services.yml
/web/sites/*/development.services.yml
# Ignore Drupal's file directory
/web/sites/*/files/
+11
View File
@@ -12,4 +12,15 @@ function reha_mod_form_user_register_form_alter(&$form, \Drupal\Core\Form\FormSt
function reha_mod_form_user_login_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
$form['persistent_login']['#title'] = "rester connecté";
}
function reha_mod_form_node_operation_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
$route = \Drupal::routeMatch();
$params = $route->getParameters();
/** @var Drupal\node\Entity\NodeType **/
$node_type = $route->getParameter('node_type');
$type = $node_type->id();
if($type === 'operation'){
$form['field_adresse']['widget'][0]['#type'] = 'container';
}
}