Skip to content

Commit

Permalink
Replace link with button
Browse files Browse the repository at this point in the history
  • Loading branch information
frcroth committed Jul 15, 2024
1 parent 18a0eab commit ff7c317
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 6 additions & 0 deletions myhpi/static/scss/footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
text-decoration: underline;
}
}

.btn-link {
color: var(--bs-text-light);
text-decoration: none;
padding: 0;
}
}

@media screen and (min-width: 576px) {
Expand Down
8 changes: 3 additions & 5 deletions myhpi/templates/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@
<div class="footer-category">
<h2>{% translate "Language" %}</h2>
{% for translation in page.get_translations %}
<form id="language-form-{{ translation.locale }}" action="{% url 'set_language' %}" method="post" style="display: none;">
<form id="language-form-{{ translation.locale }}" action="{% url 'set_language' %}" method="post">
{% csrf_token %}
<input name="next" type="hidden" value="{{ redirect_to }}">
<input name="next" type="hidden" value="{{ translation.url }}">
<input type="hidden" name="language" value="{{ translation.locale.language_code }}">
<button class="btn btn-link" type="submit">{{ translation.locale }}</button>
</form>
<a href="#" onclick="document.getElementById('language-form-{{ translation.locale }}').submit(); return false;">
{{ translation.locale }}
</a>
{% endfor %}
</div>
</div>
Expand Down

0 comments on commit ff7c317

Please sign in to comment.