@@ -312,28 +312,10 @@
{{define "fsjs"}}
function onFilesystemChanged(val){
- // first hide all fsconfig sections
- $('.form-group.row.gcs').hide();
- $('.form-group.gcs').hide();
- $('.form-group.row.s3').hide();
- $('.form-group.row.azblob').hide();
- $('.form-group.azblob').hide();
- $('.form-group.crypt').hide();
- $('.form-group.sftp').hide();
-
- // enable the ones matching the selected vfs provider
- if (val == 's3fs'){
- $('.form-group.row.s3').show();
- } else if (val == 'gcsfs'){
- $('.form-group.row.gcs').show();
- $('.form-group.gcs').show();
- } else if (val == 'azblobfs'){
- $('.form-group.row.azblob').show();
- $('.form-group.azblob').show();
- } else if (val == 'cryptfs'){
- $('.form-group.crypt').show();
- } else if (val == 'sftpfs'){
- $('.form-group.sftp').show();
- }
+ // each fsconfig form-group has the 'fsconfig' css class
+ // as well as a 'fsconfig-{name}' class where name is the FilesystemProvider.Name
+ // we're simply hiding all of them and then showing the ones that match the selected vfs provider
+ $('.form-group.fsconfig').hide();
+ $('.form-group.fsconfig-'+val).show();
}
{{end}}
\ No newline at end of file