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