{% macro form_errors(form, hiddens=True) %} {%- if form.errors %} {%- for fieldname, errors in form.errors.items() %} {%- if is_hidden_field(form[fieldname]) and hiddens or not is_hidden_field(form[fieldname]) and hiddens != 'only' %} {%- for error in errors %}

{{error}}

{%- endfor %} {%- endif %} {%- endfor %} {%- endif %} {%- endmacro %} {% macro form_field(field) %} {% if field.widget.input_type == 'checkbox' %}
{%- if field.description -%}

{{field.description|safe}}

{%- endif %}
{%- elif field.type == 'RadioField' -%} {% for item in field -%}
{% endfor %} {% else -%}
{{field.label(class="control-label")|safe}} {% if field.type == 'FileField' %} {{field(**kwargs)|safe}} {% else %} {{field(class="form-control", **kwargs)|safe}} {% endif %} {%- if field.errors %} {%- for error in field.errors %}

{{error}}

{%- endfor %} {%- elif field.description -%}

{{field.description|safe}}

{%- endif %}
{% endif %} {% endmacro %} {% extends "base.html" %} {% block main %}
YunoHost application logo

{{ _("YunoHost package generator") }}

Version: {{ config["GENERATOR_VERSION"] }}

{% for lang_id, lang_label in config["LANGUAGES"].items() %} {% endfor %}
{{ main_form.hidden_tag() }}
{% if main_form.errors %}

{{ _("The form contains issues") }}

{% endif %} {{ form_errors(main_form, hiddens="only") }}

{{ form_field(main_form.generator_mode) }}

{{ _("1/9 - General information") }}

{{ form_field(main_form.app_name) }} {{ form_field(main_form.app_id) }} {{ form_field(main_form.description_en) }} {{ form_field(main_form.description_fr) }}

{{ _("2/9 - Upstream information") }}

{{ _("The word 'upstream' refers to the original project that develops and maintains the app") }}

{{ form_field(main_form.license) }} {{ form_field(main_form.website) }} {{ form_field(main_form.demo) }} {{ form_field(main_form.admindoc) }} {{ form_field(main_form.userdoc) }} {{ form_field(main_form.code) }}

{{ _("3/9 - Integration in YunoHost") }}

{{ form_field(main_form.version) }} {{ form_field(main_form.maintainers) }} {{ form_field(main_form.multi_instance) }} {{ form_field(main_form.architectures) }} {{ form_field(main_form.ldap) }} {{ form_field(main_form.sso) }}

{{ _("4/9 - Questions to ask during installation") }}

{{ _("This part is meant to indicate the questions that will be asked.") }}
{{ _("NB: only standard questions are asked here, it might be required to complete it by hand using other questions as a guide.") }}

{{ form_field(main_form.domain_and_path) }} {{ form_field(main_form.init_main_permission) }} {{ form_field(main_form.init_admin_permission) }} {{ form_field(main_form.language) }}

{{ _("5/9 - Resources to initialize") }}

{{ _("Technical elements configured before launching the 'real' app install script. Usually : creating a system user, downloading app sources, initialiser le dossier d'install et de données, install apt dependencies, create a database, ...") }}

Sources du logiciel

{{ form_field(main_form.source_url) }} {{ form_field(main_form.sha256sum) }} {{ form_field(main_form.auto_update) }}
{{ form_field(main_form.system_user) }} {{ form_field(main_form.install_dir) }} {{ form_field(main_form.data_dir) }} {{ form_field(main_form.apt_dependencies) }} {{ form_field(main_form.database) }}

{{ _("6/9 - Specific technology") }}

{{ form_field(main_form.main_technology) }}
{{ form_field(main_form.use_composer) }}
{{ form_field(main_form.nodejs_version) }} {{ form_field(main_form.use_yarn) }}
{{ form_field(main_form.install_snippet) }}
{{ form_field(main_form.systemd_execstart) }}

{{ _("7/9 - App configuration") }}

{{ form_field(main_form.use_custom_config_file) }}
{{ form_field(main_form.custom_config_file) }} {{ form_field(main_form.custom_config_file_content) }}

{{ _("8/9 - General and advanced documentation") }}

{{ form_field(main_form.description) }} {{ form_field(main_form.pre_install) }} {{ form_field(main_form.post_install) }} {{ form_field(main_form.pre_upgrade) }} {{ form_field(main_form.post_upgrade) }} {{ form_field(main_form.admin) }}

{{ _("9/9 - Advanced options") }}

{{ form_field(main_form.enable_change_url) }} {{ form_field(main_form.use_logrotate) }} {{ form_field(main_form.use_fail2ban) }} {{ form_field(main_form.fail2ban_regex) }} {{ form_field(main_form.use_cron) }} {{ form_field(main_form.cron_config_file) }}

{{ main_form.submit_preview(class="btn btn-primary") }} {{ main_form.submit_download(class="btn btn-primary") }}
{{ main_form.submit_demo(class="btn") }}


{% if generated_files %}

Code généré

{% for file in generated_files %}

{{ file.destination_path }}

{{ file.content }}
{% endfor %}
{% endif %} {% endblock %}