mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-25 00:50:31 +00:00
template fsconfig.html: using string provider name in onFilesystemChanged()
This commit is contained in:
parent
fd4c388b23
commit
13f23838a1
3 changed files with 8 additions and 8 deletions
|
@ -99,7 +99,7 @@
|
|||
{{define "extra_js"}}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
onFilesystemChanged('{{.Folder.FsConfig.Provider}}');
|
||||
onFilesystemChanged('{{.Folder.FsConfig.Provider.Name}}');
|
||||
|
||||
$("body").on("click", ".add_new_tpl_folder_field_btn", function () {
|
||||
var index = $(".form_field_tpl_folders_outer").find(".form_field_tpl_folder_outer_row").length;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<select class="form-control" id="idFilesystem" name="fs_provider"
|
||||
onchange="onFilesystemChanged(this.value)">
|
||||
{{ range ListFSProviders }}
|
||||
<option value="{{.}}" {{if eq . $.Provider }}selected{{end}}>{{.ShortInfo}}</option>
|
||||
<option value="{{.Name}}" {{if eq . $.Provider }}selected{{end}}>{{.ShortInfo}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
</div>
|
||||
|
@ -322,17 +322,17 @@
|
|||
$('.form-group.sftp').hide();
|
||||
|
||||
// enable the ones matching the selected vfs provider
|
||||
if (val == '1'){
|
||||
if (val == 's3fs'){
|
||||
$('.form-group.row.s3').show();
|
||||
} else if (val == '2'){
|
||||
} else if (val == 'gcsfs'){
|
||||
$('.form-group.row.gcs').show();
|
||||
$('.form-group.gcs').show();
|
||||
} else if (val == '3'){
|
||||
} else if (val == 'azblobfs'){
|
||||
$('.form-group.row.azblob').show();
|
||||
$('.form-group.azblob').show();
|
||||
} else if (val == '4'){
|
||||
} else if (val == 'cryptfs'){
|
||||
$('.form-group.crypt').show();
|
||||
} else if (val == '5'){
|
||||
} else if (val == 'sftpfs'){
|
||||
$('.form-group.sftp').show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -635,7 +635,7 @@
|
|||
return true;
|
||||
});
|
||||
|
||||
onFilesystemChanged('{{.User.FsConfig.Provider}}');
|
||||
onFilesystemChanged('{{.User.FsConfig.Provider.Name}}');
|
||||
|
||||
$("body").on("click", ".add_new_pk_field_btn", function () {
|
||||
var index = $(".form_field_pk_outer").find(".form_field_pk_outer_row").length;
|
||||
|
|
Loading…
Reference in a new issue