mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
vue_accourse: GET form submit for no_household persons
This commit is contained in:
parent
fa938471aa
commit
da9d81dc05
@ -11,22 +11,30 @@
|
|||||||
|
|
||||||
<div v-if="participationWithoutHousehold.length > 0" class="alert alert-warning no-household">
|
<div v-if="participationWithoutHousehold.length > 0" class="alert alert-warning no-household">
|
||||||
<i class="fa fa-warning fa-2x"></i>
|
<i class="fa fa-warning fa-2x"></i>
|
||||||
<div class="float-button bottom"><div class="box">
|
<form method="GET" action="/fr/person/household/members/editor">
|
||||||
<div class="action">
|
<div class="float-button bottom"><div class="box">
|
||||||
<button class="btn btn-update">{{ $t('persons_associated.update_household') }}</button>
|
<div class="action">
|
||||||
</div>
|
<button class="btn btn-update" type="submit">{{ $t('persons_associated.update_household') }}</button>
|
||||||
<p class="mb-3">{{ $t('persons_associated.person_without_household_warning') }}</p>
|
</div>
|
||||||
<div class="form-check" v-for="p in participationWithoutHousehold">
|
<p class="mb-3">{{ $t('persons_associated.person_without_household_warning') }}</p>
|
||||||
<input type="checkbox"
|
<div class="form-check" v-for="p in participationWithoutHousehold">
|
||||||
class="form-check-input"
|
<input type="checkbox"
|
||||||
v-model="hasNoHousehold"
|
class="form-check-input"
|
||||||
:id="p.person.id"
|
v-model="hasNoHousehold"
|
||||||
:value="p.person.id" />
|
name="persons[]"
|
||||||
<label class="form-check-label" for="hasNoHousehold">
|
checked="checked"
|
||||||
{{ p.person.text }}
|
:id="p.person.id"
|
||||||
</label>
|
:value="p.person.id"
|
||||||
</div>
|
/>
|
||||||
</div></div>
|
<label class="form-check-label" for="hasNoHousehold">
|
||||||
|
{{ p.person.text }}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="expand_suggestions" value="true">
|
||||||
|
<input type="hidden" name="returnPath" :value="getReturnPath">
|
||||||
|
<input type="hidden" name="accompanying_period_id" :value="courseId">
|
||||||
|
</div></div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-table mb-3">
|
<div class="flex-table mb-3">
|
||||||
@ -78,6 +86,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
|
courseId: state => state.accompanyingCourse.id,
|
||||||
participations: state => state.accompanyingCourse.participations
|
participations: state => state.accompanyingCourse.participations
|
||||||
}),
|
}),
|
||||||
currentParticipations() {
|
currentParticipations() {
|
||||||
@ -88,6 +97,9 @@ export default {
|
|||||||
},
|
},
|
||||||
participationWithoutHousehold() {
|
participationWithoutHousehold() {
|
||||||
return this.currentParticipations.filter(p => p.person.current_household_id === null);
|
return this.currentParticipations.filter(p => p.person.current_household_id === null);
|
||||||
|
},
|
||||||
|
getReturnPath() {
|
||||||
|
return window.location.pathname + window.location.search + window.location.hash;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -118,6 +130,7 @@ div#accompanying-course {
|
|||||||
margin: 0 0 -1em;
|
margin: 0 0 -1em;
|
||||||
}
|
}
|
||||||
div.no-household {
|
div.no-household {
|
||||||
|
padding-bottom: 1.5em;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
& > i {
|
& > i {
|
||||||
@ -125,7 +138,7 @@ div#accompanying-course {
|
|||||||
padding-top: 0.2em;
|
padding-top: 0.2em;
|
||||||
opacity: 0.75;
|
opacity: 0.75;
|
||||||
}
|
}
|
||||||
& > div {
|
& > form {
|
||||||
flex-basis: auto;
|
flex-basis: auto;
|
||||||
div.action {
|
div.action {
|
||||||
button.btn-update {
|
button.btn-update {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user