Use BaseForm instead of specialized Vue component for step 1 of the application form
Remove unnecessary event listener
This commit is contained in:
parent
d1e1a2a36a
commit
3e57579990
@ -51,7 +51,6 @@ export default {
|
||||
},
|
||||
|
||||
mounted: function() {
|
||||
this.$root.$on('onEnvironmentAdded', this.addEnvironment)
|
||||
this.validate()
|
||||
},
|
||||
|
||||
|
@ -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: [],
|
||||
}
|
||||
},
|
||||
}
|
@ -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,
|
||||
|
@ -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" %}
|
||||
|
||||
<application-name-and-description inline-template v-bind:initial-data='{{ form.data|tojson }}'>
|
||||
<base-form inline-template :enable-save="true">
|
||||
<form method="POST" action="{{ action }}" v-on:submit="handleSubmit">
|
||||
{{ form.csrf_token }}
|
||||
<div class="form-row">
|
||||
@ -43,12 +43,11 @@
|
||||
{% block next_button %}
|
||||
{{ SaveButton(text=('portfolios.applications.new.step_1_button_text' | translate)) }}
|
||||
{% endblock %}
|
||||
<button disabled class="usa-button usa-button-secondary">Previous</button>
|
||||
<a href="{{ url_for('applications.portfolio_applications', portfolio_id=portfolio.id) }}">
|
||||
Cancel
|
||||
</a>
|
||||
</span>
|
||||
</form>
|
||||
</application-name-and-description>
|
||||
</base-form>
|
||||
|
||||
{% endblock %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user