forked from ustaxcourt/ef-cms
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1119 from flexion/962_clear_form_validation_cancel
962 Clear Form and Validation on Cancel
- Loading branch information
Showing
3 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { state } from 'cerebral'; | ||
|
||
/** | ||
* resets the state.users which is used throughout the app for storing list of users values | ||
* | ||
* @param {Object} providers the providers object | ||
* @param {Object} providers.store the cerebral store object used for clearing the users | ||
*/ | ||
export const clearUsersAction = ({ store }) => { | ||
store.set(state.users, []); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
web-client/src/presenter/sequences/dismissCreateMessageModalSequence.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import { clearModalAction } from '../actions/clearModalAction'; | ||
import { stopShowValidationAction } from '../actions/stopShowValidationAction'; | ||
import { clearAlertsAction } from '../actions/clearAlertsAction'; | ||
import { clearFormAction } from '../actions/clearFormAction'; | ||
import { clearUsersAction } from '../actions/clearUsersAction'; | ||
|
||
export const dismissCreateMessageModalSequence = [ | ||
stopShowValidationAction, | ||
clearFormAction, | ||
clearUsersAction, | ||
clearAlertsAction, | ||
clearModalAction, | ||
]; |