Merge branch 'master' of https://figureslibres.io/gogs/bachir/drupal-reha
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
name: reha_mod
|
||||
type: module
|
||||
description: Provides additional functionality for the site.
|
||||
package: Custom
|
||||
core_version_requirement: ^9 || ^10
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Primary module hooks for reha module.
|
||||
*/
|
||||
|
||||
|
||||
function reha_mod_form_user_register_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
|
||||
$form['actions']['submit']['#value'] = "valider";
|
||||
}
|
||||
|
||||
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';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user