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

added: OC: Allow user to open next form when closing current form #392

Merged
merged 5 commits into from
Nov 24, 2020

Conversation

theywa
Copy link

@theywa theywa commented Nov 6, 2020

@theywa theywa requested a review from MartijnR November 6, 2020 09:52
Copy link

@MartijnR MartijnR left a comment

Choose a reason for hiding this comment

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

Looks great. Just a few simplification comments.

Also, please add some oc-api tests for endpoints that support this and for those that don't.

@theywa
Copy link
Author

theywa commented Nov 9, 2020

oc-api-test updated

@MartijnR
Copy link

Hi @theywa, let me know when you'd like me to review again. Not sure if you're still working on it or not.

@theywa theywa marked this pull request as ready for review November 16, 2020 11:58
@theywa
Copy link
Author

theywa commented Nov 16, 2020

@MartijnR yes please, I just update the code to enabled on preview too

@@ -3,10 +3,20 @@ section.form-footer
if !headless
.form-footer__content__main-controls
if type === 'preview'
if nextPrompt
fieldset.draft.question.next-prompt

Choose a reason for hiding this comment

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

The "draft" class doesn't do anything I believe and is confusing. You can target this question with .next-prompt in CSS

Copy link
Author

Choose a reason for hiding this comment

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

got it, style updated

fieldset.draft.question.next-prompt
.option-wrapper: label
input.ignore(type='checkbox', name='next-prompt')
span #{nextPrompt}

Choose a reason for hiding this comment

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

might be good to give the span the 'option-label' class (like in the form) so the styling moves along with any changes to checkbox form styling (in the future). However, if you're engaged in an annoying CSS fight when doing this, don't bother.

Copy link
Author

Choose a reason for hiding this comment

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

sure style updated

@MartijnR
Copy link

Thanks @theywa,

Sorry for my inefficient review process. I have to work on my review skills...

I found one remaining issue for single-page forms. I think this link may work for you: http://localhost:8005/single/fs/i/widgets?ecid=a&next_prompt=how%20are%20you%3F

Screen Shot 2020-11-20 at 11 27 02 AM

I also overlooked something I should have commented on before (though easy to change). Try to keep CSS changes limited to custom OC files. In this case the _form_footer.scss changes could be moved to _common-oc.scss. You'll find some other form_footer customizations in that file already. The reason for doing that is to reduce merge conflicts with enketo/enketo-express.

@theywa
Copy link
Author

theywa commented Nov 23, 2020

@MartijnR ~ No it's okay, I should check it more before making a PR
Update on single page(http://localhost:8888/single/fs/i/9ogdxV7K?ecid=a&parent_window_origin=https%3A%2F%2Fwww.w3schools.com&next_prompt=Test%20CheckBox) and move style code to _common-oc.scss
single-page

@MartijnR MartijnR merged commit f8281ae into OpenClinica:master Nov 24, 2020
MartijnR pushed a commit that referenced this pull request Feb 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants