reha_mod.module 827 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * @file
  4. * Primary module hooks for reha module.
  5. */
  6. function reha_mod_form_user_register_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
  7. $form['actions']['submit']['#value'] = "valider";
  8. }
  9. function reha_mod_form_user_login_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
  10. $form['persistent_login']['#title'] = "rester connecté";
  11. }
  12. function reha_mod_form_node_operation_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
  13. $route = \Drupal::routeMatch();
  14. $params = $route->getParameters();
  15. /** @var Drupal\node\Entity\NodeType **/
  16. $node_type = $route->getParameter('node_type');
  17. $type = $node_type->id();
  18. if($type === 'operation'){
  19. $form['field_adresse']['widget'][0]['#type'] = 'container';
  20. }
  21. }