fix: Reset selected backend when adding a new storage

As a new storage is added by selecting a backend the selected backend
needs to be reset. Otherwise it is not possible to add another storage
with the same backend.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
pull/46859/head
Daniel Calviño Sánchez 2 years ago committed by skjnldsv
parent baaed7f191
commit 8e5dba2be0
  1. 2
      apps/files_external/js/settings.js

@ -766,6 +766,8 @@ MountConfigListView.prototype = _.extend({
storageConfig.backend = $target.val();
$tr.find('.mountPoint input').val('');
$tr.find('.selectBackend').prop('selectedIndex', 0)
var onCompletion = jQuery.Deferred();
$tr = this.newStorage(storageConfig, onCompletion);
$tr.find('.applicableToAllUsers').prop('checked', false).trigger('change');

Loading…
Cancel
Save