Replace Import/Cancel buttons with Close button after successful contacts import

This commit is contained in:
Aleksander Machniak
2020-08-23 12:05:22 +02:00
parent f975c872b7
commit d40681237a

View File

@@ -5787,8 +5787,18 @@ function rcube_webmail()
{
if (this.import_dialog) {
this.import_state = state;
// activate Import button depending on state
$(this.import_dialog).parent().find('.ui-dialog-buttonset > button').first().attr('disabled', state != 'error');
var button = $(this.import_dialog).parent().find('.ui-dialog-buttonset > button').first();
if (state != 'error') {
// replace Import/Cancel buttons with Close button
button.hide();
button.next().text(this.gettext('close')).focus();
}
else {
// activate the Import button
button.prop('disabled', false);
}
}
};