Skip to content

Commit

Permalink
add languages buttons + disclaimer
Browse files Browse the repository at this point in the history
  • Loading branch information
lapineige authored Apr 23, 2024
1 parent 1599c77 commit d6d45ea
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion tools/app_generator/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,38 @@
{% block content %}
<div class="container" style="max-width: 800px;">
<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">
{{ main_form.hidden_tag() }}
Expand Down Expand Up @@ -252,6 +283,7 @@ <h2 class="panel-title collapse-title">{{ gettext("8/9 - General and advanced do
<div class="panel-body collapsible collapsed">
<p><i>{{ gettext("A more complete presentation that the summary completed above, explaining to what correspond the software, the eventual warnings and specific details on its functioning in Yunohost (it's the place where one can warn about integration issues).") }}</i></p>
{{ form_field(main_form.description) }}
{{ form_field(main_form.disclaimer) }}

<p><i>{{ gettext("Indications to show at key steps to manage the package : installation, update, message to the admin account. You usually don't have to fill them.") }}</i></p>
{{ form_field(main_form.pre_install) }}
Expand Down

0 comments on commit d6d45ea

Please sign in to comment.