You are here

function _rooms_booking_manager_display_book_button in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Add "place booking" button to form.

Parameters

$form:

$type:

$price:

Return value

mixed

1 call to _rooms_booking_manager_display_book_button()
book_units_per_type_form in modules/rooms_booking_manager/rooms_booking_manager.module
Book units per type booking form callback.

File

modules/rooms_booking_manager/rooms_booking_manager.units_per_type_form.inc, line 197
Helper functions to clear up the units per type form and make the logic easier to follow.

Code

function _rooms_booking_manager_display_book_button($form, $type, $price) {

  // Show button 'Place Booking' only on the first row.
  $form[$type][$price]['submit'] = array(
    '#prefix' => '<td class="rooms-search-result__booking-legend"><div class="booking-legend booking-legend--rooms-search-result">',
    '#type' => 'submit',
    '#value' => variable_get_value('rooms_booking_manager_button_place_booking'),
    '#submit' => array(
      'book_units_per_type_form_submit',
    ),
    '#suffix' => '</div></td></tr>',
  );
  return $form;
}