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"}}
|
{{define "extra_js"}}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
onFilesystemChanged('{{.Folder.FsConfig.Provider}}');
|
onFilesystemChanged('{{.Folder.FsConfig.Provider.Name}}');
|
||||||
|
|
||||||
$("body").on("click", ".add_new_tpl_folder_field_btn", function () {
|
$("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;
|
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"
|
<select class="form-control" id="idFilesystem" name="fs_provider"
|
||||||
onchange="onFilesystemChanged(this.value)">
|
onchange="onFilesystemChanged(this.value)">
|
||||||
{{ range ListFSProviders }}
|
{{ range ListFSProviders }}
|
||||||
<option value="{{.}}" {{if eq . $.Provider }}selected{{end}}>{{.ShortInfo}}</option>
|
<option value="{{.Name}}" {{if eq . $.Provider }}selected{{end}}>{{.ShortInfo}}</option>
|
||||||
{{end}}
|
{{end}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -322,17 +322,17 @@
|
||||||
$('.form-group.sftp').hide();
|
$('.form-group.sftp').hide();
|
||||||
|
|
||||||
// enable the ones matching the selected vfs provider
|
// enable the ones matching the selected vfs provider
|
||||||
if (val == '1'){
|
if (val == 's3fs'){
|
||||||
$('.form-group.row.s3').show();
|
$('.form-group.row.s3').show();
|
||||||
} else if (val == '2'){
|
} else if (val == 'gcsfs'){
|
||||||
$('.form-group.row.gcs').show();
|
$('.form-group.row.gcs').show();
|
||||||
$('.form-group.gcs').show();
|
$('.form-group.gcs').show();
|
||||||
} else if (val == '3'){
|
} else if (val == 'azblobfs'){
|
||||||
$('.form-group.row.azblob').show();
|
$('.form-group.row.azblob').show();
|
||||||
$('.form-group.azblob').show();
|
$('.form-group.azblob').show();
|
||||||
} else if (val == '4'){
|
} else if (val == 'cryptfs'){
|
||||||
$('.form-group.crypt').show();
|
$('.form-group.crypt').show();
|
||||||
} else if (val == '5'){
|
} else if (val == 'sftpfs'){
|
||||||
$('.form-group.sftp').show();
|
$('.form-group.sftp').show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -635,7 +635,7 @@
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
onFilesystemChanged('{{.User.FsConfig.Provider}}');
|
onFilesystemChanged('{{.User.FsConfig.Provider.Name}}');
|
||||||
|
|
||||||
$("body").on("click", ".add_new_pk_field_btn", function () {
|
$("body").on("click", ".add_new_pk_field_btn", function () {
|
||||||
var index = $(".form_field_pk_outer").find(".form_field_pk_outer_row").length;
|
var index = $(".form_field_pk_outer").find(".form_field_pk_outer_row").length;
|
||||||
|
|
Loading…
Reference in a new issue