Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement credit/discard view #22

Closed
wants to merge 12 commits into from
Closed

Implement credit/discard view #22

wants to merge 12 commits into from

Conversation

marcofucci
Copy link
Contributor

This changes the transaction batch view to being a FormView so that we can
validate and manage the it easily.
Saving the form will credit the selected transactions and discard the rest.
Saving the form passing discard='1' will discard all the transactions.

matharden and others added 11 commits July 6, 2015 16:52
so that it doesn't need to be calculated in javascript
getting the `user_id` and `prison_id` from the /users/<me>/ api
endpint
this is no longer required as `prison_id` and `user_id` is stored
in request.user
This changes the transaction batch view to being a FormView so that we can
validate and manage the it easily.
Saving the form will credit the selected transactions and discard the rest.
Saving the form passing discard='1' will discard all the transactions.
@marcofucci
Copy link
Contributor Author

@SteveMarshall @matharden a review/merge pls?



class ProcessTransactionBatchForm(forms.Form):
transactions = forms.MultipleChoiceField(choices=(), required=False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a really neat way of representing the list of transactions 👍

So that we can test all credit/discard cases.
@SteveMarshall
Copy link
Contributor

Looks good to me; @matharden, this is going into your branch, so can you review/merge?

@matharden
Copy link
Contributor

This branch needs to be rebased again :batch, which is now in a PR (#23). With that in mind, if might be easier to wait until that is merged and PR this against master.

@matharden
Copy link
Contributor

@marcofucci I got a Forbidden (403) CSRF verification failed. Request aborted. error when trying to submit or discard.

@marcofucci
Copy link
Contributor Author

@matharden the problem somehow happens when using gulp serve and runserver at the same time, that is, when you log into localhost:8001 and localhost:3000. The cookies are shared and django or python doesn't like that.

To fix that, just remove all the cookies for the domain localhost and it should work fine.

@matharden matharden force-pushed the batch branch 5 times, most recently from 75ec91d to a965c0c Compare July 9, 2015 12:14
@marcofucci
Copy link
Contributor Author

Will rebase and PR from master

@marcofucci marcofucci closed this Jul 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants