diff options
author | Alex Auvolat <alex@adnab.me> | 2020-02-09 23:04:27 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-02-09 23:04:27 +0100 |
commit | fa96e61d75127d087b776c69df4dadd90197e4e3 (patch) | |
tree | bffa0b851431bcd31e88b4dfe5c83933408be386 /templates | |
parent | e51bff05d225ce68143b0aefa282116fe5eb587f (diff) | |
download | guichet-fa96e61d75127d087b776c69df4dadd90197e4e3.tar.gz guichet-fa96e61d75127d087b776c69df4dadd90197e4e3.zip |
Add form to create objects
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin_create.html | 43 | ||||
-rw-r--r-- | templates/admin_ldap.html | 8 |
2 files changed, 51 insertions, 0 deletions
diff --git a/templates/admin_create.html b/templates/admin_create.html new file mode 100644 index 0000000..94dee5b --- /dev/null +++ b/templates/admin_create.html @@ -0,0 +1,43 @@ +{{define "title"}}Nouvel objet |{{end}} + +{{define "body"}} +<div class="d-flex"> + <h4>Créer un objet</h4> + <a class="ml-auto btn btn-info" href="/">Retour</a> +</div> + +{{if .Error}} + <div class="alert alert-danger mt-4">Impossible de créer l'objet. + <div style="font-size: 0.8em">{{ .Error }}</div> + </div> +{{end}} + +<form method="POST" class="mt-4"> + <div class="form-group"> + <label>Parent:</label> + <input type="text" disabled="true" class="form-control" value="{{ .SuperDN }}" /> + </div> + <div class="form-group"> + <label for="idvalue">Identifiant:</label> + <input type="text" id="idvalue" name="idvalue" class="form-control" value="{{ .IdValue }}" /> + </div> + <div class="form-group"> + <label for="idtype">Type d'identifiant:</label> + <input type="text" id="idtype" name="idtype" class="form-control" value="{{ .IdType }}" /> + </div> + <div class="form-group"> + <label for="displayname">Nom:</label> + <input type="text" id="displayname" name="displayname" class="form-control" value="{{ .DisplayName }}" /> + </div> + <div class="form-group"> + <label for="soc">StructuralObjectClass:</label> + <input type="text" id="soc" name="soc" class="form-control" value="{{ .StructuralObjectClass }}" /> + </div> + <div class="form-group"> + <label for="oc">ObjectClass:</label> + <textarea rows="5" id="oc" name="oc" class="form-control">{{ .ObjectClass }}</textarea> + </div> + <button type="submit" class="btn btn-primary">Créer l'objet</button> +</form> + +{{end}} diff --git a/templates/admin_ldap.html b/templates/admin_ldap.html index fa4b934..53570fe 100644 --- a/templates/admin_ldap.html +++ b/templates/admin_ldap.html @@ -21,6 +21,14 @@ </nav> </div> +<div class="mt-4"> + <div class="d-flex"> + <a class="ml-auto btn btn-sm btn-success" href="/admin/create/user/{{.DN}}">+utilisateur</a> + <a class="ml-4 btn btn-sm btn-success" href="/admin/create/group/{{.DN}}">+groupe</a> + <a class="ml-4 btn btn-sm btn-success" href="/admin/create/generic/{{.DN}}">+objet</a> + </div> +</div> + <table class="table mt-4"> <tbody> {{range .Children}} |