Skip to content

Commit

Permalink
10427 More uses of InlineLink in new petition flow
Browse files Browse the repository at this point in the history
  • Loading branch information
En-8 committed Sep 9, 2024
1 parent 12e108f commit 44804f6
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 102 deletions.
8 changes: 5 additions & 3 deletions web-client/src/ustc-ui/InlineLink/InlineLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const InlineLink = ({
href,
icon,
iconSize = '1x',
shouldWrapText = false,
tooltip,
}: {
children: string | React.ReactNode;
Expand All @@ -17,19 +18,20 @@ export const InlineLink = ({
href: string;
iconSize?: '1x' | '2x' | '3x' | '4x' | '5x';
tooltip?: string;
shouldWrapText?: boolean;
}) => {
const classes = classNames(
'usa-link--external no-wrap',
'usa-link--external',
className,
tooltip && 'usa-tooltip',
// icon && !shouldWrapText && 'no-wrap',
!shouldWrapText && 'no-wrap',
);

return (
<a
className={classes}
href={href}
rel="noopener noreferrer"
rel="noreferrer"
target="_blank"
title={tooltip}
>
Expand Down
21 changes: 4 additions & 17 deletions web-client/src/views/BeforeStartingCase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,16 +211,9 @@ export const BeforeStartingCase = connect(
<div>
To file a case on behalf of someone else, you must be
authorized to practice before this Court as provided by the{' '}
<Button
link
className="usa-link--external text-left mobile-text-wrap"
href="https://ustaxcourt.gov/rules.html"
overrideMargin="margin-right-0"
rel="noopener noreferrer"
target="_blank"
>
<InlineLink href="https://ustaxcourt.gov/rules.html">
Tax Court Rules of Practice and Procedure (Rule 60)
</Button>
</InlineLink>
{
'. Enrolled agents, certified public accountants, and attorneys who are not admitted to practice before the Court are not eligible to represent a party.'
}
Expand All @@ -242,18 +235,12 @@ export const BeforeStartingCase = connect(
"Download and fill out the form if you haven't already done so:"
}
</div>
<Button
link
className="usa-link--external text-left mobile-text-wrap"
<InlineLink
href="https://www.ustaxcourt.gov/resources/forms/Corporate_Disclosure_Statement_Form.pdf"
icon="file-pdf"
iconColor="blue"
overrideMargin="margin-right-0"
rel="noopener noreferrer"
target="_blank"
>
Corporate Disclosure Statement (T.C. Form 6)
</Button>
</InlineLink>
</AccordionItem>
</Accordion>
</div>
Expand Down
10 changes: 3 additions & 7 deletions web-client/src/views/Dashboards/FilingFeeOptions.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Accordion, AccordionItem } from '../../ustc-ui/Accordion/Accordion';
import { Button } from '../../ustc-ui/Button/Button';
import { InlineLink } from '@web-client/ustc-ui/InlineLink/InlineLink';
import React from 'react';

export const FilingFeeOptions = function () {
Expand Down Expand Up @@ -50,18 +51,13 @@ export const FilingFeeOptions = function () {
<br />
<br />
<strong>Can’t afford to pay the filing fee?</strong>
<Button
link
className="usa-link--external text-left"
<InlineLink
href="https://www.ustaxcourt.gov/resources/forms/Application_for_Waiver_of_Filing_Fee.pdf"
icon="file-pdf"
iconColor="blue"
rel="noopener noreferrer"
shouldWrapText={true}
target="_blank"
>
Download Application For Waiver of Filing Fee
</Button>
</InlineLink>
</AccordionItem>
</Accordion>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button } from '@web-client/ustc-ui/Button/Button';
import { FormGroup } from '@web-client/ustc-ui/FormGroup/FormGroup';
import { InfoNotificationComponent } from '@web-client/views/InfoNotification';
import { InlineLink } from '@web-client/ustc-ui/InlineLink/InlineLink';
import { MAX_FILE_SIZE_MB } from '@shared/business/entities/EntityConstants';
import { StateDrivenFileInput } from '@web-client/views/FileDocument/StateDrivenFileInput';
import React from 'react';
Expand All @@ -26,16 +26,9 @@ export function CorporateDisclosureUpload({
<div>
{"Download and fill out the form if you haven't already done so:"}
</div>
<Button
link
className="usa-link--external text-left mobile-text-wrap"
href="https://www.ustaxcourt.gov/resources/forms/Corporate_Disclosure_Statement_Form.pdf"
overrideMargin="margin-right-0"
rel="noopener noreferrer"
target="_blank"
>
<InlineLink href="https://www.ustaxcourt.gov/resources/forms/Corporate_Disclosure_Statement_Form.pdf">
Corporate Disclosure Statement (T.C. Form 6)
</Button>
</InlineLink>
<div className="margin-top-205">
<FormGroup
errorMessageId="corporate-disclosure-file-error-message"
Expand Down
10 changes: 3 additions & 7 deletions web-client/src/views/StartCaseUpdated/PetitionerInformation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {
BUSINESS_TYPES,
} from '@shared/business/entities/EntityConstants';
import { AddressDisplay } from '../CaseDetail/AddressDisplay';
import { Button } from '@web-client/ustc-ui/Button/Button';
import { CardHeader } from './CardHeader';
import { InlineLink } from '@web-client/ustc-ui/InlineLink/InlineLink';
import React from 'react';

export function PetitionerInformation({ petitionFormatted }) {
Expand All @@ -27,16 +27,12 @@ export function PetitionerInformation({ petitionFormatted }) {
<div>
<div>
<div className="grid-col flex-auto">
<Button
link
className="padding-0 text-left word-break"
<InlineLink
data-testid="cds-preview-button"
href={petitionFormatted.corporateDisclosureFileUrl}
rel="noopener noreferrer"
target="_blank"
>
{petitionFormatted.corporateDisclosureFile.name}
</Button>
</InlineLink>
</div>
</div>
</div>
Expand Down
37 changes: 6 additions & 31 deletions web-client/src/views/StartCaseUpdated/UpdatedFilePetitionStep4.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Button } from '@web-client/ustc-ui/Button/Button';
import { Icon } from '@web-client/ustc-ui/Icon/Icon';
import { InlineLink } from '@web-client/ustc-ui/InlineLink/InlineLink';
import { ProcedureType } from '@web-client/views/StartCase/ProcedureType';
import { TrialCity } from '@web-client/views/StartCase/TrialCity';
import { UpdatedFilePetitionButtons } from '@web-client/views/StartCaseUpdated/UpdatedFilePetitionButtons';
Expand Down Expand Up @@ -34,21 +33,9 @@ export const UpdatedFilePetitionStep4 = connect(
If your case qualifies, you may choose to have it handled as a small
tax case. The Court handles small tax cases differently.
</div>
<Button
link
className="usa-link--external text-left mobile-text-wrap"
href="https://ustaxcourt.gov/case_procedure.html"
overrideMargin="margin-right-1"
rel="noopener noreferrer"
target="_blank"
>
Which case procedure should I choose?{' '}
<Icon
className="fa-icon-blue"
icon={['fa-soli', 'fa-arrow-up-right-from-square']}
size="1x"
/>
</Button>
<InlineLink href="https://ustaxcourt.gov/case_procedure.html">
Which case procedure should I choose?
</InlineLink>

<div className="margin-top-3">
<ProcedureType
Expand Down Expand Up @@ -77,21 +64,9 @@ export const UpdatedFilePetitionStep4 = connect(
procedure selected.
<span>
{' '}
<Button
link
className="usa-link--external text-left mobile-text-wrap"
href="https://www.ustaxcourt.gov/dpt_cities.html"
overrideMargin="margin-right-1"
rel="noopener noreferrer"
target="_blank"
>
<InlineLink href="https://www.ustaxcourt.gov/dpt_cities.html">
Trial locations
<Icon
className="fa-icon-blue"
icon={['fa-soli', 'fa-arrow-up-right-from-square']}
size="1x"
/>
</Button>
</InlineLink>
</span>
</div>
<TrialCity
Expand Down
21 changes: 4 additions & 17 deletions web-client/src/views/StartCaseUpdated/UpdatedFilePetitionStep5.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Button } from '@web-client/ustc-ui/Button/Button';
import { FormGroup } from '@web-client/ustc-ui/FormGroup/FormGroup';
import { Icon } from '@web-client/ustc-ui/Icon/Icon';
import { InfoNotificationComponent } from '@web-client/views/InfoNotification';
import { InlineLink } from '@web-client/ustc-ui/InlineLink/InlineLink';
import { StateDrivenFileInput } from '@web-client/views/FileDocument/StateDrivenFileInput';
import { UpdatedFilePetitionButtons } from '@web-client/views/StartCaseUpdated/UpdatedFilePetitionButtons';
import { connect } from '@web-client/presenter/shared.cerebral';
Expand Down Expand Up @@ -36,21 +35,9 @@ export const UpdatedFilePetitionStep5 = connect(
<div style={{ fontSize: '18px', marginBottom: '3px' }}>
Download and fill out the form if you haven&apos;t already done so:
</div>
<Button
link
className="usa-link--external text-left mobile-text-wrap text-semibold"
href="https://www.ustaxcourt.gov/resources/forms/Form_4_Statement_of_Taxpayer_Identification_Number.pdf"
marginDirection="bottom"
rel="noopener noreferrer"
target="_blank"
>
Statement of Taxpayer Identification Number (T.C. Form 4).{' '}
<Icon
className="fa-icon-blue"
icon={['fa-soli', 'fa-arrow-up-right-from-square']}
size="1x"
/>
</Button>
<InlineLink href="https://www.ustaxcourt.gov/resources/forms/Form_4_Statement_of_Taxpayer_Identification_Number.pdf">
Statement of Taxpayer Identification Number (T.C. Form 4).
</InlineLink>

<div className="margin-top-3">
<FormGroup
Expand Down
13 changes: 3 additions & 10 deletions web-client/src/views/StartCaseUpdated/UpdatedFilePetitionStep7.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
AccordionItem,
} from '@web-client/ustc-ui/Accordion/Accordion';
import { Button } from '@web-client/ustc-ui/Button/Button';
import { InlineLink } from '@web-client/ustc-ui/InlineLink/InlineLink';
import { SuccessNotification } from '@web-client/views/SuccessNotification';
import React from 'react';

Expand Down Expand Up @@ -70,17 +71,9 @@ export function UpdatedFilePetitionStep7() {
>
<div className="line-height-2">
<span>Submit an </span>
<Button
link
className="usa-link--external text-left mobile-text-wrap"
href="https://www.ustaxcourt.gov/resources/forms/Application_for_Waiver_of_Filing_Fee.pdf"
iconColor="blue"
overrideMargin="margin-right-1"
rel="noopener noreferrer"
target="_blank"
>
<InlineLink href="https://www.ustaxcourt.gov/resources/forms/Application_for_Waiver_of_Filing_Fee.pdf">
Application for Waiver of Filing Fee.
</Button>
</InlineLink>
<span>
This form requires detailed financial information and must be
signed under penalty of perjury.
Expand Down

0 comments on commit 44804f6

Please sign in to comment.