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

Dynamic form fields based on choice of attribute-group field (attribute form) #36027

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

mattgoud
Copy link
Contributor

Questions Answers
Branch? develop
Description? related #35591 - bug 3 : Attribute value list doesn't adapt itself if the attribute type changes
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
How to test? Indicate how to verify that this change works as expected.
UI Tests Please run UI tests and paste here the link to the run. Read this page to know why and how to use this tool..
Fixed issue or discussion? Fixes #36010
Related PRs If theme, autoupgrade or other module change is needed to make this change work, provide a link to related PRs here.
Sponsor company Your company or customer's name goes here (if applicable).

@mattgoud mattgoud requested a review from a team as a code owner April 25, 2024 09:21
@prestonBot
Copy link
Collaborator

Hello @mattgoud!

This is your first pull request on the PrestaShop project. Thank you, and welcome to this Open Source community!

@prestonBot
Copy link
Collaborator

Hi, thanks for this contribution!

I found some issues with the Pull Request description:

  • Your pull request does not seem to fix any issue, consider creating one (see note below) and linking it by writing Fixes #1234.

Would you mind having a look at it? This will help us understand how interesting your contribution is, thank you very much!

About linked issues

Please consider opening an issue before submitting a Pull Request:

  • If it's a bug fix, it helps maintainers verify that the bug is effectively due to a defect in the code, and that it hasn't been fixed already.
  • It can help trigger a discussion about the best implementation path before a single line of code is written.
  • It may lead the Core Product team to mark that issue as a priority, further attracting the maintainers' attention.

(Note: this is an automated message, but answering it will reach a real human)

@prestonBot prestonBot added develop Branch Bug fix Type: Bug fix labels Apr 25, 2024
@mattgoud mattgoud changed the title Migrated attribute pages bug 3 Dynamic form fields based on choice of attribute-group field (attribute form) Apr 25, 2024
…dd classes in form-map.ts and create toggleDisplay function)
@mattgoud
Copy link
Contributor Author

sorry @matthieu-rolland I pushed a new commit (refacto js) which canceled your review, if you could take a look thanks

@@ -106,17 +106,21 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'help' => $this->trans('Your internal name for this attribute.', 'Admin.Catalog.Help')
. ' ' . $this->trans('Invalid characters:', 'Admin.Notifications.Info')
. ' ' . TypedRegexValidator::CATALOG_CHARS,
]);

if ($hasAttributeGroupId === true && $attributeGroup->group_type === AttributeGroupType::ATTRIBUTE_GROUP_TYPE_COLOR) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's required if we want to toggle the fields dynamically

@nicosomb nicosomb added the Waiting for author Status: action required, waiting for author feedback label Apr 30, 2024
Copy link
Contributor

@jolelievre jolelievre left a comment

Choose a reason for hiding this comment

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

Thanks @mattgoud

@@ -106,17 +106,21 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'help' => $this->trans('Your internal name for this attribute.', 'Admin.Catalog.Help')
. ' ' . $this->trans('Invalid characters:', 'Admin.Notifications.Info')
. ' ' . TypedRegexValidator::CATALOG_CHARS,
]);

if ($hasAttributeGroupId === true && $attributeGroup->group_type === AttributeGroupType::ATTRIBUTE_GROUP_TYPE_COLOR) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's required if we want to toggle the fields dynamically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug fix Type: Bug fix develop Branch Waiting for author Status: action required, waiting for author feedback
Projects
Status: Need 2nd approval
Development

Successfully merging this pull request may close these issues.

related #35591 -bug 3 : Attribute value list doesn't adapt itself if the attribute type changes
5 participants