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

Admin config: added input validation & hide disabled options #4232

Merged
merged 3 commits into from
Oct 8, 2024

Conversation

sreichel
Copy link
Contributor

@sreichel sreichel commented Sep 29, 2024

Do not render options for disabled sections (e.g. disabled payment methods).

Added some input-validation to enforce number/digit imput.

@github-actions github-actions bot added Component: Core Relates to Mage_Core Component: Catalog Relates to Mage_Catalog Component: Reports Relates to Mage_Reports Component: Checkout Relates to Mage_Checkout Component: Sales Relates to Mage_Sales Component: Usa Relates to Mage_Usa Component: Customer Relates to Mage_Customer Component: Sitemap Relates to Mage_Sitemap Component: Api PageRelates to Mage_Api Component: Cron Relates to Mage_Cron Component: Contacts Relates to Mage_Contacts Component: Weee Relates to Mage_Weee Component: Shipping Relates to Mage_Shipping Component: Payment Relates to Mage_Payment Component: Oauth Relates to Mage_Oauth Component: Downloadable Relates to Mage_Downloadable Component: Sendfriend Relates to Mage_Sendfriend Component: Log Relates to Mage_Log Component: ConfigurableSwatches Relates to Mage_ConfigurableSwatches Component: Authorizenet Relates to Mage_Authorizenet Component: GoogleAnalytics Relates to Mage_GoogleAnalytics Component: Paygate Relates to Mage_Paygate labels Sep 29, 2024
@empiricompany
Copy link
Contributor

please provide a description including the reason of this PR

@sreichel sreichel changed the title Admin config: added input validation & hide unused options Admin config: added input validation & hide disabeld options Sep 29, 2024
@addison74 addison74 changed the title Admin config: added input validation & hide disabeld options Admin config: added input validation & hide disabled options Oct 4, 2024
@addison74
Copy link
Contributor

Nice work. This PR makes some changes in the Backend > System > Configuration. for example in Google Sitemap > CMS Pages Options section. If Frequency = "Do not show in sitemap" Priority and Show lastmod are displayed, although they should not be displayed.

Before

before

After

after

Similarly in the same section for Generation Settings, if it is not enabled, its 5 options are no longer displayed.

I will check all the sections so that nothing is omitted and then I will approve it.

@addison74
Copy link
Contributor

The following sections need an evaluation:

Catalog > Catalog > Product Alerts
Do we need to display Price Alert Email Template and Stock Alert Email Template dropdowns if both Allow Alert When Product Comes Back to ... are No?

Sales > Shipping Methods > UPS
If Enabled for checkout is No there are 7 inputs which are still visible. This is not happening for USPS, FedEx, DHL.

@github-actions github-actions bot added the Component: ProductAlert Relates to Mage_ProductAlert label Oct 4, 2024
@sreichel
Copy link
Contributor Author

sreichel commented Oct 4, 2024

Do we need to display Price Alert Email Template and Stock Alert Email Template dropdowns if both Allow Alert When Product Comes Back to ... are No?

I have hidden the template selector.

Sales > Shipping Methods > UPS
If Enabled for checkout is No there are 7 inputs which are still visible. This is not happening for USPS, FedEx, DHL.

The <depends> node is there. I dont know where its coming from.

@addison74
Copy link
Contributor

addison74 commented Oct 4, 2024

The first issue is solved. The second one needs a solution, all those 7 inputs depends on the first one. You are right all have . Very strange.

image

@addison74
Copy link
Contributor

Just delete a node inside , for example the first one access_license_number, then reload the page. By setting "Enable for Checkout to No", all inputs disappear. There is something strange in the node.

@sreichel
Copy link
Contributor Author

sreichel commented Oct 4, 2024

I think there is some javascript that disables the input for the 7 fields.

I'd leave it as it is.

@sreichel
Copy link
Contributor Author

sreichel commented Oct 4, 2024

Missed your last comment ... I have an idea. Will test it later.

@sreichel
Copy link
Contributor Author

sreichel commented Oct 5, 2024

Can confirm deleting "access_license_number" works.

Lets fix it another time. Create issue for it.

@kiatng kiatng merged commit 7e5abd1 into OpenMage:main Oct 8, 2024
12 checks passed
@sreichel sreichel deleted the systemxml branch October 8, 2024 03:53
fballiano added a commit to MahoCommerce/maho that referenced this pull request Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Api PageRelates to Mage_Api Component: Authorizenet Relates to Mage_Authorizenet Component: Catalog Relates to Mage_Catalog Component: Checkout Relates to Mage_Checkout Component: ConfigurableSwatches Relates to Mage_ConfigurableSwatches Component: Contacts Relates to Mage_Contacts Component: Core Relates to Mage_Core Component: Cron Relates to Mage_Cron Component: Customer Relates to Mage_Customer Component: Downloadable Relates to Mage_Downloadable Component: GoogleAnalytics Relates to Mage_GoogleAnalytics Component: Log Relates to Mage_Log Component: Oauth Relates to Mage_Oauth Component: Paygate Relates to Mage_Paygate Component: Payment Relates to Mage_Payment Component: ProductAlert Relates to Mage_ProductAlert Component: Reports Relates to Mage_Reports Component: Sales Relates to Mage_Sales Component: Sendfriend Relates to Mage_Sendfriend Component: Shipping Relates to Mage_Shipping Component: Sitemap Relates to Mage_Sitemap Component: Usa Relates to Mage_Usa Component: Weee Relates to Mage_Weee
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants