parametres_lemonldap.html 43 lignes · 3876 octets
{% import "components/actions.html" as a %}
{% import "components/bouton.html" as b %}
{% import "components/modal.html" as modal %}
{# E-009 cadre (étape 8) et E-023 Applications SSO de LemonLDAP::NG (OI-094) #}
<form id="form-parametres" class="flex flex-col gap-xl" hx-post="{{ action }}" hx-target="this" hx-swap="outerHTML"
      hx-disabled-elt="find button[type=submit]" hx-disinherit="hx-disabled-elt hx-target hx-swap" novalidate>
  {# E009-C1 #}
  <p class="text-sm text-foreground"><span class="font-semibold">{{ entete }}</span>
    · <a href="{{ open_iam_commun::documentation::SITE }}/" class="text-primary underline-offset-4 hover:underline">guide « Ajouter une application »</a></p>
  <section class="flex flex-col gap-md" aria-labelledby="titre-applications">
    <h2 id="titre-applications" class="text-lg text-foreground">Applications</h2>
    {% if fige %}<p class="border-l-4 border-l-info bg-info-bg p-md text-sm text-foreground">Fixé à l'installation : les applications d'un portail déjà installé se modifient dans le Manager de LemonLDAP::NG.</p>{% endif %}
    {{ applications|safe }}
    {% if !fige %}<button type="button" class="{% call b::classes("outline") %}{% endcall %} self-start" x-data="ouvreDialogue" data-dialogue="dialogue-application" x-on:click="ouvrir"
            hx-get="/install/parametres/lemonldap/applications/nouvelle" hx-target="#dialogue-application-corps" hx-swap="innerHTML">Ajouter une application</button>{% endif %}
  </section>
  {# OI-097 : origine des paquets de LemonLDAP::NG (D-051 amendée) #}
  <fieldset class="flex flex-col gap-xs"{% if fige %} disabled{% endif %}>
    <legend class="text-lg text-foreground">Source des paquets</legend>
    {% if let Some(e) = erreurs.get("source") %}<p id="erreur-source" class="text-sm text-error-ink" role="alert">{{ e }}</p>{% endif %}
    <label class="flex items-start gap-xs text-sm text-foreground"><input type="radio" name="source" value="editeur"{% if source == "editeur" %} checked{% endif %} class="mt-xxs accent-primary">
      <span>Dépôt de l'éditeur (recommandé)<span class="block text-xs text-muted-foreground">lemonldap-ng.org, clé de signature épinglée : la dernière version stable, corrigée au plus tôt.</span></span></label>
    <label class="flex items-start gap-xs text-sm text-foreground"><input type="radio" name="source" value="distribution"{% if source == "distribution" %} checked{% endif %} class="mt-xxs accent-primary">
      <span>Dépôt de la distribution<span class="block text-xs text-muted-foreground">Paquets de Debian ou d'Ubuntu, mis à jour avec le système.</span></span></label>
    {% if fige %}<p class="text-xs text-muted-foreground">Fixé à l'installation.</p>{% endif %}
  </fieldset>
  {# E023-C8, E023-C9 #}
  <section class="rounded-sm bg-muted p-md text-sm text-graphite" aria-labelledby="titre-attributs">
    <h2 id="titre-attributs" class="text-sm text-title-ink">Attributs transmis à chaque application</h2>
    <ul class="mt-xs flex flex-wrap gap-x-lg gap-y-xxs">
      {% for (attribut, claim) in attributs %}<li><code class="font-mono">{{ attribut }}</code> (claim <code class="font-mono">{{ claim }}</code>)</li>{% endfor %}
    </ul>
  </section>
  <p class="border-l-4 border-l-info bg-info-bg p-md text-sm text-foreground">L'identifiant et le secret de chaque application OIDC seront dans le fichier récapitulatif, montrés une seule fois.</p>
  {% call a::actions(precedent) %}{% endcall %}
</form>
<dialog id="dialogue-application" aria-labelledby="dialogue-application-titre" class="{% call modal::classes_dialogue() %}{% endcall %}"
        x-data="dialogueHote" x-on:application-enregistree.window="fermer">
  {% call modal::entete("dialogue-application", "Application") %}{% endcall %}
  <div id="dialogue-application-corps" class="mt-md">
    {{ formulaire|safe }}
  </div>
</dialog>