|
| 1 | +# Formulaire |
| 2 | + |
| 3 | +Il est possible, une fois que le fichier de validation est fait de generer le fichier de configuration pour l'interface de validation |
| 4 | + |
| 5 | +## Principe |
| 6 | + |
| 7 | +Les fichiers de configurations pour l'interface d'administration sont dans configs/sesame-orchestrator/jsonforms. |
| 8 | + |
| 9 | +LE nommage de ses fichiers est le suivant [schema].ui.yml. La presence du fichier ajoutera un onglet dans l'identité. |
| 10 | + |
| 11 | +## Format |
| 12 | + |
| 13 | +Le format du fichier de formulaire respecte la norme [JSONFORMS](https://jsonforms.io/docs/uischema/) |
| 14 | + |
| 15 | +Le fichier peut être ecrit dans un format YML ou JSON. |
| 16 | + |
| 17 | +Après l installation deux fichiers sont présents inetorgperson.ui.yml et supannPerson.ui.yml |
| 18 | + |
| 19 | +Fichier inetorgperson.ui.yml |
| 20 | + |
| 21 | +``` |
| 22 | +type: Group |
| 23 | +label: Identité |
| 24 | +elements: |
| 25 | +- type: HorizontalLayout |
| 26 | + elements: |
| 27 | + - type: Control |
| 28 | + label: UID |
| 29 | + scope: "#/properties/uid" |
| 30 | + options: |
| 31 | + required: true |
| 32 | + - type: Control |
| 33 | + label: CN |
| 34 | + scope: "#/properties/cn" |
| 35 | + options: |
| 36 | + required: true |
| 37 | + readOnly: true |
| 38 | + - type: Control |
| 39 | + label: Nom |
| 40 | + scope: "#/properties/sn" |
| 41 | + options: |
| 42 | + readOnly: true |
| 43 | + required: true |
| 44 | +- type: HorizontalLayout |
| 45 | + elements: |
| 46 | + - type: Control |
| 47 | + label: Nom d'affichage |
| 48 | + scope: "#/properties/displayName" |
| 49 | + options: |
| 50 | + readOnly: true |
| 51 | + - type: Control |
| 52 | + label: Prénom |
| 53 | + scope: "#/properties/givenName" |
| 54 | + options: |
| 55 | + readOnly: true |
| 56 | +- type: HorizontalLayout |
| 57 | + elements: |
| 58 | + - type: Control |
| 59 | + label: Email |
| 60 | + scope: "#/properties/mail" |
| 61 | + options: |
| 62 | + format: email |
| 63 | + - type: Control |
| 64 | + label: Mobile |
| 65 | + scope: "#/properties/mobile" |
| 66 | + options: |
| 67 | + readOnly: true |
| 68 | + - type: Control |
| 69 | + label: Adresse postale |
| 70 | + scope: "#/properties/postalAddress" |
| 71 | + options: |
| 72 | + readOnly: true |
| 73 | +- type: HorizontalLayout |
| 74 | + elements: |
| 75 | + - type: Control |
| 76 | + label: language préféré |
| 77 | + scope: "#/properties/preferredLanguage" |
| 78 | + options: |
| 79 | + required: false |
| 80 | + suggestion: |
| 81 | + - FR |
| 82 | + - EN |
| 83 | + - DE |
| 84 | + - IT |
| 85 | + - type: Control |
| 86 | + label: Téléphone |
| 87 | + scope: "#/properties/telephoneNumber" |
| 88 | + options: |
| 89 | + readOnly: true |
| 90 | + - type: Control |
| 91 | + label: Titre |
| 92 | + scope: "#/properties/title" |
| 93 | +``` |
| 94 | + |
| 95 | +Un élement est composé de : |
| 96 | + |
| 97 | +* type : Control |
| 98 | +* label : Label affiché au dessus du champ |
| 99 | +* scope : La référence vers le champs de l'identité sous la forme '#/properties/[Champ] |
| 100 | +* options : les options de l'élement. Les options dependent du type de champ |
| 101 | + |
| 102 | + |
| 103 | +## Exemple |
| 104 | + |
| 105 | +Pour afficher les champs que nous avons défini dans l'exemple de la configuration des champs et validation, nou créons un fichier configs/sesame-orchestrator/jsonforms/sogxuser.ui.yml |
| 106 | + |
| 107 | +``` |
| 108 | +type: Group |
| 109 | +label: Messagerie |
| 110 | +elements: |
| 111 | + - type: HorizontalLayout |
| 112 | + elements: |
| 113 | + - type: Control |
| 114 | + label: Actif(1)/Inactif(0) |
| 115 | + scope: "#/properties/sogxdisableflag" |
| 116 | + options: |
| 117 | + required: true |
| 118 | + suggestion: |
| 119 | + - "0" |
| 120 | + - "1" |
| 121 | + - type: Control |
| 122 | + label: Quota |
| 123 | + scope: "#/properties/sogxquota" |
| 124 | + options: |
| 125 | + showUnfocusedDescription: false |
| 126 | + |
| 127 | +``` |
| 128 | +Nous retrouvons nos deux champs sogxdisableflag et sogxquota dans ce fichier |
0 commit comments