mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Implement admin danations info show checkbox
This commit is contained in:
parent
7cf80c52ca
commit
a48355f8bc
@ -30,6 +30,7 @@
|
|||||||
"goal": "Monatlich benötigte Spenden",
|
"goal": "Monatlich benötigte Spenden",
|
||||||
"name": "Spendeninfo",
|
"name": "Spendeninfo",
|
||||||
"progress": "Bereits gesammelte Spenden",
|
"progress": "Bereits gesammelte Spenden",
|
||||||
|
"showDonationsCheckboxLabel": "Spendenfortschritt anzeigen",
|
||||||
"successfulUpdate": "Spenden-Info erfolgreich aktualisiert!"
|
"successfulUpdate": "Spenden-Info erfolgreich aktualisiert!"
|
||||||
},
|
},
|
||||||
"hashtags": {
|
"hashtags": {
|
||||||
|
|||||||
@ -30,6 +30,7 @@
|
|||||||
"goal": "Monthly donations needed",
|
"goal": "Monthly donations needed",
|
||||||
"name": "Donations info",
|
"name": "Donations info",
|
||||||
"progress": "Donations collected so far",
|
"progress": "Donations collected so far",
|
||||||
|
"showDonationsCheckboxLabel": "Show donations progress bar",
|
||||||
"successfulUpdate": "Donations info updated successfully!"
|
"successfulUpdate": "Donations info updated successfully!"
|
||||||
},
|
},
|
||||||
"hashtags": {
|
"hashtags": {
|
||||||
|
|||||||
@ -2,14 +2,39 @@
|
|||||||
<base-card>
|
<base-card>
|
||||||
<h2 class="title">{{ $t('admin.donations.name') }}</h2>
|
<h2 class="title">{{ $t('admin.donations.name') }}</h2>
|
||||||
<ds-form v-model="formData" @submit="submit">
|
<ds-form v-model="formData" @submit="submit">
|
||||||
<ds-input model="goal" :label="$t('admin.donations.goal')" placeholder="15000" icon="money" />
|
<ds-text class="show-donations-checkbox">
|
||||||
|
<input
|
||||||
|
id="showDonations"
|
||||||
|
type="checkbox"
|
||||||
|
v-model="showDonations"
|
||||||
|
:checked="showDonations"
|
||||||
|
/>
|
||||||
|
<label for="showDonations">
|
||||||
|
{{ $t('admin.donations.showDonationsCheckboxLabel') }}
|
||||||
|
</label>
|
||||||
|
</ds-text>
|
||||||
<ds-input
|
<ds-input
|
||||||
|
class="donations-data"
|
||||||
|
model="goal"
|
||||||
|
:label="$t('admin.donations.goal')"
|
||||||
|
placeholder="15000"
|
||||||
|
icon="money"
|
||||||
|
:disabled="!showDonations"
|
||||||
|
/>
|
||||||
|
<ds-input
|
||||||
|
class="donations-data"
|
||||||
model="progress"
|
model="progress"
|
||||||
:label="$t('admin.donations.progress')"
|
:label="$t('admin.donations.progress')"
|
||||||
placeholder="1200"
|
placeholder="1200"
|
||||||
icon="money"
|
icon="money"
|
||||||
|
:disabled="!showDonations"
|
||||||
/>
|
/>
|
||||||
<base-button filled type="submit" :disabled="!formData.goal || !formData.progress">
|
<base-button
|
||||||
|
class="donations-info-button"
|
||||||
|
filled
|
||||||
|
type="submit"
|
||||||
|
:disabled="!formData.goal || !formData.progress"
|
||||||
|
>
|
||||||
{{ $t('actions.save') }}
|
{{ $t('actions.save') }}
|
||||||
</base-button>
|
</base-button>
|
||||||
</ds-form>
|
</ds-form>
|
||||||
@ -26,6 +51,10 @@ export default {
|
|||||||
goal: null,
|
goal: null,
|
||||||
progress: null,
|
progress: null,
|
||||||
},
|
},
|
||||||
|
// TODO: Our styleguide does not support checkmarks.
|
||||||
|
// Integrate showDonations into `this.formData` once we
|
||||||
|
// have checkmarks available.
|
||||||
|
showDonations: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -62,3 +91,18 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.show-donations-checkbox {
|
||||||
|
margin-top: $space-base;
|
||||||
|
margin-bottom: $space-small;
|
||||||
|
}
|
||||||
|
|
||||||
|
.donations-data {
|
||||||
|
margin-left: $space-small;
|
||||||
|
}
|
||||||
|
|
||||||
|
.donations-info-button {
|
||||||
|
margin-top: $space-small;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user