Merge pull request 'Admin: themawissel met Auto en themagebonden Checkbox/Radio' (#19) from feature/admin-form-controls into master
Continuous Integration / config-asf (push) Successful in 6s
Continuous Integration / config-sls (push) Successful in 7s
Continuous Integration / changes (push) Successful in 11s
Continuous Integration / backend-build (push) Skipped
Continuous Integration / compile-sites (push) Skipped
Continuous Integration / backend-test (push) Skipped
Continuous Integration / vulnerability-scan (push) Skipped
Continuous Integration / frontend-prepare (push) Successful in 26s
Continuous Integration / frontend-build (push) Successful in 1m25s
Continuous Integration / frontend-test (push) Successful in 2m28s
Continuous Integration / frontend-lint (push) Successful in 2m32s
Continuous Integration / publish-sls-production (push) Skipped
Continuous Integration / deploy-sls-production (push) Skipped
Continuous Integration / publish-asf-test (push) Successful in 2m8s
Continuous Integration / publish-sls-test (push) Successful in 2m10s
Continuous Integration / deploy-asf-test (push) Successful in 48s
Continuous Integration / deploy-sls-test (push) Successful in 49s
Continuous Integration / smoke-asf-test (push) Successful in 13s
Continuous Integration / smoke-sls-test (push) Successful in 16s
Deploy (SCP) / deploy (push) Successful in 48s

This commit was merged in pull request #19.
This commit is contained in:
2026-11-17 12:57:37 +01:00
11 changed files with 579 additions and 136 deletions
@@ -5,6 +5,7 @@ import { useTranslation } from 'react-i18next';
import { toast } from 'sonner';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { CheckboxField } from '@/components/ui/checkbox';
import { Label } from '@/components/ui/label';
import { FieldError } from '@/components/ui/FieldError';
import { FormErrorBanner } from '@/components/ui/FormErrorBanner';
@@ -211,16 +212,12 @@ function OfferingBannerForm({
</div>
<p className="text-xs text-muted-foreground">{t('offerings.banners.scheduleHint')}</p>
<div className="flex items-center gap-2">
<input
id="banner-active"
type="checkbox"
data-testid="banner-active"
className="size-4 rounded border-input"
{...register('isActive')}
/>
<Label htmlFor="banner-active">{t('offerings.banners.activeLabel')}</Label>
</div>
<CheckboxField
id="banner-active"
data-testid="banner-active"
label={t('offerings.banners.activeLabel')}
{...register('isActive')}
/>
<div className="flex justify-end gap-2">
<Button type="button" variant="outline" onClick={onClose} data-testid="banner-cancel">
@@ -5,6 +5,7 @@ import { useTranslation } from 'react-i18next';
import { Check, Pencil, Plus, Trash2, X } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { CheckboxField } from '@/components/ui/checkbox';
import { Label } from '@/components/ui/label';
import { FieldError } from '@/components/ui/FieldError';
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
@@ -293,28 +294,20 @@ export function OfferingForm({ initialValues, onSubmit, onCancel, isSubmitting }
{errors.ctaLabel && <FieldError message={errors.ctaLabel.message} testId="offering-cta-label-error" />}
</div>
<div className="flex items-center gap-2">
<input
id="offering-featured"
type="checkbox"
data-testid="offering-featured"
className="size-4 rounded border-input"
{...register('featured')}
/>
<Label htmlFor="offering-featured">{t('offerings.form.featuredLabel')}</Label>
</div>
<CheckboxField
id="offering-featured"
data-testid="offering-featured"
label={t('offerings.form.featuredLabel')}
{...register('featured')}
/>
<div className="space-y-3 rounded-md border p-3" data-testid="offering-schedule">
<div className="flex items-center gap-2">
<input
id="offering-active"
type="checkbox"
data-testid="offering-active"
className="size-4 rounded border-input"
{...register('isActive')}
/>
<Label htmlFor="offering-active">{t('offerings.form.activeLabel')}</Label>
</div>
<CheckboxField
id="offering-active"
data-testid="offering-active"
label={t('offerings.form.activeLabel')}
{...register('isActive')}
/>
<div className="grid gap-4 sm:grid-cols-2">
<div className="space-y-2">
<Label htmlFor="offering-starts">{t('offerings.form.startsLabel')}</Label>