mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-25 00:50:31 +00:00
65 lines
No EOL
3 KiB
HTML
65 lines
No EOL
3 KiB
HTML
{{template "base" .}}
|
|
|
|
{{define "title"}}{{.Title}}{{end}}
|
|
|
|
{{define "page_body"}}
|
|
<div class="card shadow mb-4">
|
|
<div class="card-header py-3">
|
|
<h6 class="m-0 font-weight-bold text-primary">{{.Title}}</h6>
|
|
</div>
|
|
<div class="card-body">
|
|
{{if .Error}}
|
|
<div class="card mb-4 border-left-warning">
|
|
<div class="card-body text-form-error">{{.Error}}</div>
|
|
</div>
|
|
{{end}}
|
|
{{if eq .Mode 3}}
|
|
<div class="card mb-4 border-left-info">
|
|
<div class="card-body">
|
|
Generate a data provider independent JSON file to create new folders or update existing ones.
|
|
<br>
|
|
The following placeholder is supported:
|
|
<br><br>
|
|
<ul>
|
|
<li><span class="text-success">%name%</span> will be replaced with the specified folder name</li>
|
|
</ul>
|
|
The generated folders file can be imported from the "Maintenance" section.
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
<form id="folder_form" action="{{.CurrentURL}}" method="POST" autocomplete="off" {{if eq .Mode 3}}target="_blank"{{end}}>
|
|
{{if eq .Mode 3}}
|
|
<div class="form-group row">
|
|
<label for="idFolders" class="col-sm-2 col-form-label">Folders</label>
|
|
<div class="col-sm-10">
|
|
<textarea class="form-control" id="idFolders" name="folders" rows="5" required
|
|
aria-describedby="foldersHelpBlock"></textarea>
|
|
<small id="foldersHelpBlock" class="form-text text-muted">
|
|
Specify the folder names, one for line.
|
|
</small>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" name="name" id="idFolderName" value="{{.Folder.Name}}">
|
|
{{else}}
|
|
<div class="form-group row">
|
|
<label for="idFolderName" class="col-sm-2 col-form-label">Name</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" id="idFolderName" name="name" placeholder=""
|
|
value="{{.Folder.Name}}" maxlength="255" autocomplete="nope" required {{if ge .Mode 2}}readonly{{end}}>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
<div class="form-group row">
|
|
<label for="idMappedPath" class="col-sm-2 col-form-label">Absolute Path</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" id="idMappedPath" name="mapped_path" placeholder=""
|
|
value="{{.Folder.MappedPath}}" maxlength="512" autocomplete="nope" required>
|
|
</div>
|
|
</div>
|
|
|
|
<input type="hidden" name="_form_token" value="{{.CSRFToken}}">
|
|
<button type="submit" class="btn btn-primary float-right mt-3 px-5 px-3">{{if eq .Mode 3}}Generate and export folders{{else}}Submit{{end}}</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{{end}} |