working sections version
This commit is contained in:
parent
16ea95bf09
commit
9424084a36
28 changed files with 367 additions and 251 deletions
|
|
@ -9,30 +9,31 @@
|
|||
<div class="form-group">
|
||||
<label class="col-form-label" for="section">Section</label>
|
||||
<select class="form-control input-sm" id="section" name="section" required>
|
||||
<option>wiki</option>
|
||||
<option>{{.User}}</option>
|
||||
{{range $section, $selected := .Data.Sections}}
|
||||
{{if $selected}}
|
||||
<option value="{{$section}}" selected>{{$section}}</option>
|
||||
{{else}}
|
||||
<option value="{{$section}}">{{$section}}</option>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label" for="title">Title</label>
|
||||
<input class="form-control input-sm" type="text" id="title" name="title" placeholder="Title" value="{{.Data.Title}}" spellcheck="false" autocomplete="off" autofocus required>
|
||||
<input class="form-control input-sm" type="text" id="title" name="title" placeholder="Title" value="{{.Data.Page.Title}}" spellcheck="false" autocomplete="off" autofocus required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label" for="markdown">Markdown</label>
|
||||
<textarea class="form-control input-sm md-text" id="markdown" name="markdown" rows="30" spellcheck="false">{{.Data.Markdown}}</textarea>
|
||||
<textarea class="form-control input-sm md-text" id="markdown" name="markdown" rows="30" spellcheck="false">{{.Data.Page.Markdown}}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-radio">
|
||||
<input type="radio" id="perm1" name="perm" value="1" class="custom-control-input" {{if eq .Data.Perm 1}}checked=""{{end}}>
|
||||
<input type="radio" id="perm1" name="perm" value="1" class="custom-control-input" {{if eq .Data.Page.Perm 1}}checked=""{{end}}>
|
||||
<label class="custom-control-label" for="perm1">Public</label>
|
||||
</div>
|
||||
<div class="custom-control custom-radio">
|
||||
<input type="radio" id="perm2" name="perm" value="2" class="custom-control-input" {{if eq .Data.Perm 2}}checked=""{{end}}>
|
||||
<label class="custom-control-label" for="perm2">Internal</label>
|
||||
</div>
|
||||
<div class="custom-control custom-radio">
|
||||
<input type="radio" id="perm3" name="perm" value="3" class="custom-control-input" {{if eq .Data.Perm 3}}checked=""{{end}}>
|
||||
<label class="custom-control-label" for="perm3">Private</label>
|
||||
<input type="radio" id="perm2" name="perm" value="2" class="custom-control-input" {{if eq .Data.Page.Perm 2}}checked=""{{end}}>
|
||||
<label class="custom-control-label" for="perm2">Private</label>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-sm btn-primary" type="submit">Create</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue