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:
parent
1599c77062
commit
6750744c6b
1 changed files with 32 additions and 1 deletions
|
@ -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() }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue