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