Commit 5dffd21c authored by Fatih Acet's avatar Fatih Acet

Fix error message for existing labels.

parent 279c61f3
...@@ -112,6 +112,9 @@ v 8.10.3 ...@@ -112,6 +112,9 @@ v 8.10.3
- Fix importer for GitHub Pull Requests when a branch was removed. !5573 - Fix importer for GitHub Pull Requests when a branch was removed. !5573
- Ignore invalid IPs in X-Forwarded-For when trusted proxies are configured. !5584 - Ignore invalid IPs in X-Forwarded-For when trusted proxies are configured. !5584
- Trim extra displayed carriage returns in diffs and files with CRLFs. !5588 - Trim extra displayed carriage returns in diffs and files with CRLFs. !5588
- Fix label already exist error message in the right sidebar.
v 8.10.3 (unreleased)
v 8.10.2 v 8.10.2
- User can now search branches by name. !5144 - User can now search branches by name. !5144
......
...@@ -70,13 +70,15 @@ ...@@ -70,13 +70,15 @@
name: newLabelField.val(), name: newLabelField.val(),
color: newColorField.val() color: newColorField.val()
}, function(label) { }, function(label) {
var errors;
$newLabelCreateButton.enable(); $newLabelCreateButton.enable();
if (label.message != null) { if (label.message != null) {
errors = _.map(label.message, function(value, key) { var errorText = label.message;
return key + " " + value[0]; if (_.isObject(label.message)) {
}); errorText = _.map(label.message, function(value, key) {
return $newLabelError.html(errors.join("<br/>")).show(); return key + " " + value[0];
}).join('<br/>');
}
return $newLabelError.html(errorText).show();
} else { } else {
return $('.dropdown-menu-back', $dropdown.parent()).trigger('click'); return $('.dropdown-menu-back', $dropdown.parent()).trigger('click');
} }
......
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