Skip to content

Commit

Permalink
Check checkbox filters by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaapjansma committed Mar 15, 2021
1 parent 48a44e1 commit 7d69b8f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion integration-civicrm-leaflet.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
Plugin Name: Integration between Leaflet Map and CiviCRM
Description: Integrates data from the CiviCRM api into a Leaflet Map. You can use this plugin with Connector to CiviCRM with CiviMcRestFace (https://wordpress.org/plugins/connector-civicrm-mcrestface/)
Version: 1.0.0
Version: 1.0.1
Author: Jaap Jansma
License: AGPL3
License URI: https://www.gnu.org/licenses/agpl-3.0.html
Expand Down
3 changes: 2 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: leaflet, CiviCRM, map, leaflet map, api, connector, rest
Requires at least: 5.2
Tested up to: 5.6
Requires PHP: 7.2
Stable tag: 1.0.0
Stable tag: 1.0.1
License: AGPL-3.0

Provides an integration between CiviCRM api and the [leaflet map](https://wordpress.org/plugins/leaflet-map/). Meaning you can create maps from CiviCRM Data.
Expand Down Expand Up @@ -38,4 +38,5 @@ For more documentation see: [README.md](https://github.com/CiviMRF/integration-c

== Changelog ==

1.0.1: Check checkbox filters by default.
1.0.0: First version.
3 changes: 2 additions & 1 deletion shortcodes/class.civicrm-api-shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,10 @@ protected function displayCheckboxFilterField($filter) {
$class = "civicrm_leaflet_filter_checkbox_item";
if ($i == 1) { $class .= " first"; }
if ($i == count($filter['options'])) { $class .= " last"; }
$checked = 'checked="checked"';
?><span class="<?php echo esc_attr($class); ?>">
<label>
<input type="checkbox" class="civicrm_filter_<?php echo esc_attr($filter['name']); ?>" id="civicrm_filter_<?php echo esc_attr($filter['name']); ?>_<?php echo esc_attr($value); ?>" name="civicrm_filter_<?php echo esc_attr($filter['name']); ?>[]" value="<?php echo esc_attr($value); ?>">
<input type="checkbox" class="civicrm_filter_<?php echo esc_attr($filter['name']); ?>" <?php echo $checked; ?>" id="civicrm_filter_<?php echo esc_attr($filter['name']); ?>_<?php echo esc_attr($value); ?>" name="civicrm_filter_<?php echo esc_attr($filter['name']); ?>[]" value="<?php echo esc_attr($value); ?>">
<span class="civicrm_leaflet_filter_checkbox_item_label"><?php echo esc_html($label); ?></span>
</label>
</span><?php
Expand Down

0 comments on commit 7d69b8f

Please sign in to comment.