-
Notifications
You must be signed in to change notification settings - Fork 23
added: OC: Allow user to open next form when closing current form #392
Conversation
There was a problem hiding this 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.
oc-api-test updated |
Hi @theywa, let me know when you'd like me to review again. Not sure if you're still working on it or not. |
@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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure style updated
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 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. |
@MartijnR ~ No it's okay, I should check it more before making a PR |
#320