Make compatible with Drupal 9+
This commit is contained in:
1 parent
6bbb40d61d
commit
b6799a5ba5
3 files changed
+47
-75
No files matched your search
+15
-26
@@ -1,31 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Module file for reservations.
|
||||
*/
|
||||
//function reservations_theme() {
|
||||
// return array(
|
||||
// 'reservations' => array(
|
||||
// 'template' => 'reservations.reservation_add',
|
||||
// 'variables' => array('title' => NULL),
|
||||
// ),
|
||||
// );
|
||||
//}
|
||||
/**
|
||||
* @file
|
||||
* Module file for reservations.
|
||||
*/
|
||||
|
||||
/* Implements hook_form_FORM_ID_alter() */
|
||||
function reservations_form_node_courts_form_alter(&$form, &$form_state, $form_id) {
|
||||
$form['#after_build'][] = 'reservations_add_css_in_admin_part';
|
||||
}
|
||||
function reservations_form_node_courts_edit_form_alter(&$form, &$form_state, $form_id) {
|
||||
$form['#after_build'][] = 'reservations_add_css_in_admin_part';
|
||||
}
|
||||
/* Implements hook_form_FORM_ID_alter() */
|
||||
function reservations_form_node_courts_form_alter(&$form, &$form_state, $form_id) {
|
||||
$form['#after_build'][] = 'reservations_add_css_in_admin_part';
|
||||
}
|
||||
function reservations_form_node_courts_edit_form_alter(&$form, &$form_state, $form_id) {
|
||||
$form['#after_build'][] = 'reservations_add_css_in_admin_part';
|
||||
}
|
||||
|
||||
function reservations_add_css_in_admin_part($form, &$form_state) {
|
||||
// $style_path = drupal_get_path('module','reservations') . '/css/reservations.css';
|
||||
// dpm($form);
|
||||
// drupal_add_css('file', $style_path);
|
||||
$form['#attached']['library'][] = 'reservations/reservation_admin';
|
||||
return $form;
|
||||
}
|
||||
function reservations_add_css_in_admin_part($form, &$form_state) {
|
||||
$form['#attached']['library'][] = 'reservations/reservation_admin';
|
||||
return $form;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user