Fix default value search form
This commit is contained in:
parent
747f15662b
commit
9245035bda
@ -249,19 +249,23 @@ jQuery( document ).ready( function ( $ ) {
|
||||
////
|
||||
$( '.input-group-number' ).each( function () {
|
||||
var _input = $( 'input', this );
|
||||
if ( parseInt( _input.val() ) <= 0 ) {
|
||||
_input.val( 1 );
|
||||
if ( parseInt( _input.val() ) < 0 ) {
|
||||
_input.val( 0 );
|
||||
}
|
||||
$( '.btn-actions > span', this ).click( function () {
|
||||
|
||||
var _check = function () {
|
||||
return parseInt( _input.val() ) <= 0 ? 1 : parseInt( _input.val() );
|
||||
return parseInt( _input.val() ) < 0 ? 0 : parseInt( _input.val() );
|
||||
};
|
||||
|
||||
if ( $( this ).hasClass( 'btn-plus' ) ) {
|
||||
_val = _check() + 1;
|
||||
} else {
|
||||
_val = _check() - 1;
|
||||
if ( _check() === 0 ) {
|
||||
_val = _check();
|
||||
} else {
|
||||
_val = _check() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
_input.val( _val );
|
||||
|
@ -1,3 +1,7 @@
|
||||
= 1.3.9 - 2020-03-17 =
|
||||
* Fixes - Pending properties review
|
||||
* Fixes - Search form default value
|
||||
|
||||
= 1.3.8 - 2020-03-05 =
|
||||
* Fixes - Missing translations
|
||||
|
||||
|
@ -26,13 +26,16 @@ function opalestate_property_render_field_template( $field, $label, $type = 'sel
|
||||
$template = '';
|
||||
}
|
||||
|
||||
$input_default_value = apply_filters( 'opalestate_search_form_input_type_default_value', 0 );
|
||||
|
||||
if ( empty( $template ) ) {
|
||||
switch ( $type ) {
|
||||
case 'input': ?>
|
||||
<label class="opalestate-label opalestate-label--<?php echo sanitize_html_class( $field ); ?>"><?php echo esc_html( $label ); ?></label>
|
||||
<div class="input-group-number">
|
||||
<i class="<?php echo opalestate_get_property_meta_icon( $field ); ?>"></i>
|
||||
<input class="form-control" value="1" type="text" name="info[<?php echo $field; ?>]" placeholder="<?php echo esc_attr( $label ); ?>"/>
|
||||
<input class="form-control" value="<?php echo $qvalue ? $qvalue : $input_default_value; ?>" type="text" name="info[<?php echo $field; ?>]" placeholder="<?php echo esc_attr(
|
||||
$label ); ?>"/>
|
||||
<div class="btn-actions">
|
||||
<span class="btn-minus"><i class="fa fa-minus"></i></span>
|
||||
<span class="btn-plus"><i class="fa fa-plus"></i></span>
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Plugin Name: Opal Estate Pro
|
||||
* Plugin URI: https://wpdocs.gitbook.io/opal-estate/
|
||||
* Description: Opal Real Estate Plugin is an ideal solution and brilliant choice for you to set up a professional estate website.
|
||||
* Version: 1.3.8
|
||||
* Version: 1.3.9
|
||||
* Author: WPOPAL
|
||||
* Author URI: http://www.wpopal.com
|
||||
* Requires at least: 4.9
|
||||
|
@ -4,7 +4,7 @@ Donate link: https://wpdocs.gitbook.io/opal-estate/
|
||||
Tags: estate, property, opalestate, house for rent, agency for lease, estate submission, agents estate property, property marketplace
|
||||
Requires at least: 4.9
|
||||
Tested up to: 5.3.2
|
||||
Stable tag: 1.3.8
|
||||
Stable tag: 1.3.9
|
||||
License: GPLv3
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
@ -156,6 +156,10 @@ This section describes how to install the plugin and get it working.
|
||||
* System tickets support 24/7 available : [free support](https://wpopal.ticksy.com/ "Visit the Plugin support Page")
|
||||
|
||||
== Changelog ==
|
||||
= 1.3.9 - 2020-03-17 =
|
||||
* Fixes - Pending properties review
|
||||
* Fixes - Search form default value
|
||||
|
||||
= 1.3.8 - 2020-03-05 =
|
||||
* Fixes - Missing translations
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user