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>
This commit is contained in:
Daniel Calviño Sánchez 2024-07-29 12:21:13 +02:00 committed by backportbot[bot]
parent 2d7c44afd6
commit c23321e956

View file

@ -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');