Commit Graph

506 Commits

Author SHA1 Message Date
leigh-mil
7c78e59624 Update copy on new portfolio form. Style cancel link as a button. 2020-01-21 11:57:09 -05:00
dandds
5213657b0f Additional validation and escaping for file names.
This adds additional front and backend validations for task order file
names. We are now restricting file names to a whitelist regex of
[A-Za-z0-9\-_ \.] for simplicity.

Note:
On the frontend, the filename string must have at least one character.
This is not true in the backend validation; because of the way the
entire task order form is validated, requiring input would break the
business logic currently implemented.
2020-01-15 09:17:03 -05:00
leigh-mil
17864cc060 Add migration to change environment_roles role column from string to
enum type.
Fix tests and functions affected by the column type change.
2020-01-14 13:12:29 -05:00
leigh-mil
abfe8663a1 Update copy in perms form 2020-01-10 10:25:55 -05:00
leigh-mil
79b2773852 Portfolio manager invite updates:
- Update the form to use BooleanFields for the permissions and make the
form more similar to the Application Members form
- Use MemberFormTemplate macro in the portfolio settings template
- fix tests affected by the form changes
2020-01-10 10:25:55 -05:00
leigh-mil
667554dba4 Update styling on portfolio admin page, update portfolio form to include description 2020-01-06 15:55:07 -05:00
leigh-mil
66cfaaa6c3 Update copy on TO signature page 2019-12-18 12:10:15 -05:00
leigh-mil
f0505ee122 Remove unused imports
Use remove_empty_string filter for TaskOrderForm.number instead of declaring the data property
Update display of TOs without a number
2019-12-13 14:53:58 -05:00
leigh-mil
78ef47f649 Update TO route helper function to catch error and display flash message when a user tries to save a TO with an existing number.
Update TaskOrderForm so that it converts empty string for number into None, this was causing an issue where new TOs were being saved with an empty string for the number, which violated the unique constraint.
2019-12-13 14:53:58 -05:00
graham-dds
cbea71259c Move checkbox validation message to translations 2019-12-13 13:17:30 -05:00
graham-dds
a097a0ce61 Refactor New Portfolio page according to designs.
New designs call for a streamlined New Portfolio page, with far
fewer input options. This commit refactors that page according to those
designs.

Some of the route functions in this commit refer to a "step 1" of creating
a new Portfolio. Though there is no "step 2" right now, the designs call
for a multistep flow for Portfolio creation process, so this commit sets
the stage for that.
2019-12-13 13:17:30 -05:00
leigh-mil
57b00715d3 Remove optional validator from CLINField number because it is a required column 2019-12-02 14:46:11 -05:00
graham-dds
51f1261db0 Order CLINs on reporting page and refactor labels
In order to more easily sort JEDI Clins for the obligated funds section,
the JEDI CLIN enum values were used in the output dict instead of their
verbose labels. And in order to bring the labels in line with designs,
the JEDI CLIN labels were DRYed up in the translations file, which
required making small changes in a few other places across the project.
2019-11-26 16:17:22 -05:00
leigh-mil
e8f21acf5b PR fixes 2019-11-12 16:59:22 -05:00
leigh-mil
d33fcb6073 Fix issues with deleting roles:
1. Prevents roles from being created with the role 'None'
2. Only call EnvironmentRoles.delete() if the env_role exists
3. Update the filter on the role field of the app member form to return
'No Access'. This fixed an issue where if a role was deleted, then other
env roles belonging to the app member could not be updated because the
role field of the deleted env_role was invalid
2019-11-12 16:54:46 -05:00
leigh-mil
d324ec57ec Add field for deleted in the app members environment form 2019-11-12 16:54:46 -05:00
leigh-mil
9037c44498 Move filter out of class definition and change name of form field 2019-11-12 13:07:50 -05:00
leigh-mil
ab9b62f54b Update validators and filter to remove strings that contain only
whitespace

The validator ListItemRequired() was only checking for None and an empty
string, not for strings that were multiple whitespace characters. This
fixes this issue by checking each item with regex to make sure it
contains non whitespace characters

The filter remove_empty_string() also was not checking for strings that
were multiple whitespace characters. This was also fixed by using regex
tomake sure that the string contains non whitespace characters, and also
clips any trailing whitespace.
2019-11-12 13:07:50 -05:00
leigh-mil
bb6d656def Merge pull request #1106 from dod-ccpo/clin-errors-contract-dates
PoP Range error message
2019-10-08 15:39:34 -04:00
graham-dds
237123d474 Make application description optional 2019-10-08 13:15:28 -04:00
leigh-mil
f4855c0ae3 Use validator on the field for checking that the pop dates are within the contract date range 2019-10-08 10:32:02 -04:00
leigh-mil
07b3c68422 Add min and max range values to date selector so a more accurate error message can be displayed when a date is out of the range 2019-10-08 10:32:02 -04:00
leigh-mil
92243965ec parse contract dates into datetime objects 2019-09-26 16:22:16 -04:00
graham-dds
cd37e18178 Rename application-related forms 2019-09-24 10:16:48 -04:00
leigh-mil
b7b625750f Use data property of PermissionsForm to return the form data is the correct format 2019-09-18 11:16:55 -04:00
leigh-mil
b35e8cfe8e Update NewMemberForm so that it has the same data structure as the UpdateMemberForm 2019-09-18 11:16:55 -04:00
leigh-mil
e341a73dd1 Remove unused code 2019-09-18 11:16:55 -04:00
leigh-mil
80dcb9c580 Move perms so they are at the top level of the form so that the data is properly populated
Add form fields for all environments in update member form
2019-09-18 11:16:54 -04:00
leigh-mil
93530e903f Create route for updating app member 2019-09-18 11:16:54 -04:00
leigh-mil
ee0e6c7200 Move converting the form.permission_sets data from and obj to a list out of the form 2019-09-18 11:16:54 -04:00
leigh-mil
4dab326eef Clean up code and formatting 2019-09-18 11:16:54 -04:00
leigh-mil
d296d3c237 Move modal outside of table and add csrf token 2019-09-18 11:16:54 -04:00
leigh-mil
89cb5a160c Populate form w/ data 2019-09-18 11:16:54 -04:00
leigh-mil
ab102470bf Make checkboxes work 2019-09-18 11:16:54 -04:00
leigh-mil
1fd2d9f496 Make form class for updating application member 2019-09-18 11:16:54 -04:00
graham-dds
96ad2334f7 Use custom validator for CLIN funding 2019-09-12 16:11:12 -04:00
graham-dds
e9bd1b596d Move max clin amount to a constant 2019-09-12 16:11:12 -04:00
graham-dds
ab17b5cf84 Use translations for WTForms validation 2019-09-12 16:11:12 -04:00
graham-dds
0abd46eb4f fixup to form 2019-09-12 16:11:12 -04:00
graham-dds
6f13b8a179 Add WTForms min and max validation for clin $
- above 0 and below $1,000,000,000.00, inclusive
2019-09-12 16:11:12 -04:00
graham-dds
f3eea39536 Add "total amount" to CLINS
- includes migration for change to model
2019-09-12 16:11:10 -04:00
leigh-mil
e565913f48 Merge pull request #1067 from dod-ccpo/app-settings-cleanup
App settings cleanup
2019-09-11 16:01:37 -04:00
leigh-mil
ddcd91964f Remove route 'applications.update_env_roles' and related functions and tests 2019-09-11 15:29:09 -04:00
leigh-mil
ade3dd083e Use translations 2019-09-10 13:54:13 -04:00
leigh-mil
117a3e2162 Styling for app perms 2019-09-10 11:54:17 -04:00
leigh-mil
ebe82a3452 Merge pull request #1063 from dod-ccpo/new-member-modal-part-1
New member modal part 1
2019-09-10 09:36:36 -04:00
leigh-mil
c7d8bc260c Add phone ext column to invites and phone ext field to new member form 2019-09-09 16:24:18 -04:00
leigh-mil
09efa4f434 use lowercase for variable names and remove unused import 2019-09-09 14:33:05 -04:00
leigh-mil
2efd2c968d Use translations and make errors look pretty 2019-09-06 10:12:35 -04:00
leigh-mil
d7b86491ae Validate PoP dates against contract dates config on the backend 2019-09-06 10:12:35 -04:00