This commit is contained in:
2026-08-20 18:29:27 +05:00
parent 010f78b138
commit 51339b3f9a
8 changed files with 177 additions and 83 deletions
+24 -5
View File
@@ -1,4 +1,13 @@
import { Alert, Button, CollapseSection, FormActions, FormCard } from '@tnsu/ui-kit';
import {
Alert,
Button,
CollapseSection,
FormActions,
FormCard,
FormGrid,
Toggle
} from '@tnsu/ui-kit';
import { Field } from '../../components/Field/Field';
import { AppealSection } from './sections/AppealSection';
import { AuthorSection } from './sections/AuthorSection';
import { ThankYouScreen } from './ThankYouScreen';
@@ -16,10 +25,6 @@ export const FeedbackForm: React.FC = () => {
return (
<FormCard title={TEXTS.formTitle} subtitle={TEXTS.pageSubtitle}>
<div className={styles.notice}>
<Alert variant="warn">{TEXTS.privacyNotice}</Alert>
</div>
{formError ? (
<div className={styles.notice}>
<Alert variant="err">{formError}</Alert>
@@ -34,6 +39,20 @@ export const FeedbackForm: React.FC = () => {
<AppealSection data={data} errors={errors} set={set} />
</CollapseSection>
{/* Спрашиваем в самом конце и только у именных обращений: у анонимного
ответа всё равно не будет, вопрос был бы бессмысленным. */}
{!data.isAnonymous ? (
<FormGrid>
<Field label={TEXTS.labels.wantsFeedback} full>
<Toggle
checked={data.wantsFeedback}
onChange={(v) => set('wantsFeedback', v)}
onLabel="Да"
/>
</Field>
</FormGrid>
) : null}
<FormActions>
<Button variant="ghost" type="button" onClick={reset}>
{TEXTS.actions.reset}