Skip to content
Snippets Groups Projects
Commit 4e17ba3b authored by Brian Canini's avatar Brian Canini
Browse files

asc_bootstrap - debugging hook_form_alter for filters so that new fields work...

asc_bootstrap - debugging hook_form_alter for filters so that new fields work and are displayed correctly, adding js to clear and resubmit people search field, hiding div borders in contactinfo if phone or fax not entered
parent 96644d4f
No related branches found
No related tags found
No related merge requests found
......@@ -82,19 +82,29 @@ function asc_bootstrap_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $
$form['field_evt_date_range_value']['#weight'] = 1;
$form['end_date']['#weight'] = 1;
$form['field_evt_taxonomy_target_id_1']['#weight'] = 2;
$form['field_evt_taxonomy_target_id']['#weight'] = 3;
$form['field_news_terms_1_target_id']['#weight'] = 2.5;
$form['field_evt_taxonomy2_target_id']['#weight'] = 3;
$form['field_news_terms_1_target_id_1']['#weight'] = 3.5;
$form['keys']['#weight'] = 5;
$form['keys']['#attributes']['placeholder'] = t('Search Keywords');
/*
* checking if taxonomy has vocabulary - if not, don't display field
*/
if(count($form['field_evt_taxonomy_target_id']['#options']) == 1) {
$form['field_evt_taxonomy_target_id']['#access'] = FALSE;
}
if(count($form['field_evt_taxonomy_target_id_1']['#options']) == 1) {
$form['field_evt_taxonomy_target_id_1']['#access'] = FALSE;
}
if(count($form['field_evt_taxonomy2_target_id']['#options']) == 1) {
$form['field_evt_taxonomy2_target_id']['#access'] = FALSE;
}
if(count($form['field_news_terms_1_target_id']['#options']) == 1) {
$form['field_news_terms_1_target_id']['#access'] = FALSE;
}
if(count($form['field_news_terms_1_target_id_1']['#options']) == 1) {
$form['field_news_terms_1_target_id_1']['#access'] = FALSE;
}
}
}
......@@ -98,5 +98,14 @@ jQuery(document).ready(function(){
jQuery('#header-logos-mobile .dep-logo img').replaceWith('<img src="/themes/asc_bootstrap/images/logos/demo-logos/department-logo-mobile.svg"/>');
});
//clear search box on people directory on user focus
jQuery('#views-exposed-form-people-directory-page-1 #edit-combine').focus(function(){
jQuery('#edit-combine').val('');
jQuery(this).blur(function(){
jQuery('#views-exposed-form-people-directory-page-1').submit();
});
});
});
......@@ -45,6 +45,7 @@
* @see template_process()
*/
#}
<div class="footer-address">
<h3>Contact Us</h3>
<p>
......@@ -71,9 +72,10 @@
</div>
<div class="footer-email">
<p>E-Mail: <a href"mailto:{{ site_mail }}">{{ site_mail }}</a></p>
<p>E-Mail: <a href"{{ site_mail }}">{{ site_mail }}</a></p>
</div>
{% if content.field_phone.0 or content.field_fax.0 %}
<div class="footer-phone">
<p>
{% if content.field_phone.0 %}
......@@ -85,3 +87,4 @@
{% endif %}
</p>
</div>
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment