Move success messages under submit button
This commit is contained in:
parent
273e514ee3
commit
f44d1d9d98
|
@ -44,10 +44,10 @@ export function AdminTransactions(props) {
|
||||||
|
|
||||||
<TransactionEditor input={input} setInput={setInput} error={error} />
|
<TransactionEditor input={input} setInput={setInput} error={error} />
|
||||||
|
|
||||||
{success && <p>Added! <Link to={'/transactions/'+success}>View the transaction.</Link></p>}
|
|
||||||
<Form.Button loading={loading} error={error.non_field_errors}>
|
<Form.Button loading={loading} error={error.non_field_errors}>
|
||||||
Submit
|
Submit
|
||||||
</Form.Button>
|
</Form.Button>
|
||||||
|
{success && <p>Added! <Link to={'/transactions/'+success}>View the transaction.</Link></p>}
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
<Header size='small'>Current Transactions</Header>
|
<Header size='small'>Current Transactions</Header>
|
||||||
|
@ -246,10 +246,10 @@ export function AdminMemberCards(props) {
|
||||||
/>
|
/>
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
|
|
||||||
{success && <p>Success!</p>}
|
|
||||||
<Form.Button loading={loading} error={error.non_field_errors}>
|
<Form.Button loading={loading} error={error.non_field_errors}>
|
||||||
Submit
|
Submit
|
||||||
</Form.Button>
|
</Form.Button>
|
||||||
|
{success && <div>Success!</div>}
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
<Header size='small'>Current Cards</Header>
|
<Header size='small'>Current Cards</Header>
|
||||||
|
@ -332,18 +332,20 @@ export function AdminMemberPause(props) {
|
||||||
|
|
||||||
<p>Pause members who are inactive, former, or on vacation.</p>
|
<p>Pause members who are inactive, former, or on vacation.</p>
|
||||||
|
|
||||||
{success && <p>Success!</p>}
|
<p>
|
||||||
{error && <p>Error, something went wrong.</p>}
|
{result.member.paused_date ?
|
||||||
|
<Button onClick={handleUnpause} loading={loading}>
|
||||||
|
Unpause
|
||||||
|
</Button>
|
||||||
|
:
|
||||||
|
<Button onClick={handlePause} loading={loading}>
|
||||||
|
{yousure ? 'You Sure?' : 'Pause'}
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
</p>
|
||||||
|
|
||||||
{result.member.paused_date ?
|
{success && <div>Success!</div>}
|
||||||
<Button onClick={handleUnpause} loading={loading}>
|
{error && <p>Error, something went wrong.</p>}
|
||||||
Unpause
|
|
||||||
</Button>
|
|
||||||
:
|
|
||||||
<Button onClick={handlePause} loading={loading}>
|
|
||||||
{yousure ? 'You Sure?' : 'Pause'}
|
|
||||||
</Button>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -462,10 +464,10 @@ export function AdminMemberForm(props) {
|
||||||
/>
|
/>
|
||||||
</Form.Field>
|
</Form.Field>
|
||||||
|
|
||||||
{success && <p>Success!</p>}
|
|
||||||
<Form.Button loading={loading} error={error.non_field_errors}>
|
<Form.Button loading={loading} error={error.non_field_errors}>
|
||||||
Submit
|
Submit
|
||||||
</Form.Button>
|
</Form.Button>
|
||||||
|
{success && <div>Success!</div>}
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -169,10 +169,10 @@ function EditTransaction(props) {
|
||||||
<Form onSubmit={handleSubmit}>
|
<Form onSubmit={handleSubmit}>
|
||||||
<TransactionEditor input={input} setInput={setInput} error={error} />
|
<TransactionEditor input={input} setInput={setInput} error={error} />
|
||||||
|
|
||||||
{success && <p>Success!</p>}
|
|
||||||
<Form.Button loading={loading} error={error.non_field_errors}>
|
<Form.Button loading={loading} error={error.non_field_errors}>
|
||||||
Save
|
Save
|
||||||
</Form.Button>
|
</Form.Button>
|
||||||
|
{success && <div>Success!</div>}
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user