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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/code/core/Mage/Api/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<validate>required-entry validate-digits validate-zero-or-greater</validate>
</session_timeout>
<compliance_wsi translate="label">
<label>WS-I Compliance</label>
Expand Down
20 changes: 20 additions & 0 deletions app/code/core/Mage/Authorizenet/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</payment_action>
<title translate="label">
<label>Title</label>
<sort_order>30</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<depends><active>1</active></depends>
</title>
<login translate="label">
<label>API Login ID</label>
Expand All @@ -58,6 +60,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</login>
<trans_key translate="label">
<label>Transaction Key</label>
Expand All @@ -67,6 +70,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</trans_key>
<signature_key translate="label">
<label>Signature Key</label>
Expand All @@ -76,6 +80,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</signature_key>
<trans_md5 translate="label">
<label>Merchant MD5</label>
Expand All @@ -85,6 +90,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</trans_md5>
<order_status translate="label">
<label>New Order Status</label>
Expand All @@ -94,6 +100,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</order_status>
<test translate="label">
<label>Test Mode</label>
Expand All @@ -103,13 +110,15 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</test>
<cgi_url translate="label">
<label>Gateway URL</label>
<sort_order>90</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</cgi_url>
<currency translate="label">
<label>Accepted Currency</label>
Expand All @@ -119,6 +128,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</currency>
<debug translate="label">
<label>Debug</label>
Expand All @@ -128,6 +138,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</debug>
<email_customer translate="label">
<label>Email Customer</label>
Expand All @@ -137,6 +148,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</email_customer>
<merchant_email translate="label">
<label>Merchant's Email</label>
Expand All @@ -145,6 +157,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</merchant_email>
<cctypes translate="label">
<label>Credit Card Types</label>
Expand All @@ -154,6 +167,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</cctypes>
<useccv translate="label">
<label>Credit Card Verification</label>
Expand All @@ -163,6 +177,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</useccv>
<allowspecific translate="label">
<label>Payment from Applicable Countries</label>
Expand All @@ -172,6 +187,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</allowspecific>
<specificcountry translate="label">
<label>Payment from Specific Countries</label>
Expand All @@ -181,20 +197,23 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</specificcountry>
<min_order_total translate="label">
<label>Minimum Order Total</label>
<sort_order>180</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</min_order_total>
<max_order_total translate="label">
<label>Maximum Order Total</label>
<sort_order>190</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><active>1</active></depends>
</max_order_total>
<sort_order translate="label">
<label>Sort Order</label>
Expand All @@ -203,6 +222,7 @@
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<frontend_class>validate-number</frontend_class>
<depends><active>1</active></depends>
</sort_order>
</fields>
</authorizenet_directpost>
Expand Down
13 changes: 13 additions & 0 deletions app/code/core/Mage/Catalog/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<validate>required-entry validate-digits validate-greater-than-zero</validate>
</lines_perpage>
</fields>
</sitemap>
Expand All @@ -181,6 +182,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<validate>required-entry validate-digits validate-greater-than-zero</validate>
</base_width>
<small_width translate="label comment">
<label>Small Image Width</label>
Expand All @@ -189,6 +191,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<validate>required-entry validate-digits validate-greater-than-zero</validate>
</small_width>
<max_dimension translate="label comment">
<label>Maximum resolution for upload image</label>
Expand All @@ -197,13 +200,15 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<validate>required-entry validate-digits validate-greater-than-zero</validate>
</max_dimension>
<progressive_threshold translate="label comment">
<label>Enable Progressive Images Threshold</label>
<comment>Minimum size in megapixel for progressive JPEG resize</comment>
<validate>validate-number</validate>
<sort_order>40</sort_order>
<show_in_default>1</show_in_default>
<validate>validate-digits validate-greater-than-zero</validate>
</progressive_threshold>
</fields>
</product_image>
Expand Down Expand Up @@ -400,6 +405,7 @@
<label>Maximal Depth</label>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<frontend_class>validate-digits</frontend_class>
</max_depth>
</fields>
</navigation>
Expand Down Expand Up @@ -427,6 +433,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<depends><use_calendar>1</use_calendar></depends>
</date_fields_order>
<time_format translate="label">
<label>Time Format</label>
Expand All @@ -436,6 +443,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<depends><use_calendar>1</use_calendar></depends>
</time_format>
<year_range translate="label comment">
<label>Year Range</label>
Expand All @@ -445,6 +453,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<depends><use_calendar>1</use_calendar></depends>
</year_range>
</fields>
</custom_options>
Expand Down Expand Up @@ -563,6 +572,7 @@
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<comment><![CDATA[<strong style="color:red">Warning!</strong> Applying MAP by default will hide all product prices on the frontend.]]></comment>
<depends><enabled>1</enabled></depends>
</apply_for_all>
<display_price_type translate="label">
<label>Display Actual Price</label>
Expand All @@ -572,6 +582,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><enabled>1</enabled></depends>
</display_price_type>
<explanation_message translate="label">
<label>Default Popup Text Message</label>
Expand All @@ -580,6 +591,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<depends><enabled>1</enabled></depends>
</explanation_message>
<explanation_message_whats_this translate="label">
<label>Default "What's This" Text Message</label>
Expand All @@ -588,6 +600,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<depends><enabled>1</enabled></depends>
</explanation_message_whats_this>
</fields>
</msrp>
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Checkout/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<depends><display>1</display></depends>
</count>
</fields>
</sidebar>
Expand Down
9 changes: 9 additions & 0 deletions app/code/core/Mage/ConfigurableSwatches/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<can_be_empty>1</can_be_empty>
<depends><enabled>1</enabled></depends>
</swatch_attributes>
<product_list_attribute translate="label">
<label>Product Attribute to Use for Swatches in Product Listing</label>
Expand All @@ -59,6 +60,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<depends><enabled>1</enabled></depends>
</product_list_attribute>
<product_list_price_change translate="label" module="configurableswatches">
<label>Dynamic Price Change for Swatches in Product Listing</label>
Expand All @@ -68,6 +70,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<depends><enabled>1</enabled></depends>
</product_list_price_change>
</fields>
</general>
Expand All @@ -85,13 +88,15 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<validate>required-entry validate-digits validate-greater-than-zero</validate>
</width>
<height translate="label">
<label>Height</label>
<sort_order>20</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<validate>required-entry validate-digits validate-greater-than-zero</validate>
</height>
</fields>
</product_detail_dimensions>
Expand All @@ -109,13 +114,15 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<validate>required-entry validate-digits validate-greater-than-zero</validate>
</width>
<height translate="label">
<label>Height</label>
<sort_order>20</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<validate>required-entry validate-digits validate-greater-than-zero</validate>
</height>
</fields>
</product_listing_dimensions>
Expand All @@ -133,13 +140,15 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<validate>required-entry validate-digits validate-greater-than-zero</validate>
</width>
<height translate="label">
<label>Height</label>
<sort_order>20</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<validate>required-entry validate-digits validate-greater-than-zero</validate>
</height>
</fields>
</layered_nav_dimensions>
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Contacts/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<depends><enabled>1</enabled></depends>
</email_template>
</fields>
</auto_reply>
Expand Down
Loading