Support predefined values for "Add Storage" dialog forms (Bifrost#T55341)
This commit is contained in:
parent
bb3b7fec0e
commit
d5d0248a58
1 changed files with 11 additions and 3 deletions
|
@ -552,13 +552,21 @@ function kolab_files_folder_mount_dialog()
|
||||||
rcmail.drivers_list_initialized = true;
|
rcmail.drivers_list_initialized = true;
|
||||||
|
|
||||||
$('td.source', dialog).each(function() {
|
$('td.source', dialog).each(function() {
|
||||||
$(this).click(function() {
|
var td = $(this),
|
||||||
|
id = td.attr('id').replace('source-', ''),
|
||||||
|
meta = rcmail.env.external_sources[id];
|
||||||
|
|
||||||
|
$.each(meta.form_values || [], function(i, v) {
|
||||||
|
td.find('#source-' + id + '-' + i).val(v);
|
||||||
|
});
|
||||||
|
|
||||||
|
td.click(function() {
|
||||||
$('td.selected', dialog).removeClass('selected');
|
$('td.selected', dialog).removeClass('selected');
|
||||||
dialog.find('.driverform').hide();
|
dialog.find('.driverform').hide();
|
||||||
$(this).addClass('selected').find('.driverform').show();
|
$(this).addClass('selected').find('.driverform').show();
|
||||||
$('input[type="radio"]', this).prop('checked', true);
|
$('input[type="radio"]', this).prop('checked', true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
args.button_classes = ['mainaction'];
|
args.button_classes = ['mainaction'];
|
||||||
|
|
Loading…
Add table
Reference in a new issue