26 lines
827 B
PHP
26 lines
827 B
PHP
<?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';
|
|
}
|
|
} |