Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/stepper #40

Merged
merged 13 commits into from
Oct 25, 2023
Merged

Feature/stepper #40

merged 13 commits into from
Oct 25, 2023

Conversation

haroun
Copy link
Contributor

@haroun haroun commented Oct 24, 2023

Summary

Add group widget

What are the specific steps to test this change?

  1. Create a form
  2. Add a group widget, it should contains all the other field widgets

What kind of change does this PR introduce?

(Check at least one)

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

Make sure the PR fulfills these requirements:

  • It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
  • The changelog is updated
  • Related documentation has been updated
  • Related tests have been updated

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

@haroun haroun self-assigned this Oct 24, 2023
@haroun haroun requested a review from boutell October 24, 2023 08:39
index.js Outdated
@@ -2,6 +2,8 @@ const fs = require('fs');
const path = require('path');
const connectMultiparty = require('connect-multiparty');
const fields = require('./lib/fields');
const recaptcha = require('./lib/recaptcha');
const process = require('./lib/process');
Copy link
Member

Choose a reason for hiding this comment

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

I wouldn't call a variable process because code in the module might need to access the process global at some point.

{% set prependIfPrefix = apos.modules['@apostrophecms/form'].prependIfPrefix %}

<div data-apos-form-groups class="apos-form-groups {{ prependIfPrefix('__groups') }}">
{% for group in data.widget.groups %}
Copy link
Member

Choose a reason for hiding this comment

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

Nice. I guess from the POV of the code that handles form submissions it just hoovers up the nested fields like everything else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep

@haroun haroun requested a review from boutell October 24, 2023 14:04
index.js Outdated
@@ -3,7 +3,7 @@ const path = require('path');
const connectMultiparty = require('connect-multiparty');
const fields = require('./lib/fields');
const recaptcha = require('./lib/recaptcha');
const process = require('./lib/process');
const processor = require('./lib/process');
Copy link
Member

Choose a reason for hiding this comment

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

Please rename the file too, just for consistency, sorry 🙏

@haroun haroun requested a review from boutell October 25, 2023 14:03
@haroun haroun merged commit b71d7e4 into main Oct 25, 2023
6 checks passed
@haroun haroun deleted the feature/stepper branch October 25, 2023 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants