Code Duplication    Length = 11-11 lines in 2 locations

modules/contact-form/grunion-contact-form.php 2 locations

@@ 2257-2267 (lines=11) @@
2254
			$r .= "\t\t<textarea name='" . esc_attr( $field_id ) . "' id='contact-form-comment-" . esc_attr( $field_id ) . "' rows='20' " . $field_class . $field_placeholder . " " . ( $field_required ? "required aria-required='true'" : "" ) . ">" . esc_textarea( $field_value ) . "</textarea>\n";
2255
			$r .= "\t</div>\n";
2256
			break;
2257
		case 'radio' :
2258
			$r .= "\t<div><label class='grunion-field-label" . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . $required_field_text . '</span>' : '' ) . "</label>\n";
2259
			foreach ( $this->get_attribute( 'options' ) as $option ) {
2260
				$option = Grunion_Contact_Form_Plugin::strip_tags( $option );
2261
				$r .= "\t\t<label class='grunion-radio-label radio" . ( $this->is_error() ? ' form-error' : '' ) . "'>";
2262
				$r .= "<input type='radio' name='" . esc_attr( $field_id ) . "' value='" . esc_attr( $option ) . "' " . $field_class . checked( $option, $field_value, false ) . " " . ( $field_required ? "required aria-required='true'" : "" ) . "/> ";
2263
				$r .= esc_html( $option ) . "</label>\n";
2264
				$r .= "\t\t<div class='clear-form'></div>\n";
2265
			}
2266
			$r .= "\t\t</div>\n";
2267
			break;
2268
		case 'checkbox' :
2269
			$r .= "\t<div>\n";
2270
			$r .= "\t\t<label class='grunion-field-label checkbox" . ( $this->is_error() ? ' form-error' : '' ) . "'>\n";
@@ 2287-2297 (lines=11) @@
2284
			}
2285
			$r .= "\t\t</div>\n";
2286
			break;
2287
		case 'select' :
2288
			$r .= "\n<div>\n";
2289
			$r .= "\t\t<label for='" . esc_attr( $field_id ) . "' class='grunion-field-label select" . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>'. $required_field_text . '</span>' : '' ) . "</label>\n";
2290
			$r .= "\t<select name='" . esc_attr( $field_id ) . "' id='" . esc_attr( $field_id ) . "' " . $field_class . ( $field_required ? "required aria-required='true'" : "" ) . ">\n";
2291
			foreach ( $this->get_attribute( 'options' ) as $option ) {
2292
				$option = Grunion_Contact_Form_Plugin::strip_tags( $option );
2293
				$r .= "\t\t<option" . selected( $option, $field_value, false ) . ">" . esc_html( $option ) . "</option>\n";
2294
			}
2295
			$r .= "\t</select>\n";
2296
			$r .= "\t</div>\n";
2297
			break;
2298
		case 'date' :
2299
			$r .= "\n<div>\n";
2300
			$r .= "\t\t<label for='" . esc_attr( $field_id ) . "' class='grunion-field-label " . esc_attr( $field_type ) . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . $required_field_text . '</span>' : '' ) . "</label>\n";