This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
The following commit(s) were added to refs/heads/develop by this push:
new 3912decc AIRAVATA-3700 Handle ENTER key submission of new project form
3912decc is described below
commit 3912deccf734595537cf657ec5c04f6827c8ae67
Author: Marcus Christie <[email protected]>
AuthorDate: Tue Jun 27 14:54:37 2023 -0400
AIRAVATA-3700 Handle ENTER key submission of new project form
---
.../js/components/project/ProjectButtonNew.vue | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/project/ProjectButtonNew.vue
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/project/ProjectButtonNew.vue
index 5d839362..94f67d5d 100644
---
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/project/ProjectButtonNew.vue
+++
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/project/ProjectButtonNew.vue
@@ -7,7 +7,7 @@
id="modal-new-project"
ref="modalNewProject"
title="Create New Project"
- v-on:ok="onCreateProject"
+ v-on:ok="onOkClicked"
v-bind:ok-disabled="okDisabled"
@cancel="onCancelNewProject"
>
@@ -40,9 +40,10 @@ export default {
ProjectEditor,
},
methods: {
- onCreateProject: function (event) {
- // Prevent hiding modal, hide it programmatically when project gets
created
- event.preventDefault();
+ onCreateProject: function () {
+ if (!this.valid) {
+ return;
+ }
services.ProjectService.create({ data: this.newProject }).then(
(result) => {
this.$refs.modalNewProject.hide();
@@ -53,6 +54,11 @@ export default {
}
);
},
+ onOkClicked(event) {
+ // Prevent hiding modal, hide it programmatically when project gets
created
+ event.preventDefault();
+ this.onCreateProject();
+ },
onCancelNewProject() {
this.newProject = new models.Project();
this.$refs.projectEditor.reset();