Compare commits
3 Commits
9d61a34d7e
...
e51f837ba8
Author | SHA1 | Date |
---|---|---|
jorge | e51f837ba8 | |
jorge | c2c7a7bb0f | |
jorge | bce9973189 |
|
@ -46,8 +46,9 @@ if( ! function_exists( 'ofisuport_ajuts_filters_form') ) {
|
||||||
|
|
||||||
// check for values in url and get value if available
|
// check for values in url and get value if available
|
||||||
if( isset($_GET[ $fieldname ]) ) {
|
if( isset($_GET[ $fieldname ]) ) {
|
||||||
|
|
||||||
$filteredvalues['value'] = explode(',', $_GET[ $fieldname ]);
|
$filteredvalues['value'] = explode(',', $_GET[ $fieldname ]);
|
||||||
|
} else {
|
||||||
|
$filteredvalues['value'] = [];
|
||||||
};
|
};
|
||||||
//end check for values in url
|
//end check for values in url
|
||||||
|
|
||||||
|
@ -60,7 +61,7 @@ if( ! function_exists( 'ofisuport_ajuts_filters_form') ) {
|
||||||
<?php foreach( $fields['choices'] as $choicevalue => $choicelabel ) { ?>
|
<?php foreach( $fields['choices'] as $choicevalue => $choicelabel ) { ?>
|
||||||
|
|
||||||
<div class="filter" data-filter="<?php echo $fields['name'];?>">
|
<div class="filter" data-filter="<?php echo $fields['name'];?>">
|
||||||
<input class="ofisuport-filter" type="checkbox" name="<?php echo $fields['name'];?>" <?php if( in_array($choicevalue,$filteredvalues['value']) ) { echo 'checked';}; ?> value="<?php echo $choicevalue ?>" />
|
<input class="ofisuport-filter" type="checkbox" name="<?php echo $fields['name'];?>" <?php if( in_array( $choicevalue, $filteredvalues['value']) ) { echo 'checked'; } ?> value="<?php echo $choicevalue; ?>" />
|
||||||
<label for="<?php echo $choicevalue; ?>"><?php echo $choicelabel;?></label>
|
<label for="<?php echo $choicevalue; ?>"><?php echo $choicelabel;?></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue