|
|
@@ -68,12 +68,33 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- {# Type-specific config : ynh_system (rien de spécifique) #}
|
|
|
- <div id="cfg-ynh_system" class="type-cfg hidden">
|
|
|
- <p class="text-sm text-gray-500 bg-gray-50 rounded-lg p-3">
|
|
|
- Sauvegarde la configuration système YunoHost complète.
|
|
|
- Aucun paramètre supplémentaire.
|
|
|
+ {# Type-specific config : ynh_system — sélection des hooks #}
|
|
|
+ {% set _sys_hooks = [
|
|
|
+ ('conf_ynh_settings', 'Paramètres YunoHost', false),
|
|
|
+ ('conf_ynh_firewall', 'Firewall', false),
|
|
|
+ ('conf_ssowat', 'Portail SSO', false),
|
|
|
+ ('conf_nginx', 'Nginx', false),
|
|
|
+ ('conf_ynh_certs', 'Certificats SSL', false),
|
|
|
+ ('conf_ynh_domain', 'Domaines', false),
|
|
|
+ ('conf_ynh_user', 'Utilisateurs LDAP', false),
|
|
|
+ ('data_home', 'Répertoires home /home/*', true),
|
|
|
+ ('data_mail', 'Courriers Dovecot', true),
|
|
|
+ ] %}
|
|
|
+ {% set _saved_hooks = (job.config_json | fromjson).get('hooks', []) if job and job.config_json and job.type == 'ynh_system' else [] %}
|
|
|
+ <div id="cfg-ynh_system" class="type-cfg hidden space-y-2">
|
|
|
+ <p class="text-xs text-gray-500 mb-2">
|
|
|
+ Tous cochés = sauvegarde complète. Décochez les hooks volumineux pour alléger l'archive.
|
|
|
</p>
|
|
|
+ {% for hook_id, hook_label, heavy in _sys_hooks %}
|
|
|
+ <div class="flex items-center gap-2">
|
|
|
+ <input type="checkbox" name="system_hooks" value="{{ hook_id }}" id="hook_{{ hook_id }}"
|
|
|
+ {% if not _saved_hooks or hook_id in _saved_hooks %}checked{% endif %}
|
|
|
+ class="rounded border-gray-300 text-blue-600">
|
|
|
+ <label for="hook_{{ hook_id }}" class="text-sm text-gray-700">
|
|
|
+ {{ hook_label }}{% if heavy %} <span class="text-xs text-amber-600 font-medium">(volumineux)</span>{% endif %}
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ {% endfor %}
|
|
|
</div>
|
|
|
|
|
|
{# Type-specific config : mysql #}
|