start_controls_section( 'content', array( 'label' => __( 'Delivery date & time', 'dayslot' ), ) ); $this->add_control( 'info', array( 'type' => \Elementor\Controls_Manager::RAW_HTML, 'raw' => esc_html__( 'Put this widget on your checkout page (inside or next to the Checkout widget). Options, prices and texts are in Delivery calendar → Settings.', 'dayslot' ), ) ); $this->end_controls_section(); $this->start_controls_section( 'style', array( 'label' => __( 'Colours and shape', 'dayslot' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ) ); $colors = array( 'primary' => array( __( 'Main colour', 'dayslot' ), '--dys-primary' ), 'on_primary' => array( __( 'Text on the main colour', 'dayslot' ), '--dys-on-primary' ), 'bg' => array( __( 'Background', 'dayslot' ), '--dys-bg' ), 'text' => array( __( 'Text', 'dayslot' ), '--dys-text' ), 'border' => array( __( 'Borders', 'dayslot' ), '--dys-border' ), 'busy' => array( __( 'Unavailable days', 'dayslot' ), '--dys-busy' ), 'fee' => array( __( 'Days with a higher price', 'dayslot' ), '--dys-fee' ), ); foreach ( $colors as $key => $info ) { $this->add_control( $this->control_prefix() . $key, array( 'label' => $info[0], 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .dys-picker' => $info[1] . ': {{VALUE}};' ), ) ); } $sizes = array( 'radius' => array( __( 'Rounded corners', 'dayslot' ), '--dys-radius', 40 ), 'radius_btn' => array( __( 'Buttons: delivery / pickup, kinds, times', 'dayslot' ), '--dys-radius-btn', 60 ), 'radius_day' => array( __( 'Calendar days', 'dayslot' ), '--dys-radius-day', 60 ), 'radius_card' => array( __( 'Boxes: calendar, time list', 'dayslot' ), '--dys-radius-card', 60 ), 'radius_input' => array( __( 'Fields and drop-downs', 'dayslot' ), '--dys-radius-input', 60 ), 'font_size' => array( __( 'Font size', 'dayslot' ), '--dys-font-size', 32 ), 'gap' => array( __( 'Spacing', 'dayslot' ), '--dys-gap', 40 ), ); foreach ( $sizes as $key => $info ) { $this->add_control( $this->control_prefix() . $key, array( 'label' => $info[0], 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => $info[2], ), ), 'selectors' => array( '{{WRAPPER}} .dys-picker' => $info[1] . ': {{SIZE}}{{UNIT}};' ), ) ); } $this->end_controls_section(); } protected function render() { $editor = class_exists( '\Elementor\Plugin' ) && \Elementor\Plugin::$instance->editor && \Elementor\Plugin::$instance->editor->is_edit_mode(); if ( $editor ) { echo '