Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Additional buttons in Batch and Patient add/edit views #151

Merged
merged 6 commits into from
Oct 23, 2019

Conversation

xispa
Copy link
Member

@xispa xispa commented Oct 22, 2019

Description of the issue/feature this PR addresses

This Pull Request adds some buttons to the following add/edit views:

  • Patient add/edit view:

    • "Save and create Sample": Saves the patient and redirects the user to the Add Sample form with the Patient field auto-filled
    • "Save and create Batch": Saves the patient and redirects the user to the Batch creation view
  • Clinical case add/edit view:

    • "Save and create Sample": Saves the case and redirects the user to the Add Sample form with fields that come from clinical case (ID and Patient) auto-filled

Current behavior before PR

Only "Cancel" and "Save" buttons are displayed in Patient and Clinical Case forms

Desired behavior after PR is merged

Additional buttons are displayed in Patient and Clinical Case forms

Captura de 2019-10-23 00-27-49

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@xispa xispa added the addition label Oct 22, 2019
@xispa xispa requested a review from Espurna October 22, 2019 22:28

# Redirect to Sample Add form from Batch
elif IBatch.providedBy(context):
next_url = "{}/ar_add?ar_count=1".format(next_url)
Copy link

Choose a reason for hiding this comment

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

Should not the ar_count depend on the number defined in the system by default?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed, please retest

@Espurna Espurna merged commit db0f1c7 into master Oct 23, 2019
@xispa xispa deleted the additional-buttons branch October 24, 2019 15:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

2 participants