CFF_Actionbutton_Control.php
2 weeks ago
CFF_Checkbox_Control.php
2 weeks ago
CFF_Checkboxsection_Control.php
2 weeks ago
CFF_Coloroverride_Control.php
2 weeks ago
CFF_Colorpicker_Control.php
2 weeks ago
CFF_Controls_Base.php
2 weeks ago
CFF_Customview_Control.php
2 weeks ago
CFF_Datepicker_Control.php
2 weeks ago
CFF_Heading_Control.php
2 weeks ago
CFF_Hidden_Control.php
2 weeks ago
CFF_Number_Control.php
2 weeks ago
CFF_Select_Control.php
2 weeks ago
CFF_Separator_Control.php
2 weeks ago
CFF_Switcher_Control.php
2 weeks ago
CFF_Text_Control.php
2 weeks ago
CFF_Textarea_Control.php
2 weeks ago
CFF_Toggle_Control.php
2 weeks ago
CFF_Togglebutton_Control.php
2 weeks ago
CFF_Toggleset_Control.php
2 weeks ago
index.php
2 weeks ago
CFF_Checkboxsection_Control.php
76 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Customizer Builder |
| 5 | * CheckBox Section Control |
| 6 | * |
| 7 | * @since 4.0 |
| 8 | */ |
| 9 | |
| 10 | namespace CustomFacebookFeed\Builder\Controls; |
| 11 | |
| 12 | if (!defined('ABSPATH')) { |
| 13 | exit; |
| 14 | } |
| 15 | |
| 16 | class CFF_Checkboxsection_Control extends CFF_Controls_Base |
| 17 | { |
| 18 | /** |
| 19 | * Get control type. |
| 20 | * |
| 21 | * Getting the Control Type |
| 22 | * |
| 23 | * @since 4.0 |
| 24 | * @access public |
| 25 | * |
| 26 | * @return string |
| 27 | */ |
| 28 | public function get_type() |
| 29 | { |
| 30 | return 'checkboxsection'; |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Output Control |
| 35 | * |
| 36 | * @since 4.0 |
| 37 | * @access public |
| 38 | * |
| 39 | * @return HTML |
| 40 | */ |
| 41 | public function get_control_output($controlEditingTypeModel) |
| 42 | { |
| 43 | ?> |
| 44 | <div class="sb-control-checkboxsection-header" v-if="control.header"> |
| 45 | <div class="sb-control-checkboxsection-name"> |
| 46 | <span aria-hidden="true" v-html="svgIcons['preview']"></span> |
| 47 | <strong class="">{{genericText.name}}</strong> |
| 48 | </div> |
| 49 | <strong>{{genericText.edit}}</strong> |
| 50 | </div> |
| 51 | <div class="sb-control-checkbox-ctn cff-fb-fs" role="group" :aria-label="control.label"> |
| 52 | <span class="sb-control-checkbox-hover" aria-hidden="true"></span> |
| 53 | <button type="button" |
| 54 | class="sb-control-checkbox" |
| 55 | role="checkbox" |
| 56 | :aria-checked="checkboxSectionValueExists(control.id, control.value) ? 'true' : 'false'" |
| 57 | :aria-label="control.label" |
| 58 | @click.stop.prevent="changeCheckboxSectionValue(control.id, control.value)" |
| 59 | @keydown.enter.stop.prevent="changeCheckboxSectionValue(control.id, control.value)" |
| 60 | @keydown.space.stop.prevent="changeCheckboxSectionValue(control.id, control.value)" |
| 61 | :data-active="checkboxSectionValueExists(control.id, control.value)"></button> |
| 62 | <button type="button" |
| 63 | class="sb-control-checkboxsection-open cff-fb-fs" |
| 64 | :aria-controls="control.section && control.section.id ? control.section.id : null" |
| 65 | :aria-label="control.label" |
| 66 | @click.prevent="switchNestedSection(control.section.id, control.section)" |
| 67 | @keydown.enter.prevent="switchNestedSection(control.section.id, control.section)" |
| 68 | @keydown.space.prevent="switchNestedSection(control.section.id, control.section)" |
| 69 | :data-active="checkboxSectionValueExists(control.id, control.value)"> |
| 70 | <strong class="sb-control-label">{{control.label}}</strong> |
| 71 | <span class="sb-control-checkboxsection-btn" aria-hidden="true"></span> |
| 72 | </button> |
| 73 | </div> |
| 74 | <?php |
| 75 | } |
| 76 | } |