| @@ -9,9 +9,8 @@ | ||
| 9 | 9 | class FrmFieldCheckbox extends FrmFieldType { |
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * @var string |
| 13 | - * | |
| 14 | 13 | * @since 3.0 |
| 15 | 14 | */ |
| 16 | 15 | protected $type = 'checkbox'; |
| 17 | 16 | |
| @@ -16,9 +15,8 @@ | ||
| 16 | 15 | protected $type = 'checkbox'; |
| 17 | 16 | |
| 18 | 17 | /** |
| 19 | 18 | * @var bool |
| 20 | - * | |
| 21 | 19 | * @since 3.0 |
| 22 | 20 | */ |
| 23 | 21 | protected $holds_email_values = true; |
| 24 | 22 | |
| @@ -25,16 +23,12 @@ | ||
| 25 | 23 | /** |
| 26 | 24 | * Does the html for this field label need to include "for"? |
| 27 | 25 | * |
| 28 | 26 | * @var bool |
| 29 | - * | |
| 30 | 27 | * @since 3.06.01 |
| 31 | 28 | */ |
| 32 | 29 | protected $has_for_label = false; |
| 33 | 30 | |
| 34 | - /** | |
| 35 | - * @return string | |
| 36 | - */ | |
| 37 | 31 | protected function input_html() { |
| 38 | 32 | return $this->multiple_input_html(); |
| 39 | 33 | } |
| 40 | 34 | |
| @@ -41,20 +35,8 @@ | ||
| 41 | 35 | protected function include_form_builder_file() { |
| 42 | 36 | return $this->include_front_form_file(); |
| 43 | 37 | } |
| 44 | 38 | |
| 45 | - /** | |
| 46 | - * @return bool[] | |
| 47 | - */ | |
| 48 | - protected function field_settings_for_type() { | |
| 49 | - return array( | |
| 50 | - 'invalid' => true, | |
| 51 | - ); | |
| 52 | - } | |
| 53 | - | |
| 54 | - /** | |
| 55 | - * @return string[] | |
| 56 | - */ | |
| 57 | 39 | protected function new_field_settings() { |
| 58 | 40 | return array( |
| 59 | 41 | 'options' => serialize( |
| 60 | 42 | array( |
| @@ -68,11 +50,8 @@ | ||
| 68 | 50 | /** |
| 69 | 51 | * Get the type of field being displayed. |
| 70 | 52 | * |
| 71 | 53 | * @since 4.02.01 |
| 72 | - * | |
| 73 | - * @param array|object $field | |
| 74 | - * | |
| 75 | 54 | * @return array |
| 76 | 55 | */ |
| 77 | 56 | public function displayed_field_type( $field ) { |
| 78 | 57 | return array( |
| @@ -79,11 +58,8 @@ | ||
| 79 | 58 | $this->type => true, |
| 80 | 59 | ); |
| 81 | 60 | } |
| 82 | 61 | |
| 83 | - /** | |
| 84 | - * @return array | |
| 85 | - */ | |
| 86 | 62 | protected function extra_field_opts() { |
| 87 | 63 | $form_id = $this->get_field_column( 'form_id' ); |
| 88 | 64 | |
| 89 | 65 | return array( |
| @@ -92,27 +68,17 @@ | ||
| 92 | 68 | } |
| 93 | 69 | |
| 94 | 70 | /** |
| 95 | 71 | * @since 4.06 |
| 96 | - * | |
| 97 | - * @param array $args | |
| 98 | - * | |
| 99 | - * @return void | |
| 100 | 72 | */ |
| 101 | 73 | protected function show_priority_field_choices( $args = array() ) { |
| 102 | - include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/radio-images.php'; | |
| 74 | + include( FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/radio-images.php' ); | |
| 103 | 75 | } |
| 104 | 76 | |
| 105 | - /** | |
| 106 | - * @return string | |
| 107 | - */ | |
| 108 | 77 | protected function include_front_form_file() { |
| 109 | 78 | return FrmAppHelper::plugin_path() . '/classes/views/frm-fields/front-end/checkbox-field.php'; |
| 110 | 79 | } |
| 111 | 80 | |
| 112 | - /** | |
| 113 | - * @return bool | |
| 114 | - */ | |
| 115 | 81 | protected function show_readonly_hidden() { |
| 116 | 82 | return true; |
| 117 | 83 | } |
| 118 | 84 | |
| @@ -117,19 +83,6 @@ | ||
| 117 | 83 | } |
| 118 | 84 | |
| 119 | 85 | protected function prepare_import_value( $value, $atts ) { |
| 120 | 86 | return $this->get_multi_opts_for_import( $value ); |
| 121 | - } | |
| 122 | - | |
| 123 | - /** | |
| 124 | - * Unset aria-invalid for checkboxes because it's not valid for checkboxes. | |
| 125 | - * Instead aria-invalid is added to the checkbox group parent element. | |
| 126 | - * | |
| 127 | - * @since 6.25 | |
| 128 | - * | |
| 129 | - * @param array $shortcode_atts | |
| 130 | - * @param array $args | |
| 131 | - */ | |
| 132 | - public function set_aria_invalid_error( &$shortcode_atts, $args ) { | |
| 133 | - unset( $shortcode_atts['aria-invalid'] ); | |
| 134 | 87 | } |
| 135 | 88 | } |