From 3e57579990f6faef4bba75dd0397e66ca14bea83 Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Wed, 13 Nov 2019 13:30:11 -0500 Subject: [PATCH] Use BaseForm instead of specialized Vue component for step 1 of the application form Remove unnecessary event listener --- .../forms/new_application/environments.js | 1 - .../new_application/name_and_description.js | 23 ------------------- js/index.js | 2 -- templates/applications/new/step_1.html | 7 +++--- 4 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 js/components/forms/new_application/name_and_description.js diff --git a/js/components/forms/new_application/environments.js b/js/components/forms/new_application/environments.js index e2a49c5e..c5ab3e31 100644 --- a/js/components/forms/new_application/environments.js +++ b/js/components/forms/new_application/environments.js @@ -51,7 +51,6 @@ export default { }, mounted: function() { - this.$root.$on('onEnvironmentAdded', this.addEnvironment) this.validate() }, diff --git a/js/components/forms/new_application/name_and_description.js b/js/components/forms/new_application/name_and_description.js deleted file mode 100644 index cabcd92c..00000000 --- a/js/components/forms/new_application/name_and_description.js +++ /dev/null @@ -1,23 +0,0 @@ -import FormMixin from '../../../mixins/form' -import textinput from '../../text_input' -import * as R from 'ramda' - -export default { - name: 'application-name-and-description', - - mixins: [FormMixin], - - components: { - textinput, - }, - created: function() { - this.$root.$on('field-change', this.handleFieldChange) - if (this.initialData) this.changed = true - }, - - data: function() { - return { - errors: [], - } - }, -} diff --git a/js/index.js b/js/index.js index b1fbca9f..3ed54260 100644 --- a/js/index.js +++ b/js/index.js @@ -14,7 +14,6 @@ import textinput from './components/text_input' import checkboxinput from './components/checkbox_input' import poc from './components/forms/poc' import toggler from './components/toggler' -import ApplicationNameAndDescription from './components/forms/new_application/name_and_description' import ApplicationEnvironments from './components/forms/new_application/environments' import MultiStepModalForm from './components/forms/multi_step_modal_form' import uploadinput from './components/upload_input' @@ -49,7 +48,6 @@ const app = new Vue({ textinput, checkboxinput, poc, - ApplicationNameAndDescription, ApplicationEnvironments, BudgetChart, SpendTable, diff --git a/templates/applications/new/step_1.html b/templates/applications/new/step_1.html index 385d80de..fbb70c9e 100644 --- a/templates/applications/new/step_1.html +++ b/templates/applications/new/step_1.html @@ -16,12 +16,12 @@ {% include "portfolios/header.html" %} {{ StickyCTA(text=('portfolios.applications.new.step_1_header' | translate | safe), context="Step 1 of 3") }} {% endblock %} - + {% block application_content %} {% include "fragments/flash.html" %} - +
{{ form.csrf_token }}
@@ -43,12 +43,11 @@ {% block next_button %} {{ SaveButton(text=('portfolios.applications.new.step_1_button_text' | translate)) }} {% endblock %} - Cancel - + {% endblock %}