Changed route for update_document_list to verify_document_list.

Added flash messages for success and failure

Added stub for verify_study_details
This commit is contained in:
mike cullerton 2021-05-26 14:09:37 -04:00
parent 8018431918
commit 5ac9dc2c75
1 changed files with 15 additions and 7 deletions

View File

@ -3,7 +3,7 @@ from pb import app, db, description_map, session
from pb.ldap.ldap_service import LdapService from pb.ldap.ldap_service import LdapService
from pb.pb_mock import get_current_user, get_selected_user, update_selected_user, \ from pb.pb_mock import get_current_user, get_selected_user, update_selected_user, \
render_study_template, _update_study, redirect_home, _update_irb_info, _allowed_file, \ render_study_template, _update_study, redirect_home, _update_irb_info, _allowed_file, \
process_csv_study_details, has_no_empty_params, update_required_document_list process_csv_study_details, has_no_empty_params, verify_required_document_list
from pb.forms import StudyForm, IRBInfoForm, InvestigatorForm, ConfirmDeleteForm, StudySponsorForm, StudyDetailsForm from pb.forms import StudyForm, IRBInfoForm, InvestigatorForm, ConfirmDeleteForm, StudySponsorForm, StudyDetailsForm
from pb.models import Study, StudyDetails, IRBInfo, IRBStatus, Investigator, Sponsor, StudySponsor, RequiredDocument from pb.models import Study, StudyDetails, IRBInfo, IRBStatus, Investigator, Sponsor, StudySponsor, RequiredDocument
@ -372,9 +372,17 @@ def site_map():
return json.dumps({"links": links}) return json.dumps({"links": links})
@app.route('/update_document_list') @app.route('/verify_document_list', methods=['GET'])
def update_document_list(): def verify_document_list():
update_required_document_list() verify = verify_required_document_list()
# flash('Document list updated successfully!', 'success') if verify:
# # return redirect_home() flash('Document list is up to date.', 'success')
# return redirect(url_for('user_studies')) else:
flash('The document list is not up to date.', 'failure')
return redirect_home()
@app.route('/verify_study_details')
def verify_study_details():
pass