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

Swap select value submision fix in admin forms #16045

Merged
merged 1 commit into from Oct 28, 2019

Conversation

@L3RAZ
Copy link
Contributor

L3RAZ commented Oct 21, 2019

The context variable is used inside bindSwapSave(context) function to find the selected values.

Previously the variable passed to the function was referring to the button inside the .click() function.

Now new variable "swap_container" is passed which refers to the found swap container.

Questions Answers
Branch? develop
Description? Fixes swap-select values not being submitted in generated AdminController forms.
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
How to test? Install my test module from git: https://github.com/L3RAZ/PS-swap-module , press "Configure" and a form should appear. When swap columns are changed and the form submitted, the saved columns should remain. When submitting the form for a second time without moving any columns then no selected values are submitted. This PR solves the issue when saving the form without changing the swap values.

This change is Reviewable

The context variable is used inside bindSwapSave(context) function to find the selected values.

Previously the variable passed to the function was referring to the button inside the .click() function.

Now new variable "swap_container" is passed which refers to the found swap container.
@L3RAZ L3RAZ requested a review from PrestaShop/prestashop-core-developers as a code owner Oct 21, 2019
@prestonBot

This comment has been minimized.

Copy link
Collaborator

prestonBot commented Oct 21, 2019

Hello @L3RAZ!

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

Copy link
Contributor

matthieu-rolland left a comment

... edit

@matthieu-rolland matthieu-rolland dismissed their stale review Oct 21, 2019

forgot about asset building

Copy link
Contributor

matthieu-rolland left a comment

Looks good me, thank you for your contribution @L3RAZ !

@sarahdib sarahdib self-assigned this Oct 23, 2019
@sarahdib

This comment has been minimized.

Copy link

sarahdib commented Oct 23, 2019

Hello @L3RAZ

The PR didn't fix the problem : https://drive.google.com/file/d/1MDEdifhLMBzLKjkLUJh7O3qq8j7jAbu-/view

Thanks for this contribution.

@L3RAZ

This comment has been minimized.

Copy link
Contributor Author

L3RAZ commented Oct 24, 2019

Hello, @sarahdib
This was an oversight on the module side. The module saved empty configuration when entering module configuration page. I have fixed the module now, so You can download it again from my repository: https://github.com/L3RAZ/PS-swap-module

@matks

This comment has been minimized.

Copy link
Contributor

matks commented Oct 28, 2019

Thank you @L3RAZ

@matks matks merged commit 1f43308 into PrestaShop:develop Oct 28, 2019
2 checks passed
2 checks passed
PrettyCI Code formatting
Details
Travis CI - Pull Request Build Passed
Details
@L3RAZ L3RAZ deleted the L3RAZ:admin-swap-select-fix branch Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.