Skip to content

Commit

Permalink
Update footer to add second address line
Browse files Browse the repository at this point in the history
  • Loading branch information
occupant committed May 30, 2023
1 parent bef07a3 commit 1da7793
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kraken.theme
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ function kraken_preprocess_page(&$variables)
// Footer options.
$variables['unitname_footer'] = theme_get_setting('clf_unitname_footer');
$variables['address_option'] = theme_get_setting('clf_streetaddr');
$variables['clf_streetaddr_line2'] = theme_get_setting('clf_streetaddr_line2');
$variables['locality_option'] = theme_get_setting('clf_locality');
$variables['region_option'] = theme_get_setting('clf_region');
$variables['country_option'] = theme_get_setting('clf_country');
Expand All @@ -363,6 +364,7 @@ function kraken_preprocess_page(&$variables)
$variables['website_option'] = theme_get_setting('clf_website');
$variables['subunit_name'] = theme_get_setting('clf_subunitname');
$variables['address2_option'] = theme_get_setting('clf_streetaddr2');
$variables['clf_streetaddr2_line2'] = theme_get_setting('clf_streetaddr2_line2');
$variables['locality2_option'] = theme_get_setting('clf_locality2');
$variables['region2_option'] = theme_get_setting('clf_region2');
$variables['country2_option'] = theme_get_setting('clf_country2');
Expand Down
1 change: 1 addition & 0 deletions templates/includes/footer.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
{% endif %}
<p class="text-xs md--text-sm xl--text-base">
{% if address_option %}{{ address_option }}<br />{% endif %}
{% if clf_streetaddr_line2 %}{{clf_streetaddr_line2 }}<br />{% endif %}
{% if locality_option or region_option or country_option or postal_option %}
<span>
{% if locality_option %}{{ locality_option }},
Expand Down
2 changes: 2 additions & 0 deletions templates/includes/footer.unit.cluster.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
{% endif %}
<p class="mt-0 text-xs md--text-sm xl--text-base">
{% if address_option %}{{ address_option }}<br />{% endif %}
{% if clf_streetaddr_line2 %}{{clf_streetaddr_line2 }}<br />{% endif %}
{% if locality_option or region_option or country_option or postal_option %}
<span>
{% if locality_option %}{{ locality_option }},
Expand Down Expand Up @@ -36,6 +37,7 @@
{% endif %}
<p class="mt-0 text-xs md--text-sm xl--text-base">
{% if address2_option %}{{ address2_option }}<br />{% endif %}
{% if clf_streetaddr2_line2 %}{{clf_streetaddr2_line2 }}<br />{% endif %}
{% if locality2_option or region2_option or country2_option or postal2_option %}
<span>
{% if locality2_option %}{{ locality2_option }},
Expand Down
2 changes: 2 additions & 0 deletions templates/includes/footer.unit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
{% endif %}
<p class="mt-0 text-xs md--text-sm xl--text-base">
{% if address_option %}{{ address_option }}<br />{% endif %}
{% if clf_streetaddr_line2 %}{{clf_streetaddr_line2 }}<br />{% endif %}
{% if locality_option or region_option or country_option or postal_option %}
<span>
{% if locality_option %}{{ locality_option }},
Expand Down Expand Up @@ -45,6 +46,7 @@
{% endif %}
<p class="mt-0 text-xs md--text-sm xl--text-base">
{% if address2_option %}{{ address2_option }}<br />{% endif %}
{% if clf_streetaddr2_line2 %}{{clf_streetaddr2_line2 }}<br />{% endif %}
{% if locality2_option or region2_option or country2_option or postal2_option %}
<span>
{% if locality2_option %}{{ locality2_option }},
Expand Down
2 changes: 2 additions & 0 deletions templates/includes/footer.unit.portfolio.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
{% endif %}
<p class="mt-0 text-xs md--text-sm xl--text-base">
{% if address_option %}{{ address_option }}<br />{% endif %}
{% if clf_streetaddr_line2 %}{{clf_streetaddr_line2 }}<br />{% endif %}
{% if locality_option or region_option or country_option or postal_option %}
<span>
{% if locality_option %}{{ locality_option }},
Expand Down Expand Up @@ -43,6 +44,7 @@
{% endif %}
<p class="mt-0 text-xs md--text-sm xl--text-base">
{% if address2_option %}{{ address2_option }}<br />{% endif %}
{% if clf_streetaddr2_line2 %}{{clf_streetaddr2_line2 }}<br />{% endif %}
{% if locality2_option or region2_option or country2_option or postal2_option %}
<span>
{% if locality2_option %}{{ locality2_option }},
Expand Down
2 changes: 2 additions & 0 deletions templates/includes/footer.unit.research.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
{% endif %}
<p class="mt-0 text-xs md--text-sm xl--text-base">
{% if address_option %}{{ address_option }}<br />{% endif %}
{% if clf_streetaddr_line2 %}{{clf_streetaddr_line2 }}<br />{% endif %}
{% if locality_option or region_option or country_option or postal_option %}
<span>
{% if locality_option %}{{ locality_option }},
Expand Down Expand Up @@ -94,6 +95,7 @@
{% endif %}
<p class="mt-0 text-xs md--text-sm xl--text-base">
{% if address2_option %}{{ address2_option }}<br />{% endif %}
{% if clf_streetaddr2_line2 %}{{clf_streetaddr2_line2 }}<br />{% endif %}
{% if locality2_option or region2_option or country2_option or postal2_option %}
<span>
{% if locality2_option %}{{ locality2_option }},
Expand Down
16 changes: 16 additions & 0 deletions theme-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,14 @@ function kraken_form_system_theme_settings_alter(&$form, FormStateInterface &$fo
'#maxlength' => 128,
];

$form['vpr']['clf_streetaddr2_line2'] = [
'#type' => 'textfield',
'#title' => t('Street Address, Line 2'),
'#default_value' => theme_get_setting('clf_streetaddr2_line2'),
'#size' => 60,
'#maxlength' => 128,
];

$form['vpr']['clf_locality2'] = [
'#type' => 'textfield',
'#title' => t('City'),
Expand Down Expand Up @@ -541,6 +549,14 @@ function kraken_form_system_theme_settings_alter(&$form, FormStateInterface &$fo
'#maxlength' => 128,
];

$form['location']['clf_streetaddr_line2'] = [
'#type' => 'textfield',
'#title' => t('Street Address, Line 2'),
'#default_value' => theme_get_setting('clf_streetaddr_line2'),
'#size' => 60,
'#maxlength' => 128,
];

$form['location']['clf_locality'] = [
'#type' => 'textfield',
'#title' => t('City'),
Expand Down

0 comments on commit 1da7793

Please sign in to comment.