Skip to content

Commit ba25a6d

Browse files
Do not load captcha.js when disabled (#1628)
1 parent cacaa07 commit ba25a6d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

app/design/frontend/base/default/layout/captcha.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<block type="core/text_list" name="form.additional.info">
3333
<block type="captcha/captcha" name="captcha">
3434
<reference name="head">
35-
<action method="addJs"><file>mage/captcha.js</file></action>
35+
<action method="addJs" ifconfig="customer/captcha/enable"><file>mage/captcha.js</file></action>
3636
</reference>
3737
<action method="setFormId"><formId>user_login</formId></action>
3838
<action method="setImgWidth"><width>230</width></action>
@@ -46,7 +46,7 @@
4646
<block type="core/text_list" name="form.additional.info">
4747
<block type="captcha/captcha" name="captcha">
4848
<reference name="head">
49-
<action method="addJs"><file>mage/captcha.js</file></action>
49+
<action method="addJs" ifconfig="customer/captcha/enable"><file>mage/captcha.js</file></action>
5050
</reference>
5151
<action method="setFormId"><formId>user_forgotpassword</formId></action>
5252
<action method="setImgWidth"><width>230</width></action>
@@ -60,7 +60,7 @@
6060
<block type="core/text_list" name="form.additional.info">
6161
<block type="captcha/captcha" name="captcha">
6262
<reference name="head">
63-
<action method="addJs"><file>mage/captcha.js</file></action>
63+
<action method="addJs" ifconfig="customer/captcha/enable"><file>mage/captcha.js</file></action>
6464
</reference>
6565
<action method="setFormId"><formId>user_create</formId></action>
6666
<action method="setImgWidth"><width>230</width></action>
@@ -74,7 +74,7 @@
7474
<block type="core/text_list" name="form.additional.info">
7575
<block type="captcha/captcha" name="captcha">
7676
<reference name="head">
77-
<action method="addJs"><file>mage/captcha.js</file></action>
77+
<action method="addJs" ifconfig="customer/captcha/enable"><file>mage/captcha.js</file></action>
7878
</reference>
7979
<action method="setFormId"><formId>user_login</formId></action>
8080
<action method="setImgWidth"><width>230</width></action>
@@ -86,15 +86,15 @@
8686
<block type="core/text_list" name="form.additional.info">
8787
<block type="captcha/captcha" name="captcha.guest.checkout">
8888
<reference name="head">
89-
<action method="addJs"><file>mage/captcha.js</file></action>
89+
<action method="addJs" ifconfig="customer/captcha/enable"><file>mage/captcha.js</file></action>
9090
</reference>
9191
<action method="setFormId"><formId>guest_checkout</formId></action>
9292
<action method="setImgWidth"><width>230</width></action>
9393
<action method="setImgHeight"><width>50</width></action>
9494
</block>
9595
<block type="captcha/captcha" name="captcha.register.during.checkout">
9696
<reference name="head">
97-
<action method="addJs"><file>mage/captcha.js</file></action>
97+
<action method="addJs" ifconfig="customer/captcha/enable"><file>mage/captcha.js</file></action>
9898
</reference>
9999
<action method="setFormId"><formId>register_during_checkout</formId></action>
100100
<action method="setImgWidth"><width>230</width></action>
@@ -108,7 +108,7 @@
108108
<block type="core/text_list" name="wishlist.sharing.form.additional.info">
109109
<block type="captcha/captcha" name="captcha">
110110
<reference name="head">
111-
<action method="addJs"><file>mage/captcha.js</file></action>
111+
<action method="addJs" ifconfig="customer/captcha/enable"><file>mage/captcha.js</file></action>
112112
</reference>
113113
<action method="setFormId"><formId>wishlist_sharing</formId></action>
114114
<action method="setImgWidth"><width>230</width></action>
@@ -122,7 +122,7 @@
122122
<block type="core/text_list" name="sendfriend.send.form.additional.info">
123123
<block type="captcha/captcha" name="captcha">
124124
<reference name="head">
125-
<action method="addJs"><file>mage/captcha.js</file></action>
125+
<action method="addJs" ifconfig="customer/captcha/enable"><file>mage/captcha.js</file></action>
126126
</reference>
127127
<action method="setFormId"><formId>sendfriend_send</formId></action>
128128
<action method="setImgWidth"><width>230</width></action>

0 commit comments

Comments
 (0)