appeals
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user