2022-05-11 21:38:20 +02:00
|
|
|
{{define "title"}}Modifier l'app - Administration - Arcad{{end}}
|
|
|
|
{{define "body"}}
|
|
|
|
{{template "header" .}}
|
2022-06-01 17:31:21 +02:00
|
|
|
<section class="block">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div>
|
2022-05-11 21:38:20 +02:00
|
|
|
{{template "admin_menu" ""}}
|
|
|
|
</div>
|
2022-06-01 17:31:21 +02:00
|
|
|
<div>
|
2022-05-11 21:38:20 +02:00
|
|
|
{{template "flash" .}}
|
2022-06-01 17:31:21 +02:00
|
|
|
<div>
|
|
|
|
<div>
|
2022-05-11 21:38:20 +02:00
|
|
|
<a class="button level-item" href="/admin/apps">← Retour</a>
|
|
|
|
</div>
|
|
|
|
<div class="level-right"></div>
|
|
|
|
</div>
|
2022-06-01 17:31:21 +02:00
|
|
|
<form action="/admin/apps/{{ .App.ID }}" method="post">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<h5 class="text-center text-gray-900 mt-4 text-xl font-medium font-bold mb-2">Informations de l'app</h5>
|
|
|
|
<div class="field level-item">
|
|
|
|
<input id="publishedSwitch" type="checkbox" name="published" class="" {{if .IsPublished}}checked="checked"{{end}} />
|
|
|
|
<label for="publishedSwitch">Publiée ?</label>
|
2022-05-11 21:38:20 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2022-06-01 17:31:21 +02:00
|
|
|
<label class="block text-gray-700 text-lg font-bold mb-2">Identifiant</label>
|
|
|
|
<div>
|
|
|
|
<p class="shadow appearance-none border focus:border-cyan-600 rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline">{{ .App.ID }}</p>
|
2022-05-11 21:38:20 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2022-06-01 17:31:21 +02:00
|
|
|
<label class="block text-gray-700 text-lg font-bold mb-2">Titre</label>
|
|
|
|
<div>
|
|
|
|
<input class="shadow appearance-none border focus:border-cyan-600 rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" type="text"
|
2022-05-11 21:38:20 +02:00
|
|
|
name="title"
|
|
|
|
value="{{if .Form}}{{ .Form.Get "title" }}{{else}}{{ .App.Manifest.Title }}{{end}}">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2022-06-01 17:31:21 +02:00
|
|
|
<label class="block text-gray-700 text-lg font-bold mb-2">Description</label>
|
|
|
|
<div>
|
|
|
|
<textarea class="h-64 focus:border-cyan-600 block w-full px-3 py-1.5 text-base font-normal text-gray-700 bg-white bg-clip-padding border border-solid border-gray-300 rounded transition ease-in-out m-0 focus:text-gray-700 focus:bg-white focus:outline-none"
|
2022-05-11 21:38:20 +02:00
|
|
|
name="description">{{if .Form}}{{ .Form.Get "description" }}{{else}}{{ .App.Manifest.Description }}{{end}}</textarea>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2022-06-01 17:31:21 +02:00
|
|
|
<label class="block text-gray-700 text-lg font-bold mb-2">Ordre d'affichage</label>
|
|
|
|
<div>
|
|
|
|
<input class="shadow appearance-none border focus:border-cyan-600 rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" type="number"
|
2022-05-11 21:38:20 +02:00
|
|
|
step="1"
|
|
|
|
min="0"
|
|
|
|
name="order"
|
|
|
|
value="{{if .Form}}{{ .Form.Get "order" }}{{else}}{{ .App.Order }}{{end}}">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field" data-controller="tags-editor">
|
2022-06-01 17:31:21 +02:00
|
|
|
<label class="block text-gray-700 text-lg font-bold mb-2">Tags</label>
|
|
|
|
<div>
|
2022-05-11 21:38:20 +02:00
|
|
|
<div class="field has-addons">
|
2022-06-01 17:31:21 +02:00
|
|
|
<div class="flex">
|
|
|
|
<input class="w-5/6 shadow appearance-none border focus:border-cyan-600 rounded-l w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" type="text" placeholder="Nouveau tag" data-target="tags-editor.newTag">
|
|
|
|
<a class="text-center w-1/6 text-white p-1 bg-cyan-600 text-bold rounded-r" data-action="click->tags-editor#onAddTag">
|
2022-05-11 21:38:20 +02:00
|
|
|
+
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-06-01 17:31:21 +02:00
|
|
|
<div class="hidden" data-target="tags-editor.tagsContainer"></div>
|
|
|
|
<input class="mt-4 shadow appearance-none border focus:border-cyan-600 rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" type="text"
|
2022-05-11 21:38:20 +02:00
|
|
|
data-target="tags-editor.tagsSource"
|
|
|
|
name="tags"
|
|
|
|
value="{{if .Form}}{{ .Form.Get "tags" }}{{else}}{{range .App.Manifest.Tags}}{{.}},{{end}}{{end}}" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ .csrfField }}
|
|
|
|
<div class="buttons" style="justify-content:flex-end">
|
2022-06-01 17:31:21 +02:00
|
|
|
<button type="submit" class="block m-auto mt-8 bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">Modifier</button>
|
2022-05-11 21:38:20 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{define "body_script"}}
|
|
|
|
<script defer src="/admin.js"></script>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{template "base" .}}
|