diff options
author | Vincent Petry <vincent@nextcloud.com> | 2023-01-11 14:39:39 +0100 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2023-01-13 10:27:17 +0100 |
commit | a0f70988f426aa3c327c95537f3e62bae2461707 (patch) | |
tree | 22c534303d5ef873d86331462e652d504dc96ac9 /apps/files_external/js | |
parent | b88864b89967cabd78c47d75ee2ff4b1d204934f (diff) | |
download | nextcloud-server-a0f70988f426aa3c327c95537f3e62bae2461707.tar.gz nextcloud-server-a0f70988f426aa3c327c95537f3e62bae2461707.zip |
Extend ext storage params to contain default value
Extend the external storage configuration parameters definition to allow
to specify a default value
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/files_external/js')
-rw-r--r-- | apps/files_external/js/settings.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 765850e2ef2..5228b958b67 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -1054,6 +1054,14 @@ MountConfigListView.prototype = _.extend({ newElement = $('<input type="text" class="'+classes.join(' ')+'" data-parameter="'+parameter+'" placeholder="'+ trimmedPlaceholder+'" />'); } + if (placeholder.defaultValue) { + if (placeholder.type === MountConfigListView.ParameterTypes.BOOLEAN) { + newElement.find('input').prop('checked', placeholder.defaultValue); + } else { + newElement.val(placeholder.defaultValue); + } + } + if (placeholder.tooltip) { newElement.attr('title', placeholder.tooltip); } |