nirvash/templates/file_mkdir.html

29 lines
748 B
HTML
Raw Permalink Normal View History

{{ $slug := ((.Context).Value "params").Slug }}
{{ $fileData := ((.Context).Value "file-manager").GetFileData $slug }}
{{ $csrfToken := (.Context).Value "csrfToken" }}
{{ template "header" . }}
{{ if ($fileData).Error }}
<h2>Error</h2>
<span class="adapter-error">{{($fileData).Error}}</span>
{{ else }}
<h2>Directory Creation</h2>
<form class="mkdir" method="POST" action="/mkdir-process/{{$slug}}">
<input hidden type="text" name="csrfToken" value="{{$csrfToken}}"/>
<span>Creating new directory in /{{$slug}}</span><br/>
<label for="dirname-input">New Directory Name</label>
<input required type="text" name="dirname" id="dirname-input"/>
<input type="submit" value="Create"/>
</form>
{{ end }}
{{ template "footer" . }}