aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/project-admin/links/views/CreationModal.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/project-admin/links/views/CreationModal.js')
-rw-r--r--server/sonar-web/src/main/js/apps/project-admin/links/views/CreationModal.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/server/sonar-web/src/main/js/apps/project-admin/links/views/CreationModal.js b/server/sonar-web/src/main/js/apps/project-admin/links/views/CreationModal.js
index dd20358900d..9547362ecd5 100644
--- a/server/sonar-web/src/main/js/apps/project-admin/links/views/CreationModal.js
+++ b/server/sonar-web/src/main/js/apps/project-admin/links/views/CreationModal.js
@@ -24,19 +24,16 @@ import { parseError } from '../../../code/utils';
export default ModalForm.extend({
template: Template,
- onFormSubmit () {
+ onFormSubmit() {
ModalForm.prototype.onFormSubmit.apply(this, arguments);
this.disableForm();
const name = this.$('#create-link-name').val();
const url = this.$('#create-link-url').val();
- this.options.onCreate(name, url)
- .then(() => this.destroy())
- .catch(e => {
- parseError(e).then(msg => this.showSingleError(msg));
- this.enableForm();
- });
+ this.options.onCreate(name, url).then(() => this.destroy()).catch(e => {
+ parseError(e).then(msg => this.showSingleError(msg));
+ this.enableForm();
+ });
}
});
-