117 lines
4.9 KiB
Cheetah
117 lines
4.9 KiB
Cheetah
{{define "title"}}Modifier l'app - Administration - Arcad{{end}}
|
|
{{define "body"}}
|
|
{{template "header" .}}
|
|
<section class="is-fullheight section">
|
|
<div class="container">
|
|
<div class="columns">
|
|
<div class="column is-2">
|
|
{{template "admin_menu" ""}}
|
|
</div>
|
|
<div class="column is-10">
|
|
{{template "flash" .}}
|
|
<div class="level">
|
|
<div class="level-left">
|
|
<a class="button level-item" href="/admin/apps">← Retour</a>
|
|
</div>
|
|
<div class="level-right"></div>
|
|
</div>
|
|
<form class="has-margin-top-small" action="/admin/apps/{{ .App.ID }}" method="post">
|
|
<div class="columns">
|
|
<div class="column is-12">
|
|
<div class="level">
|
|
<div class="level-left">
|
|
<h5 class="is-size-5 level-item">Informations de l'app</h5>
|
|
</div>
|
|
<div class="level-right">
|
|
<div class="field level-item">
|
|
<input id="publishedSwitch" type="checkbox" name="published" class="switch" {{if .IsPublished}}checked="checked"{{end}} />
|
|
<label for="publishedSwitch">Publiée ?</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<label class="label">Identifiant</label>
|
|
<div class="control">
|
|
<p class="input">{{ .App.ID }}</p>
|
|
<p class="helper">Non modifiable</p>
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<label class="label">Titre</label>
|
|
<div class="control">
|
|
<input class="input" type="text"
|
|
name="title"
|
|
value="{{if .Form}}{{ .Form.Get "title" }}{{else}}{{ .App.Manifest.Title }}{{end}}">
|
|
<label className="checkbox is-right">
|
|
<input type="checkbox" name="resetTitle" />
|
|
Réinitialiser la valeur par défaut ?
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<label class="label">Description</label>
|
|
<div class="control">
|
|
<textarea class="textarea"
|
|
name="description">{{if .Form}}{{ .Form.Get "description" }}{{else}}{{ .App.Manifest.Description }}{{end}}</textarea>
|
|
<label className="checkbox is-right">
|
|
<input type="checkbox" name="resetDescription" />
|
|
Réinitialiser la valeur par défaut ?
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<label class="label">Ordre d'affichage</label>
|
|
<div class="control">
|
|
<input class="input" type="number"
|
|
step="1"
|
|
min="0"
|
|
name="order"
|
|
value="{{if .Form}}{{ .Form.Get "order" }}{{else}}{{ .App.Order }}{{end}}">
|
|
<label className="checkbox is-right">
|
|
<input type="checkbox" name="resetOrder" />
|
|
Réinitialiser la valeur par défaut ?
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="field" data-controller="tags-editor">
|
|
<label class="label">Tags</label>
|
|
<div class="control">
|
|
<div class="field has-addons">
|
|
<div class="control">
|
|
<input class="input is-small" type="text" placeholder="Nouveau tag" data-target="tags-editor.newTag">
|
|
</div>
|
|
<div class="control">
|
|
<a class="button is-small is-info has-text-bold" data-action="click->tags-editor#onAddTag">
|
|
+
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="tags" data-target="tags-editor.tagsContainer"></div>
|
|
<input class="input is-hidden" type="text"
|
|
data-target="tags-editor.tagsSource"
|
|
name="tags"
|
|
value="{{if .Form}}{{ .Form.Get "tags" }}{{else}}{{range .App.Manifest.Tags}}{{.}},{{end}}{{end}}" />
|
|
<label className="checkbox is-right">
|
|
<input type="checkbox" name="resetOrder" />
|
|
Réinitialiser la valeur par défaut ?
|
|
</label>
|
|
</div>
|
|
</div>
|
|
{{ .csrfField }}
|
|
<div class="buttons" style="justify-content:flex-end">
|
|
<button type="submit" class="button is-primary is-normal">Modifier</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{{end}}
|
|
|
|
{{define "body_script"}}
|
|
<script defer src="/admin.js"></script>
|
|
{{end}}
|
|
|
|
{{template "base" .}} |