Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 1990-2000 (lines=11) @@
1987
			$r .= "\t\t<textarea name='" . esc_attr( $field_id ) . "' id='contact-form-comment-" . esc_attr( $field_id ) . "' rows='20' " . $field_placeholder . " " . ( $field_required ? "required aria-required='true'" : "" ) . ">" . esc_textarea( $field_value ) . "</textarea>\n";
1988
			$r .= "\t</div>\n";
1989
			break;
1990
		case 'radio' :
1991
			$r .= "\t<div><label class='grunion-field-label" . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( "(required)", 'jetpack' ) . '</span>' : '' ) . "</label>\n";
1992
			foreach ( $this->get_attribute( 'options' ) as $option ) {
1993
				$option = Grunion_Contact_Form_Plugin::strip_tags( $option );
1994
				$r .= "\t\t<label class='grunion-radio-label radio" . ( $this->is_error() ? ' form-error' : '' ) . "'>";
1995
				$r .= "<input type='radio' name='" . esc_attr( $field_id ) . "' value='" . esc_attr( $option ) . "' class='radio' " . checked( $option, $field_value, false ) . " " . ( $field_required ? "required aria-required='true'" : "" ) . "/> ";
1996
				$r .= esc_html( $option ) . "</label>\n";
1997
				$r .= "\t\t<div class='clear-form'></div>\n";
1998
			}
1999
			$r .= "\t\t</div>\n";
2000
			break;
2001
		case 'checkbox' :
2002
			$r .= "\t<div>\n";
2003
			$r .= "\t\t<label class='grunion-field-label checkbox" . ( $this->is_error() ? ' form-error' : '' ) . "'>\n";
@@ 2020-2030 (lines=11) @@
2017
			}
2018
			$r .= "\t\t</div>\n";
2019
			break;
2020
		case 'select' :
2021
			$r .= "\n<div>\n";
2022
			$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)", 'jetpack' ) . '</span>' : '' ) . "</label>\n";
2023
			$r .= "\t<select name='" . esc_attr( $field_id ) . "' id='" . esc_attr( $field_id ) . "' class='select' " . ( $field_required ? "required aria-required='true'" : "" ) . ">\n";
2024
			foreach ( $this->get_attribute( 'options' ) as $option ) {
2025
				$option = Grunion_Contact_Form_Plugin::strip_tags( $option );
2026
				$r .= "\t\t<option" . selected( $option, $field_value, false ) . ">" . esc_html( $option ) . "</option>\n";
2027
			}
2028
			$r .= "\t</select>\n";
2029
			$r .= "\t</div>\n";
2030
			break;
2031
		case 'date' :
2032
			$r .= "\n<div>\n";
2033
			$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)", 'jetpack' ) . '</span>' : '' ) . "</label>\n";