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_Number_Control.php
67 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Customizer Builder |
| 5 | * Number Field 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_Number_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 'number'; |
| 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-input-ctn cff-fb-fs" :data-contains-suffix="control.fieldSuffix !== undefined ? 'true' : 'false'"> |
| 45 | <button type="button" class="sb-control-input-info" |
| 46 | :class="control.fieldPrefixAction != undefined ? 'sb-cursor-pointer' : ''" v-if="control.fieldPrefix" |
| 47 | :disabled="control.fieldPrefixAction == undefined" |
| 48 | :aria-hidden="control.fieldPrefixAction == undefined ? 'true' : null" |
| 49 | :tabindex="control.fieldPrefixAction == undefined ? -1 : null" |
| 50 | @click.prevent.default="control.fieldPrefixAction != undefined ? fieldCustomClickAction(control.fieldPrefixAction) : false"> |
| 51 | {{control.fieldPrefix.replace(/ /g," ")}} |
| 52 | </button> |
| 53 | <input type="number" class="sb-control-input cff-fb-fs" :placeholder="control.placeholder ? control.placeholder : ''" :step="control.step ? control.step : 1" :max="control.max ? control.max : 1000" :min="control.min ? control.min : 0" |
| 54 | :aria-label="control.heading || control.label || 'Number value'" |
| 55 | v-model="<?php echo $controlEditingTypeModel ?>[control.id]" @change.prevent.default="changeSettingValue(control.id,false,false, control.ajaxAction ? control.ajaxAction : false)"> |
| 56 | <button type="button" class="sb-control-input-info" |
| 57 | :class="control.fieldSuffixAction != undefined ? 'sb-cursor-pointer' : ''" v-if="control.fieldSuffix" |
| 58 | :disabled="control.fieldSuffixAction == undefined" |
| 59 | :aria-hidden="control.fieldSuffixAction == undefined ? 'true' : null" |
| 60 | :tabindex="control.fieldSuffixAction == undefined ? -1 : null" |
| 61 | @click.prevent.default="control.fieldSuffixAction != undefined ? fieldCustomClickAction(control.fieldSuffixAction) : false"> |
| 62 | {{control.fieldSuffix.replace(/ /g," ")}} |
| 63 | </button> |
| 64 | </div> |
| 65 | <?php |
| 66 | } |
| 67 | } |