Skip to content

Commit

Permalink
Merge pull request #1117 from flexion/962_validation_reoverride
Browse files Browse the repository at this point in the history
962 Validation Styles / Clear Form
  • Loading branch information
wbyoko authored Mar 15, 2019
2 parents b03d32b + 77a7111 commit 534b815
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default test => {
documentId: test.answerDocumentId,
});

expect(test.getState('validationErrors')).toEqual({});

await test.runSequence('createWorkItemSequence');

expect(test.getState('validationErrors')).toEqual({
Expand Down Expand Up @@ -55,6 +57,8 @@ export default test => {
sentBy: 'Test Docketclerk',
});

expect(test.getState('form')).toEqual({});

await test.runSequence('gotoDashboardSequence');
await test.runSequence('chooseWorkQueueSequence', {
box: 'outbox',
Expand Down
2 changes: 2 additions & 0 deletions web-client/src/presenter/sequences/createWorkItemSequence.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { stopShowValidationAction } from '../actions/stopShowValidationAction';
import { unsetFormSubmittingAction } from '../actions/unsetFormSubmittingAction';
import { validateInitialWorkItemMessageAction } from '../actions/validateInitialWorkItemMessageAction';
import { setValidationErrorsAction } from '../actions/setValidationErrorsAction';
import { clearFormAction } from '../actions/clearFormAction';

export const createWorkItemSequence = [
clearAlertsAction,
Expand All @@ -22,6 +23,7 @@ export const createWorkItemSequence = [
{
success: [stopShowValidationAction, setAlertSuccessAction],
},
clearFormAction,
clearModalAction,
refreshCaseAction,
unsetFormSubmittingAction,
Expand Down
9 changes: 9 additions & 0 deletions web-client/src/styles/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -372,3 +372,12 @@ select.ustc-input-error {
overflow: scroll;
max-height: 931px;
}

.ustc-create-message-modal {
.usa-input-error input,
.usa-input-error textarea,
.usa-input-error select {
width: calc(100% + 1.9rem);
border: 3px solid #cd2026;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CreateMessageModalDialogComponent extends ModalDialog {
}
renderBody() {
return (
<React.Fragment>
<div className="ustc-create-message-modal">
<div
className={
'usa-form-group ' +
Expand Down Expand Up @@ -109,7 +109,7 @@ class CreateMessageModalDialogComponent extends ModalDialog {
{this.props.validationErrors.message}
</div>
</div>
</React.Fragment>
</div>
);
}
}
Expand Down

0 comments on commit 534b815

Please sign in to comment.