Commit 023e10d5 authored by Michal Čihař's avatar Michal Čihař

Activate tab with form errors

This allows users to see actual error message, not just the generic
error.
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 03ac0f50
......@@ -292,6 +292,15 @@ $(function () {
}
});
/* Activate tab with error */
var form_errors = $('div.has-error');
if (form_errors.length > 0) {
var tab = form_errors.closest('div.tab-pane');
if (tab.length > 0) {
$('[data-toggle=tab][href=#' + tab.attr('id')+ ']').tab('show');
}
}
/* Translation editor */
var translation_editor = $('.translation-editor');
if (translation_editor.length > 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment