Skip to content

Commit

Permalink
Listing form description max value fixed (sovware#1160)
Browse files Browse the repository at this point in the history
  • Loading branch information
kowsar89 authored Sep 6, 2022
1 parent 038f5ba commit b29b430
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions templates/listing-form/custom-fields/textarea.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
/**
* @author wpWax
* @since 6.6
* @version 7.3.3
* @version 7.4.0
*/

if ( ! defined( 'ABSPATH' ) ) exit;

$data_max = $data['max'] ?? '';
$maxlength = $data['max'] ?? '';
?>

<div class="directorist-form-group directorist-custom-field-textarea">

<?php $listing_form->field_label_template( $data );?>

<textarea name="<?php echo esc_attr( $data['field_key'] ); ?>" id="<?php echo esc_attr( $data['field_key'] ); ?>" class="directorist-form-element" rows="<?php echo (int) $data['rows']; ?>" placeholder="<?php echo esc_attr( $data['placeholder'] ); ?>" max="<?php echo esc_attr( $data_max ); ?>" <?php $listing_form->required( $data ); ?>><?php echo esc_textarea( $data['value'] ); ?></textarea>
<textarea name="<?php echo esc_attr( $data['field_key'] ); ?>" id="<?php echo esc_attr( $data['field_key'] ); ?>" class="directorist-form-element" rows="<?php echo (int) $data['rows']; ?>" placeholder="<?php echo esc_attr( $data['placeholder'] ); ?>" maxlength="<?php echo esc_attr( $maxlength ); ?>" <?php $listing_form->required( $data ); ?>><?php echo esc_textarea( $data['value'] ); ?></textarea>

<?php $listing_form->field_description_template( $data );?>

Expand Down
6 changes: 3 additions & 3 deletions templates/listing-form/fields/description.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
/**
* @author wpWax
* @since 6.6
* @version 7.3.1
* @version 7.4.0
*/

if ( ! defined( 'ABSPATH' ) ) exit;

$max = !empty( $data['max'] ) ? 'max="'. $data['max'] .'"' : '';
$maxlength = $data['max'] ?? '';
?>

<div class="directorist-form-group directorist-form-description-field">
Expand All @@ -17,7 +17,7 @@

if ( 'textarea' === $data['type'] ) {
?>
<textarea <?php echo esc_attr( $max ); ?> name="<?php echo esc_attr( $data['field_key'] ); ?>" id="<?php echo esc_attr( $data['field_key'] ); ?>" class="directorist-form-element" rows="8" placeholder="<?php echo esc_attr( $data['placeholder'] ); ?>" <?php $listing_form->required( $data ); ?>><?php echo esc_attr( $data['value'] ); ?></textarea>
<textarea name="<?php echo esc_attr( $data['field_key'] ); ?>" id="<?php echo esc_attr( $data['field_key'] ); ?>" class="directorist-form-element" rows="8" placeholder="<?php echo esc_attr( $data['placeholder'] ); ?>" maxlength="<?php echo esc_attr( $maxlength ); ?>" <?php $listing_form->required( $data ); ?>><?php echo esc_html( $data['value'] ); ?></textarea>
<?php
}
else {
Expand Down

0 comments on commit b29b430

Please sign in to comment.