orderBy('id', 'DESC') ->get(); ?> app = $app; add_action('elementor/widgets/register', [$this, 'init_widgets']); } public function init_widgets() { $this->enqueueAssets(); $widgets_manager = Elementor::instance()->widgets_manager; if (file_exists(FLUENTFORM_DIR_PATH . 'app/Modules/Widgets/FluentFormWidget.php')) { require_once FLUENTFORM_DIR_PATH . 'app/Modules/Widgets/FluentFormWidget.php'; $widgets_manager->register(new FluentFormWidget()); } } public function enqueueAssets() { wp_enqueue_style('fluentform-elementor-widget', fluentformMix('css/fluent-forms-elementor-widget.css'), [], FLUENTFORM_VERSION); } } OxyFluentFormWidget.php 0000644 00000106325 15073227004 0011211 0 ustar 00 addOptionControl( [ 'type' => 'dropdown', 'name' => __('Select a Form', 'fluentform'), 'slug' => 'ff_form', 'value' => Helper::getForms(), 'default' => 'no', 'css' => false, ] ); $templates_control->rebuildElementOnChange(); $this->formContainerStyleControls(); $this->formInputLabelsStyle(); $this->formInputsStyle(); $this->checkboxAndRadioStyle(); $this->gdprAndTermsConditionStyle(); $this->sectionBreakStyle(); $this->checkboxGridStyle(); $this->fileUploadStyle(); $this->progressBarStyle(); $this->submitBtnStyle(); $this->stepButtonStyle(); $this->successMessageStyle(); $this->errorMessageStyle(); } public function formContainerStyleControls() { $section_container = $this->addControlSection( 'fluentform_container', __('Form Container', 'fluentform'), 'assets/icon.png', $this ); $selector = '.fluentform'; $section_container->addStyleControls( [ [ 'name' => __('Background Color', 'fluentform'), 'selector' => $selector, 'property' => 'background-color', ], [ 'name' => __('Max Width', 'fluentform'), 'selector' => $selector, 'property' => 'width', ], ] ); $section_container->addPreset( 'padding', 'fluentform_container_padding', __('Padding', 'fluentform'), $selector )->whiteList(); $section_container->addPreset( 'margin', 'fluentform_container_margin', __('Margin', 'fluentform'), $selector )->whiteList(); $section_container->addPreset( 'border', 'fluentform_container_border', __('Border', 'fluentform'), $selector )->whiteList(); $section_container->addPreset( 'border-radius', 'fluentform_container_radius', __('Border Radius', 'fluentform'), $selector )->whiteList(); $section_container->boxShadowSection( __('Box Shadow', 'fluentform'), $selector, $this ); } public function formInputLabelsStyle() { $section_label = $this->addControlSection( 'fluentform_label', __('Labels', 'fluentform'), 'assets/icon.png', $this ); $selector = '.fluentform .ff-el-input--label label'; $section_label->typographySection(__('Typography'), $selector, $this); $section_label->addStyleControls( [ [ 'name' => __('Text Color', 'fluentform'), 'selector' => $selector, 'property' => 'color', ], ] ); $section_label->addStyleControl( [ 'name' => __('Asterisk Color', 'fluentform'), 'selector' => '.ff-el-input--label.ff-el-is-required.asterisk-right label:after ,.ff-el-input--label.ff-el-is-required.asterisk-left label:before', 'property' => 'color', ] ); } public function formInputsStyle() { $selector = '.ff-el-form-control'; $section_input = $this->addControlSection( 'fluentform_input', __('Input & Textara', 'fluentform'), 'assets/icon.png', $this ); $section_input->addStyleControls( [ [ 'name' => __('Text Indent', 'fluentform'), 'selector' => $selector, 'property' => 'padding-left', 'control_type' => 'slider-measurebox', 'unit' => 'px', ], [ 'name' => __('Margin Bottom'), 'selector' => '.ff-el-group', 'property' => 'margin-bottom', ], [ 'name' => __('Input Width', 'fluentform'), 'selector' => $selector, 'property' => 'width', 'control_type' => 'slider-measurebox', 'unit' => 'px', ], [ 'name' => __('Input Height', 'fluentform'), 'selector' => $selector, 'property' => 'height', 'control_type' => 'slider-measurebox', 'unit' => 'px', ], [ 'name' => __('Textarea Width', 'fluentform'), 'selector' => '.ff-el-group textarea', 'property' => 'width', 'control_type' => 'slider-measurebox', 'unit' => 'px', ], [ 'name' => __('Textarea Height', 'fluentform'), 'selector' => '.ff-el-group textarea', 'property' => 'height', 'control_type' => 'slider-measurebox', 'unit' => 'px', ], ] ); $section_input_normal = $section_input->addControlSection( 'fluentform_input_normal_section', __('Normal', 'fluentform'), 'assets/icon.png', $this ); $section_input_normal->addStyleControls( [ [ 'name' => __('Color'), 'selector' => '.ff-el-form-control', 'property' => 'color', ], [ 'name' => __('Background Color'), 'selector' => '.ff-el-form-control', 'property' => 'background-color', ], [ 'name' => __('Placeholder Color'), 'slug' => 'fluentform_input_placeholder', 'selector' => '::placeholder', 'property' => 'color', ], ] ); $section_input_hover = $section_input->addControlSection( 'fluentform_input_hover_section', __('Hover', 'fluentform'), 'assets/icon.png', $this ); $section_input_hover->addStyleControls( [ [ 'name' => __('Background Color'), 'selector' => '.ff-el-form-control:focus', 'property' => 'background-color', ], [ 'name' => __('Text Color'), 'selector' => '.ff-el-form-control:focus', 'property' => 'color', ], [ 'name' => __('Border Color'), 'selector' => '.ff-el-form-control:focus', 'property' => 'border-color', 'control_type' => 'colorpicker', ], ] ); $section_input->addPreset( 'padding', 'fluentform_input_spacing', __('Padding', 'fluentform'), $selector )->whiteList(); $section_input->boxShadowSection( __('Box Shadow', 'fluentform'), $selector, $this ); $section_input->typographySection( __('Typography'), $selector, $this ); $section_input->addPreset( 'border', 'fluentform_input_border', __('Border', 'fluentform'), $selector )->whiteList(); $section_input->addPreset( 'border-radius', 'fluentform_input_border_radius', __('Border Radius', 'fluentform'), $selector )->whiteList(); } public function checkboxGridStyle() { $section_checkbox_grid = $this->addControlSection( 'fluentform_checkbox_grid', __('Checkable Grid Field', 'fluentform'), 'assets/icon.png', $this ); $section_checkbox_grid_spacing = $section_checkbox_grid->addControlSection( 'fluentform_checkbox_grid_sp', __('Spacing', 'fluentform'), 'assets/icon.png', $this ); $section_checkbox_grid_width = $section_checkbox_grid_spacing->addStyleControl( [ 'selector' => '.fluentform .ff-checkable-grids', 'property' => 'width', 'control_type' => 'slider-measurebox', ] ); $section_checkbox_grid_width->setRange('0', '100', '1'); $section_checkbox_grid_width->setUnits('%', 'px,%,em'); $section_checkbox_grid_width->setDefaultValue('100'); $section_checkbox_grid_spacing->addPreset( 'padding', 'fluentform_checkbox_grid_padding', __('Table Head Cell Padding'), '.fluentform .ff-checkable-grids thead>tr>th' )->whiteList(); $section_checkbox_grid_spacing->addPreset( 'padding', 'fluentform_checkbox_grid_padding_tb', __('Table Body Cell Padding'), '.fluentform .ff-checkable-grids tbody>tr>td' )->whiteList(); $section_checkbox_grid_color = $section_checkbox_grid->addControlSection( 'fluentform_checkbox_grid_color', __('Color', 'fluentform'), 'assets/icon.png', $this ); $section_checkbox_grid_color->addStyleControls([ [ 'name' => __('Table Outer Border Width', 'fluentform'), 'selector' => '.fluentform .ff-checkable-grids', 'property' => 'border-width', ], [ 'name' => __('Table Outer Border Color', 'fluentform'), 'selector' => '.fluentform .ff-checkable-grids', 'property' => 'border-color', ], [ 'name' => __('Table Head Background', 'fluentform'), 'selector' => '.fluentform .ff-checkable-grids thead>tr>th', 'property' => 'background-color', ], [ 'name' => __('Table Body Background', 'fluentform'), 'selector' => '.fluentform .ff-checkable-grids tbody>tr>td', 'property' => 'background-color', ], [ 'name' => __('Table Body Alt Background', 'fluentform'), 'selector' => '.fluentform .ff-checkable-grids tbody>tr:nth-child(2n)>td', 'property' => 'background-color', ], [ 'name' => __('Table Body Alt Text Color', 'fluentform'), 'selector' => '.fluentform .ff-checkable-grids tbody>tr:nth-child(2n)>td', 'property' => 'color', ], ]); $section_checkbox_grid->typographySection( __('Heading Typography', 'fluentform'), '.fluentform .ff-checkable-grids thead>tr>th', $this ); $section_checkbox_grid->typographySection( __('Cell Typography', 'fluentform'), '.fluentform .ff-checkable-grids tbody>tr>td', $this ); } public function gdprAndTermsConditionStyle() { $section_gdpr_terms = $this->addControlSection( 'fluentform_gdpr_terms_section', __('GDPR, Terms & Condition', 'fluentform'), 'assets/icon.png', $this ); $section_gdpr_terms->typographySection(__('Typography'), '.ff-el-tc , .ff_t_c', $this); $section_gdpr_terms->addStyleControls( [ [ 'name' => __('Text Color', 'fluentform'), 'selector' => '.ff-el-tc , .ff_t_c', 'property' => 'color', ], [ 'name' => __('Link Color', 'fluentform'), 'selector' => '.ff-el-tc a, .ff_t_c a', 'property' => 'color', ], ] ); } public function sectionBreakStyle() { $section_section_break = $this->addControlSection( 'fluentform_section_break_section', __('Section Break', 'fluentform'), 'assets/icon.png', $this ); $selector = '.ff-el-section-break'; $section_section_break->typographySection(__('Typography', 'fluentform'), $selector, $this); $section_section_break->addStyleControls( [ [ 'name' => __('Text Color', 'fluentform'), 'selector' => $selector, 'property' => 'color', ], [ 'selector' => $selector, 'slug' => 'ff_section_break_section_bg_color', 'property' => 'background-color', ], ] ); $section_section_break->addPreset( 'padding', 'ff_section_break_section_padding', __('Padding', 'fluentform'), $selector )->whiteList(); $section_section_break->addPreset( 'margin', 'ff_section_break_section_margin', __('Margin', 'fluentform'), $selector )->whiteList(); $section_section_break->addStyleControl( [ 'selector' => $selector . ' hr', 'slug' => 'ffsb_line', 'property' => 'border-color', ] )->setParam('hide_wrapper_end', true); $section_section_break->addStyleControl( [ 'selector' => $selector . ' hr', 'slug' => 'ffsb_linew', 'property' => 'border-width', ] )->setParam('hide_wrapper_start', true); } public function render($options, $defaults, $content) { if ('no' == $options['ff_form']) { echo '