aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/groups/update-view.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/groups/update-view.js')
-rw-r--r--server/sonar-web/src/main/js/apps/groups/update-view.js50
1 files changed, 24 insertions, 26 deletions
diff --git a/server/sonar-web/src/main/js/apps/groups/update-view.js b/server/sonar-web/src/main/js/apps/groups/update-view.js
index 850ddb7510f..c93608b197b 100644
--- a/server/sonar-web/src/main/js/apps/groups/update-view.js
+++ b/server/sonar-web/src/main/js/apps/groups/update-view.js
@@ -1,29 +1,27 @@
-define([
- './form-view'
-], function (FormView) {
+import FormView from './form-view';
- return FormView.extend({
-
- sendRequest: function () {
- var that = this;
- this.model.set({
- name: this.$('#create-group-name').val(),
- description: this.$('#create-group-description').val()
- });
- this.disableForm();
- return this.model.save(null, {
- statusCode: {
- // do not show global error
- 400: null
- }
- }).done(function () {
- that.collection.refresh();
- that.destroy();
- }).fail(function (jqXHR) {
- that.enableForm();
- that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings);
- });
- }
- });
+export default FormView.extend({
+ sendRequest: function () {
+ var that = this;
+ this.model.set({
+ name: this.$('#create-group-name').val(),
+ description: this.$('#create-group-description').val()
+ });
+ this.disableForm();
+ return this.model.save(null, {
+ statusCode: {
+ // do not show global error
+ 400: null
+ }
+ }).done(function () {
+ that.collection.refresh();
+ that.destroy();
+ }).fail(function (jqXHR) {
+ that.enableForm();
+ that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings);
+ });
+ }
});
+
+