eee
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
7 changed files
with
28 additions
and
3 deletions
| ... | @@ -20749,9 +20749,18 @@ | ... | @@ -20749,9 +20749,18 @@ |
| 20749 | // $('form input[type="radio"][name="_sft_category[]"][value="events"]').removeAttr('checked'); | 20749 | // $('form input[type="radio"][name="_sft_category[]"][value="events"]').removeAttr('checked'); |
| 20750 | // $('form input[type="radio"][name="_sft_category[]"][value="news"]').attr('checked', 'checked').trigger('change'); | 20750 | // $('form input[type="radio"][name="_sft_category[]"][value="news"]').attr('checked', 'checked').trigger('change'); |
| 20751 | const search = new URLSearchParams(location.search); | 20751 | const search = new URLSearchParams(location.search); |
| 20752 | search.set('_sft_category', 'news'); | 20752 | if ($('html:lang(fr-FR)').length) { |
| 20753 | search.set('_sft_category', 'news-fr'); | ||
| 20754 | } else { | ||
| 20755 | search.set('_sft_category', 'news'); | ||
| 20756 | } | ||
| 20753 | location.search = search.toString(); | 20757 | location.search = search.toString(); |
| 20754 | } else if (this.value == 'events') { | 20758 | } else if (this.value == 'events') { |
| 20759 | if ($('html:lang(fr-FR)').length) { | ||
| 20760 | search.set('_sft_category', 'events-fr'); | ||
| 20761 | } else { | ||
| 20762 | search.set('_sft_category', 'events'); | ||
| 20763 | } | ||
| 20755 | // $('form input[type="radio"][name="_sft_category[]"][value="news"]').removeAttr('checked'); | 20764 | // $('form input[type="radio"][name="_sft_category[]"][value="news"]').removeAttr('checked'); |
| 20756 | // $('form input[type="radio"][name="_sft_category[]"][value="events"]').attr('checked', 'checked').trigger('change'); | 20765 | // $('form input[type="radio"][name="_sft_category[]"][value="events"]').attr('checked', 'checked').trigger('change'); |
| 20757 | const search = new URLSearchParams(location.search); | 20766 | const search = new URLSearchParams(location.search); | ... | ... |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
| ... | @@ -31,8 +31,15 @@ get_header(); | ... | @@ -31,8 +31,15 @@ get_header(); |
| 31 | <div id="top-news-select"> | 31 | <div id="top-news-select"> |
| 32 | <li class="sf-field-category" data-sf-field-name="_sft_category" data-sf-field-type="category" data-sf-field-input-type="radio"><h4>SHOW:</h4> | 32 | <li class="sf-field-category" data-sf-field-name="_sft_category" data-sf-field-type="category" data-sf-field-input-type="radio"><h4>SHOW:</h4> |
| 33 | <ul class=""> | 33 | <ul class=""> |
| 34 | <?php $my_current_lang = apply_filters( 'wpml_current_language', NULL ); | ||
| 35 | if ($my_current_lang != 'fr'){ ?> | ||
| 34 | <li class="sf-level-0 sf-item-340" data-sf-count="0" data-sf-depth="0"><input class="sf-input-radio" type="radio" value="events" <?php if($_GET['_sft_category'] == 'events'){ echo 'checked="checked"'; }; ?> name="_sft_category[]" id="sf-input-96986b74c4834549a28504865a382064"><label class="sf-label-radio" for="sf-input-96986b74c4834549a28504865a382064">Events</label></li> | 36 | <li class="sf-level-0 sf-item-340" data-sf-count="0" data-sf-depth="0"><input class="sf-input-radio" type="radio" value="events" <?php if($_GET['_sft_category'] == 'events'){ echo 'checked="checked"'; }; ?> name="_sft_category[]" id="sf-input-96986b74c4834549a28504865a382064"><label class="sf-label-radio" for="sf-input-96986b74c4834549a28504865a382064">Events</label></li> |
| 35 | <li class="sf-level-0 sf-item-341 sf-option-active" data-sf-count="4" data-sf-depth="0"><input class="sf-input-radio" type="radio" value="news" name="_sft_category[]" <?php if($_GET['_sft_category'] == 'news'){ echo 'checked="checked"';}; ?> id="sf-input-6606415ce37dedc088bf1e3935d3a087"><label class="sf-label-radio" for="sf-input-6606415ce37dedc088bf1e3935d3a087">News</label></li></ul> | 37 | <li class="sf-level-0 sf-item-341 sf-option-active" data-sf-count="4" data-sf-depth="0"><input class="sf-input-radio" type="radio" value="news" name="_sft_category[]" <?php if($_GET['_sft_category'] == 'news'){ echo 'checked="checked"';}; ?> id="sf-input-6606415ce37dedc088bf1e3935d3a087"><label class="sf-label-radio" for="sf-input-6606415ce37dedc088bf1e3935d3a087">News</label></li></ul> |
| 38 | <?php }else{ ?> | ||
| 39 | <li class="sf-level-0 sf-item-340" data-sf-count="0" data-sf-depth="0"><input class="sf-input-radio" type="radio" value="events" <?php if($_GET['_sft_category'] == 'events-fr'){ echo 'checked="checked"'; }; ?> name="_sft_category[]" id="sf-input-96986b74c4834549a28504865a382064"><label class="sf-label-radio" for="sf-input-96986b74c4834549a28504865a382064">Événements</label></li> | ||
| 40 | <li class="sf-level-0 sf-item-341 sf-option-active" data-sf-count="4" data-sf-depth="0"><input class="sf-input-radio" type="radio" value="news" name="_sft_category[]" <?php if($_GET['_sft_category'] == 'news-fr'){ echo 'checked="checked"';}; ?> id="sf-input-6606415ce37dedc088bf1e3935d3a087"><label class="sf-label-radio" for="sf-input-6606415ce37dedc088bf1e3935d3a087">Nouvelles</label></li></ul> | ||
| 41 | |||
| 42 | <?php }?> | ||
| 36 | </li> | 43 | </li> |
| 37 | </div> | 44 | </div> |
| 38 | <?php echo do_shortcode('[searchandfilter slug="news-search"]'); ?> | 45 | <?php echo do_shortcode('[searchandfilter slug="news-search"]'); ?> | ... | ... |
| ... | @@ -110,9 +110,18 @@ var Search = (function($) { | ... | @@ -110,9 +110,18 @@ var Search = (function($) { |
| 110 | // $('form input[type="radio"][name="_sft_category[]"][value="events"]').removeAttr('checked'); | 110 | // $('form input[type="radio"][name="_sft_category[]"][value="events"]').removeAttr('checked'); |
| 111 | // $('form input[type="radio"][name="_sft_category[]"][value="news"]').attr('checked', 'checked').trigger('change'); | 111 | // $('form input[type="radio"][name="_sft_category[]"][value="news"]').attr('checked', 'checked').trigger('change'); |
| 112 | const search = new URLSearchParams(location.search); | 112 | const search = new URLSearchParams(location.search); |
| 113 | search.set('_sft_category', 'news'); | 113 | if ($('html:lang(fr-FR)').length) { |
| 114 | search.set('_sft_category', 'news-fr'); | ||
| 115 | }else{ | ||
| 116 | search.set('_sft_category', 'news'); | ||
| 117 | } | ||
| 114 | location.search = search.toString(); | 118 | location.search = search.toString(); |
| 115 | }else if (this.value == 'events') { | 119 | }else if (this.value == 'events') { |
| 120 | if ($('html:lang(fr-FR)').length) { | ||
| 121 | search.set('_sft_category', 'events-fr'); | ||
| 122 | }else{ | ||
| 123 | search.set('_sft_category', 'events'); | ||
| 124 | } | ||
| 116 | // $('form input[type="radio"][name="_sft_category[]"][value="news"]').removeAttr('checked'); | 125 | // $('form input[type="radio"][name="_sft_category[]"][value="news"]').removeAttr('checked'); |
| 117 | // $('form input[type="radio"][name="_sft_category[]"][value="events"]').attr('checked', 'checked').trigger('change'); | 126 | // $('form input[type="radio"][name="_sft_category[]"][value="events"]').attr('checked', 'checked').trigger('change'); |
| 118 | const search = new URLSearchParams(location.search); | 127 | const search = new URLSearchParams(location.search); | ... | ... |
| ... | @@ -2,5 +2,5 @@ | ... | @@ -2,5 +2,5 @@ |
| 2 | Theme Name: MSF CA Child | 2 | Theme Name: MSF CA Child |
| 3 | Author: Tenzing Communications | 3 | Author: Tenzing Communications |
| 4 | Template: msf-ca | 4 | Template: msf-ca |
| 5 | Version: 1.0.14 | 5 | Version: 1.0.15 |
| 6 | */ | 6 | */ |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment