1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

Yologen : add languages buttons + disclaimer (#2255)

Co-authored-by: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com>
This commit is contained in:
lapineige 2024-04-23 21:27:07 +02:00 committed by GitHub
parent 1599c77062
commit 6750744c6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,7 +34,38 @@ YunoHost app generator
{% block content %} {% block content %}
<div class="container" style="max-width: 800px;"> <div class="container" style="max-width: 800px;">
<h1 class="message text-center">{{ gettext("Yunohost application generation form") }}</h1> <h1 class="message text-center">{{ gettext("Yunohost application generation form") }}</h1>
<p style="text-align: center; margin-left:5%">Version: {{ generator_info['GENERATOR_VERSION'] }}</p> <p style="text-align: center">Version: {{ generator_info['GENERATOR_VERSION'] }}</p>
<!--
<script>/*
document.addEventListener('DOMContentLoaded', function() {
var selectField = document.getElementById('selectLanguage');
selectField.addEventListener('change', function() {
var lang = this.value;
// alert("Switching to language: "+ this.value);
if (lang != 'none') {
var url = window.location.href; // Get current URL
var newURL = url + '/language/' + lang
window.location.href = newURL
}
});
});
</script> -->
<script>
function changeLanguage(lang) {
var url = "{{ url_for('set_language', language=lang) }}" + lang;
window.location.href = url;
}
</script>
<div style="text-align:center">
{% for lang in AVAILABLE_LANGUAGES.items() %}
<button type="button" onclick="changeLanguage('{{ lang[0] }}')">{{ lang[1] }}</button>
{% endfor %}
</div>
<form id="main-form" class="form form-horizontal" method="POST" role="form"> <form id="main-form" class="form form-horizontal" method="POST" role="form">
{{ main_form.hidden_tag() }} {{ main_form.hidden_tag() }}