mirror of
https://github.com/rystaf/mlmym.git
synced 2024-11-23 05:52:12 +00:00
53 lines
1.9 KiB
HTML
53 lines
1.9 KiB
HTML
{{ $c := .Community }}
|
|
<form class="create" method="POST" {{ if eq .Op "edit_community" }} action="./" {{ end }} enctype="multipart/form-data">
|
|
<div>
|
|
<label class="required" for="name">name</label>
|
|
<input type="text" required name="name" id="name" {{ if $c }}value="{{ $c.CommunityView.Community.Name }}" disabled{{end}}>
|
|
</div>
|
|
<div>
|
|
<label class="required" for="title">display name</label>
|
|
<input type="text" name="title" id="title" value="{{ if $c }}{{ $c.CommunityView.Community.Title }}{{end}}">
|
|
</div>
|
|
<div>
|
|
<label for="icon">icon</label>
|
|
{{ if and $c $c.CommunityView.Community.Icon.IsValid }}
|
|
<img src="{{$c.CommunityView.Community.Icon.String}}">
|
|
{{ end }}
|
|
<input type="file" name="icon" accept="image/*">
|
|
</div>
|
|
<div>
|
|
<label for="banner">banner</label>
|
|
{{ if and $c $c.CommunityView.Community.Banner.IsValid }}
|
|
<img src="{{$c.CommunityView.Community.Banner.String}}">
|
|
{{ end }}
|
|
<input type="file" name="banner" accept="image/*">
|
|
</div>
|
|
<div>
|
|
<label for="description">sidebar</label>
|
|
<textarea name="description" id="description">
|
|
{{- if and $c $c.CommunityView.Community.Description.IsValid -}}
|
|
{{ $c.CommunityView.Community.Description.String }}
|
|
{{- end -}}
|
|
</textarea>
|
|
</div>
|
|
<div>
|
|
<label for="languages">languages</label>
|
|
warning: if you deselect Undetermined, you will not see most content.<br>
|
|
<select name="languages" id="languages" multiple>
|
|
{{ range $language := .Site.AllLanguages }}
|
|
<option value="{{ .ID }}"{{ if eq .ID 0 }} selected{{ end }}>{{ .Name }}</option>
|
|
{{end}}
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label>nsfw<input type="checkbox" name="nsfw"></label>
|
|
</div>
|
|
{{ if eq .Op "create_community" }}
|
|
<input type="submit" name="submit" value="submit">
|
|
<input type="hidden" name="op" value="create_community">
|
|
{{ else }}
|
|
<input type="submit" name="submit" value="save">
|
|
<input type="hidden" name="op" value="edit_community">
|
|
{{ end }}
|
|
</form>
|