'', 'db_saving_type' => 'separate', 'id' => 'set_gen', ); $id = empty( $id ) ? $options['id'] : $id; parent::__construct( $id, $options ); } /** * Init Capacity fields. * * @return void */ public function init_settings_fields() { $this->fields = array(); $default_options_values = wpbc_get_default_options(); if ( class_exists( 'wpdev_bk_biz_l' ) ) { $this->fields['booking_quantity_control'] = array( 'type' => 'checkbox', 'default' => $default_options_values['booking_quantity_control'], 'title' => __( 'Booking Quantity Control', 'booking' ), 'label' => __( 'Enable this option to allow visitors to define the number of items they can book for specific dates or times within a single reservation. ', 'booking' ), 'description' => __( 'If disabled, visitors can book only one slot within a single reservation.', 'booking' ), 'description_tag' => 'p', 'group' => 'capacity', ); $this->fields['booking_capacity_field'] = array( 'type' => 'select', 'default' => $default_options_values['booking_capacity_field'], 'title' => __( 'Quantity field name', 'booking' ), 'description' => sprintf( __( 'Select the field that will control how many slots visitors can book during the reservation process.', 'booking' ), '', '' ), 'description_tag' => 'span', 'css' => '', 'tr_class' => 'wpbc_booking_capacity_field_settings wpbc_sub_settings_grayed', 'options' => $this->get_quantity_field_options(), 'group' => 'capacity', ); $this->fields['booking_is_dissbale_booking_for_different_sub_resources'] = array( 'type' => 'checkbox', 'default' => $default_options_values['booking_is_dissbale_booking_for_different_sub_resources'], 'title' => __( 'Disable bookings in different booking resources', 'booking' ), 'label' => __( 'Check this box to disable reservations, which can be stored in different booking resources.', 'booking' ), 'description' => '' . esc_html__( 'Note', 'booking' ) . '! ' . esc_html__( 'When checked, all reserved days must be at same booking resource otherwise error message will show.', 'booking' ), 'group' => 'capacity', ); $this->fields['hr_calendar_before_is_use_visitors_number_for_availability'] = array( 'type' => 'hr', 'group' => 'capacity', ); } $this->fields['booking_is_days_always_available'] = array( 'type' => 'checkbox', 'default' => $default_options_values['booking_is_days_always_available'], 'title' => __( 'Allow unlimited bookings per same day(s)', 'booking' ), /* translators: 1: ... */ 'label' => sprintf( __( 'Check this box, if you want to %1$sset any days as available%2$s in calendar. Your visitors will be able to make %3$sunlimited bookings per same date(s) in calendar and do not see any booked date(s)%4$s of other visitors.', 'booking' ), '', '', '', '' ), 'description' => '', 'group' => 'capacity', ); if ( class_exists( 'wpdev_bk_biz_l' ) ) { $this->fields['booking_is_show_pending_days_as_available'] = array( 'type' => 'checkbox', 'default' => $default_options_values['booking_is_show_pending_days_as_available'], 'title' => __( 'Use pending days as available', 'booking' ), 'label' => __( 'Check this box if you want to show the pending days as available in calendars', 'booking' ), 'description' => '', 'group' => 'capacity', 'tr_class' => '', ); $this->fields['booking_auto_cancel_pending_bookings_for_approved_date'] = array( 'type' => 'checkbox', 'default' => $default_options_values['booking_auto_cancel_pending_bookings_for_approved_date'], 'title' => __( 'Auto-cancel bookings', 'booking' ), 'label' => __( 'Auto Cancel all pending bookings for the specific date(s), if some booking is approved for these date(s)', 'booking' ), 'description' => '', 'group' => 'capacity', 'tr_class' => 'wpbc_pending_days_as_available_sub_settings wpbc_sub_settings_grayed', ); } else { $this->fields['booking_is_show_pending_days_as_available'] = array( 'type' => 'checkbox', 'default' => $default_options_values['booking_is_show_pending_days_as_available'], 'title' => __( 'Use pending days as available', 'booking' ), 'label' => __( 'Check this box if you want to show the pending days as available in calendars', 'booking' ), 'description' => '', 'group' => 'capacity', 'tr_class' => '', ); } if ( ! class_exists( 'wpdev_bk_personal' ) ) { $this->fields['booking_quantity_control__promote_upgrade'] = array( 'type' => 'checkbox', 'default' => 'On', 'value' => 'On', 'title' => __( 'Booking Quantity Control', 'booking' ), 'label' => __( 'Enable this option to allow visitors to define the number of items they can book for specific dates or times within a single reservation. ', 'booking' ), 'description' => __( 'If disabled, visitors can book only one slot within a single reservation.', 'booking' ), 'description_tag' => 'p', 'group' => 'capacity_upgrade', 'tr_class' => 'wpbc_blur', ); $this->fields['booking_capacity_field__promote_upgrade'] = array( 'type' => 'select', 'default' => 'items', 'value' => 'items', 'title' => __( 'Quantity field name', 'booking' ), 'description' => sprintf( __( 'Select the field that will control how many slots visitors can book during the reservation process.', 'booking' ), '', '' ), 'description_tag' => 'span', 'css' => '', 'tr_class' => 'wpbc_booking_capacity_field_settings wpbc_sub_settings_grayed wpbc_blur', 'options' => array( 'items' => __( 'Items', 'booking' ) ), 'group' => 'capacity_upgrade', ); $this->fields['booking_is_dissbale_booking_for_different_sub_resources__promote_upgrade'] = array( 'type' => 'checkbox', 'default' => 'On', 'value' => 'On', 'title' => __( 'Disable bookings in different booking resources', 'booking' ), 'label' => __( 'Check this box to disable reservations, which can be stored in different booking resources.', 'booking' ), 'description' => '' . esc_html__( 'Note', 'booking' ) . '! ' . __( 'When checked, all reserved days must be at same booking resource otherwise error message will show.', 'booking' ), 'group' => 'capacity_upgrade', 'tr_class' => 'wpbc_blur', ); $this->fields['capacity_upgrade__promote_upgrade'] = array( 'type' => 'pure_html', 'group' => 'capacity_upgrade', 'html' => '