Studioforty9_Recaptcha - Version 1.2.0.1

Version Notes

Tested on Magento versions: 1.7.0.2, 1.8.0.0, 1.8.1.0, 1.9.0.1 and 1.9.1.0. See https://travis-ci.org/StudioForty9/Recaptcha for more.

Download this release

Release Info

Developer StudioForty9
Extension Studioforty9_Recaptcha
Version 1.2.0.1
Comparing to
See all releases


Code changes from version 1.1.0 to 1.2.0.1

Files changed (21) hide show
  1. app/code/community/Studioforty9/Recaptcha/Block/Autorender.php +1 -1
  2. app/code/community/Studioforty9/Recaptcha/Block/Explicit.php +62 -2
  3. app/code/community/Studioforty9/Recaptcha/Helper/Data.php +2 -2
  4. app/code/community/Studioforty9/Recaptcha/Helper/Request.php +1 -1
  5. app/code/community/Studioforty9/Recaptcha/Helper/Response.php +1 -1
  6. app/code/community/Studioforty9/Recaptcha/Model/Observer.php +1 -1
  7. app/code/community/Studioforty9/Recaptcha/Model/Source/Theme.php +1 -1
  8. app/code/community/Studioforty9/Recaptcha/etc/config.xml +2 -2
  9. app/code/community/Studioforty9/Recaptcha/etc/system.xml +1 -1
  10. app/design/frontend/base/default/layout/studioforty9_recaptcha.xml +1 -1
  11. app/design/frontend/base/default/template/studioforty9/recaptcha/autorender.phtml +1 -1
  12. app/design/frontend/base/default/template/studioforty9/recaptcha/explicit.phtml +5 -4
  13. app/design/frontend/base/default/template/studioforty9/recaptcha/samples/base/contacts/form.phtml +8 -21
  14. app/design/frontend/base/default/template/studioforty9/recaptcha/samples/base/persistent/customer/form/register.phtml +8 -21
  15. app/design/frontend/base/default/template/studioforty9/recaptcha/samples/base/review/form.phtml +8 -21
  16. app/design/frontend/base/default/template/studioforty9/recaptcha/samples/base/sendfriend/send.phtml +8 -21
  17. app/design/frontend/base/default/template/studioforty9/recaptcha/samples/rwd/contacts/form.phtml +74 -0
  18. app/design/frontend/base/default/template/studioforty9/recaptcha/samples/rwd/customer/form/register.phtml +189 -0
  19. app/design/frontend/base/default/template/studioforty9/recaptcha/samples/rwd/review/form.phtml +166 -0
  20. app/design/frontend/base/default/template/studioforty9/recaptcha/samples/rwd/sendfriend/send.phtml +144 -0
  21. package.xml +5 -5
app/code/community/Studioforty9/Recaptcha/Block/Autorender.php CHANGED
@@ -7,7 +7,7 @@
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
- * @version 1.1.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  */
13
 
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
+ * @version 1.2.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  */
13
 
app/code/community/Studioforty9/Recaptcha/Block/Explicit.php CHANGED
@@ -7,7 +7,7 @@
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
- * @version 1.1.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  */
13
 
@@ -20,6 +20,54 @@
20
  */
21
  class Studioforty9_Recaptcha_Block_Explicit extends Mage_Core_Block_Template
22
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  /**
24
  * Get the reCAPTACHA javascript code.
25
  *
@@ -31,7 +79,19 @@ class Studioforty9_Recaptcha_Block_Explicit extends Mage_Core_Block_Template
31
  return '';
32
  }
33
 
34
- return '<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script>';
 
 
 
 
 
 
 
 
 
 
 
 
35
  }
36
 
37
  /**
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
+ * @version 1.2.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  */
13
 
20
  */
21
  class Studioforty9_Recaptcha_Block_Explicit extends Mage_Core_Block_Template
22
  {
23
+ protected $_languages = array(
24
+ 'ar_DZ|ar_SA|ar_KW|ar_MA|ar_EG|az_AZ|' => 'ar',
25
+ 'bg_BG' => 'bg',
26
+ 'ca_ES' => 'ca',
27
+ 'zh_CN' => 'zh-CN',
28
+ 'zh_HK|zh_TW' => 'zh-TW',
29
+ 'hr_HR' => 'hr',
30
+ 'cs_CZ' => 'cs',
31
+ 'da_DK' => 'da',
32
+ 'nl_NL' => 'nl',
33
+ 'en_GB|en_AU|en_NZ|en_IE|cy_GB' => 'en-GB',
34
+ 'en_US|en_CA' => 'en',
35
+ 'fil_PH' => 'fil',
36
+ 'fi_FI' => 'fi',
37
+ 'fr_FR' => 'fr',
38
+ 'fr_CA' => 'fr-CA',
39
+ 'de_DE' => 'de',
40
+ 'de_AT)' => 'de-AT',
41
+ 'de_CH' => 'de-CH',
42
+ 'el_GR' => 'el',
43
+ 'he_IL' => 'iw',
44
+ 'hi_IN' => 'hi',
45
+ 'hu_HU' => 'hu',
46
+ 'gu_IN|id_ID' => 'id',
47
+ 'it_IT|it_CH' => 'it',
48
+ 'ja_JP' => 'ja',
49
+ 'ko_KR' => 'ko',
50
+ 'lv_LV' => 'lv',
51
+ 'lt_LT' => 'lt',
52
+ 'nb_NO' => 'no',
53
+ 'fa_IR' => 'fa',
54
+ 'pl_PL' => 'pl',
55
+ 'pt_BR' => 'pt-BR',
56
+ 'pt_PT' => 'pt-PT',
57
+ 'ro_RO' => 'ro',
58
+ 'ru_RU' => 'ru',
59
+ 'sr_RS' => 'sr',
60
+ 'sk_SK' => 'sk',
61
+ 'sl_SI' => 'sl',
62
+ 'es_ES|gl_ES' => 'es',
63
+ 'es_AR|es_CL|es_CO|es_CR|es_MX|es_PA|es_PE|es_VE' => 'es-419',
64
+ 'sv_SE' => 'sv',
65
+ 'th_TH' => 'th',
66
+ 'tr_TR' => 'tr',
67
+ 'uk_UA' => 'uk',
68
+ 'vi_VN' => 'vi'
69
+ );
70
+
71
  /**
72
  * Get the reCAPTACHA javascript code.
73
  *
79
  return '';
80
  }
81
 
82
+ $language = Mage::app()->getLocale()->getLocale()->toString();
83
+ $lang = 'en';
84
+
85
+ foreach ($this->_languages as $options => $_lang) {
86
+ if (stristr($options, $language)) {
87
+ $lang = $_lang;
88
+ }
89
+ }
90
+
91
+ return sprintf(
92
+ '<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit&hl=%s" async defer></script>',
93
+ $lang
94
+ );
95
  }
96
 
97
  /**
app/code/community/Studioforty9/Recaptcha/Helper/Data.php CHANGED
@@ -7,7 +7,7 @@
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
- * @version 1.1.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  */
13
 
@@ -169,7 +169,7 @@ class Studioforty9_Recaptcha_Helper_Data extends Mage_Core_Helper_Abstract
169
  if (! Mage::getConfig()->getModuleConfig("Studioforty9_Recaptcha")->is('active', 'true')) {
170
  return false;
171
  }
172
-
173
  $acl = array(
174
  'contacts' => $this->isContactsEnabled(),
175
  'review' => $this->isReviewsEnabled(),
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
+ * @version 1.2.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  */
13
 
169
  if (! Mage::getConfig()->getModuleConfig("Studioforty9_Recaptcha")->is('active', 'true')) {
170
  return false;
171
  }
172
+
173
  $acl = array(
174
  'contacts' => $this->isContactsEnabled(),
175
  'review' => $this->isReviewsEnabled(),
app/code/community/Studioforty9/Recaptcha/Helper/Request.php CHANGED
@@ -7,7 +7,7 @@
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
- * @version 1.1.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  */
13
 
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
+ * @version 1.2.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  */
13
 
app/code/community/Studioforty9/Recaptcha/Helper/Response.php CHANGED
@@ -7,7 +7,7 @@
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
- * @version 1.1.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  */
13
 
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
+ * @version 1.2.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  */
13
 
app/code/community/Studioforty9/Recaptcha/Model/Observer.php CHANGED
@@ -7,7 +7,7 @@
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
- * @version 1.1.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  */
13
 
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
+ * @version 1.2.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  */
13
 
app/code/community/Studioforty9/Recaptcha/Model/Source/Theme.php CHANGED
@@ -7,7 +7,7 @@
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
- * @version 1.1.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  */
13
 
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
+ * @version 1.2.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  */
13
 
app/code/community/Studioforty9/Recaptcha/etc/config.xml CHANGED
@@ -8,14 +8,14 @@
8
  * @author StudioForty9 <info@studioforty9.com>
9
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
10
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
11
- * @version 1.1.0
12
  * @link https://github.com/studioforty9/recaptcha
13
  */
14
  -->
15
  <config>
16
  <modules>
17
  <Studioforty9_Recaptcha>
18
- <version>1.1.0</version>
19
  </Studioforty9_Recaptcha>
20
  </modules>
21
  <global>
8
  * @author StudioForty9 <info@studioforty9.com>
9
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
10
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
11
+ * @version 1.2.0
12
  * @link https://github.com/studioforty9/recaptcha
13
  */
14
  -->
15
  <config>
16
  <modules>
17
  <Studioforty9_Recaptcha>
18
+ <version>1.2.0</version>
19
  </Studioforty9_Recaptcha>
20
  </modules>
21
  <global>
app/code/community/Studioforty9/Recaptcha/etc/system.xml CHANGED
@@ -8,7 +8,7 @@
8
  * @author StudioForty9 <info@studioforty9.com>
9
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
10
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
11
- * @version 1.1.0
12
  * @link https://github.com/studioforty9/recaptcha
13
  */
14
  -->
8
  * @author StudioForty9 <info@studioforty9.com>
9
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
10
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
11
+ * @version 1.2.0
12
  * @link https://github.com/studioforty9/recaptcha
13
  */
14
  -->
app/design/frontend/base/default/layout/studioforty9_recaptcha.xml CHANGED
@@ -8,7 +8,7 @@
8
  * @author StudioForty9 <info@studioforty9.com>
9
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
10
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
11
- * @version 1.1.0
12
  * @link https://github.com/studioforty9/recaptcha
13
  */
14
  -->
8
  * @author StudioForty9 <info@studioforty9.com>
9
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
10
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
11
+ * @version 1.2.0
12
  * @link https://github.com/studioforty9/recaptcha
13
  */
14
  -->
app/design/frontend/base/default/template/studioforty9/recaptcha/autorender.phtml CHANGED
@@ -7,7 +7,7 @@
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
- * @version 1.1.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  * @see Studioforty9_Recaptcha_Block_Autorender
13
  */
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
+ * @version 1.2.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  * @see Studioforty9_Recaptcha_Block_Autorender
13
  */
app/design/frontend/base/default/template/studioforty9/recaptcha/explicit.phtml CHANGED
@@ -7,7 +7,7 @@
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
- * @version 1.1.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  * @see Studioforty9_Recaptcha_Block_Explicit
13
  */
@@ -22,9 +22,10 @@
22
  'sitekey': "<?php echo $this->getSiteKey(); ?>",
23
  'theme': "<?php echo $this->getTheme(); ?>",
24
  'callback': function(response) {
25
- console.log(response);
26
- $('recaptcha-verification-1').writeAttribute('value', 'checked');
27
- $('recaptcha-verification-1').checked = true;
 
28
  }
29
  });
30
  };
7
  * @author StudioForty9 <info@studioforty9.com>
8
  * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
  * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
+ * @version 1.2.0
11
  * @link https://github.com/studioforty9/recaptcha
12
  * @see Studioforty9_Recaptcha_Block_Explicit
13
  */
22
  'sitekey': "<?php echo $this->getSiteKey(); ?>",
23
  'theme': "<?php echo $this->getTheme(); ?>",
24
  'callback': function(response) {
25
+ if (response.length > 0) {
26
+ $('recaptcha-verification-1').writeAttribute('value', 'checked');
27
+ $('recaptcha-verification-1').checked = true;
28
+ }
29
  }
30
  });
31
  };
app/design/frontend/base/default/template/studioforty9/recaptcha/samples/base/contacts/form.phtml CHANGED
@@ -1,27 +1,14 @@
1
  <?php
2
  /**
3
- * Magento
4
  *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
8
- * that is bundled with this package in the file LICENSE_AFL.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/afl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category design
22
- * @package base_default
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
  */
26
  ?>
27
  <div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
1
  <?php
2
  /**
3
+ * Studioforty9_Recaptcha
4
  *
5
+ * @category Studioforty9
6
+ * @package Studioforty9_Recaptcha
7
+ * @author StudioForty9 <info@studioforty9.com>
8
+ * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
+ * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
+ * @version 1.2.0
11
+ * @link https://github.com/studioforty9/recaptcha
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  */
13
  ?>
14
  <div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
app/design/frontend/base/default/template/studioforty9/recaptcha/samples/base/persistent/customer/form/register.phtml CHANGED
@@ -1,27 +1,14 @@
1
  <?php
2
  /**
3
- * Magento
4
  *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
8
- * that is bundled with this package in the file LICENSE_AFL.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/afl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category design
22
- * @package base_default
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
  */
26
  ?>
27
  <?php
1
  <?php
2
  /**
3
+ * Studioforty9_Recaptcha
4
  *
5
+ * @category Studioforty9
6
+ * @package Studioforty9_Recaptcha
7
+ * @author StudioForty9 <info@studioforty9.com>
8
+ * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
+ * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
+ * @version 1.2.0
11
+ * @link https://github.com/studioforty9/recaptcha
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  */
13
  ?>
14
  <?php
app/design/frontend/base/default/template/studioforty9/recaptcha/samples/base/review/form.phtml CHANGED
@@ -1,27 +1,14 @@
1
  <?php
2
  /**
3
- * Magento
4
  *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
8
- * that is bundled with this package in the file LICENSE_AFL.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/afl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category design
22
- * @package base_default
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
  */
26
  ?>
27
  <div class="form-add">
1
  <?php
2
  /**
3
+ * Studioforty9_Recaptcha
4
  *
5
+ * @category Studioforty9
6
+ * @package Studioforty9_Recaptcha
7
+ * @author StudioForty9 <info@studioforty9.com>
8
+ * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
+ * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
+ * @version 1.2.0
11
+ * @link https://github.com/studioforty9/recaptcha
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  */
13
  ?>
14
  <div class="form-add">
app/design/frontend/base/default/template/studioforty9/recaptcha/samples/base/sendfriend/send.phtml CHANGED
@@ -1,27 +1,14 @@
1
  <?php
2
  /**
3
- * Magento
4
  *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
8
- * that is bundled with this package in the file LICENSE_AFL.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/afl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category design
22
- * @package base_default
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
  */
26
  /* @var $this Mage_Sendfriend_Block_Send */
27
  /**
1
  <?php
2
  /**
3
+ * Studioforty9_Recaptcha
4
  *
5
+ * @category Studioforty9
6
+ * @package Studioforty9_Recaptcha
7
+ * @author StudioForty9 <info@studioforty9.com>
8
+ * @copyright 2015 StudioForty9 (http://www.studioforty9.com)
9
+ * @license https://github.com/studioforty9/recaptcha/blob/master/LICENCE BSD
10
+ * @version 1.2.0
11
+ * @link https://github.com/studioforty9/recaptcha
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  */
13
  /* @var $this Mage_Sendfriend_Block_Send */
14
  /**
app/design/frontend/base/default/template/studioforty9/recaptcha/samples/rwd/contacts/form.phtml ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package rwd_default
23
+ * @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
28
+ <div class="page-title">
29
+ <h1><?php echo Mage::helper('contacts')->__('Contact Us') ?></h1>
30
+ </div>
31
+ <form action="<?php echo $this->getFormAction(); ?>" id="contactForm" method="post" class="scaffold-form">
32
+ <div class="fieldset">
33
+ <h2 class="legend"><?php echo Mage::helper('contacts')->__('Contact Information') ?></h2>
34
+ <p class="required"><?php echo Mage::helper('contacts')->__('* Required Fields') ?></p>
35
+ <ul class="form-list">
36
+ <li class="fields">
37
+ <div class="field">
38
+ <label for="name" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Name') ?></label>
39
+ <div class="input-box">
40
+ <input name="name" id="name" title="<?php echo Mage::helper('contacts')->__('Name') ?>" value="<?php echo $this->escapeHtml($this->helper('contacts')->getUserName()) ?>" class="input-text required-entry" type="text" />
41
+ </div>
42
+ </div>
43
+ <div class="field">
44
+ <label for="email" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Email') ?></label>
45
+ <div class="input-box">
46
+ <input name="email" id="email" title="<?php echo Mage::helper('contacts')->__('Email') ?>" value="<?php echo $this->escapeHtml($this->helper('contacts')->getUserEmail()) ?>" class="input-text required-entry validate-email" type="email" autocapitalize="off" autocorrect="off" spellcheck="false" />
47
+ </div>
48
+ </div>
49
+ </li>
50
+ <li>
51
+ <label for="telephone"><?php echo Mage::helper('contacts')->__('Telephone') ?></label>
52
+ <div class="input-box">
53
+ <input name="telephone" id="telephone" title="<?php echo Mage::helper('contacts')->__('Telephone') ?>" value="" class="input-text" type="tel" />
54
+ </div>
55
+ </li>
56
+ <li class="wide">
57
+ <label for="comment" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Comment') ?></label>
58
+ <div class="input-box">
59
+ <textarea name="comment" id="comment" title="<?php echo Mage::helper('contacts')->__('Comment') ?>" class="required-entry input-text" cols="5" rows="3"></textarea>
60
+ </div>
61
+ </li>
62
+ </ul>
63
+ </div>
64
+ <?php echo $this->getChildHtml('studioforty9.recaptcha.explicit'); ?>
65
+ <div class="buttons-set">
66
+ <input type="text" name="hideit" id="hideit" value="" style="display:none !important;" />
67
+ <button type="submit" title="<?php echo Mage::helper('contacts')->__('Submit') ?>" class="button"><span><span><?php echo Mage::helper('contacts')->__('Submit') ?></span></span></button>
68
+ </div>
69
+ </form>
70
+ <script type="text/javascript">
71
+ //<![CDATA[
72
+ var contactForm = new VarienForm('contactForm', true);
73
+ //]]>
74
+ </script>
app/design/frontend/base/default/template/studioforty9/recaptcha/samples/rwd/customer/form/register.phtml ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package rwd_default
23
+ * @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Create account form template
30
+ *
31
+ * @see app/design/frontend/base/default/template/customer/form/register.phtml
32
+ */
33
+ /** @var $this Mage_Customer_Block_Form_Register */
34
+ ?>
35
+ <div class="account-create">
36
+ <div class="page-title">
37
+ <h1><?php echo $this->__('Create an Account') ?></h1>
38
+ </div>
39
+ <?php echo $this->getChildHtml('form_fields_before')?>
40
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
41
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate" class="scaffold-form" enctype="multipart/form-data">
42
+ <div class="fieldset">
43
+ <input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
44
+ <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
45
+ <p class="form-instructions"><?php echo $this->__('Please enter the following information to create your account.') ?></p>
46
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
47
+ <ul class="form-list">
48
+ <li class="fields">
49
+ <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->setForceUseCustomerAttributes(true)->toHtml() ?>
50
+ </li>
51
+ <li>
52
+ <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
53
+ <div class="input-box">
54
+ <input type="email" autocapitalize="off" autocorrect="off" spellcheck="false" name="email" id="email_address" value="<?php echo $this->escapeHtml($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
55
+ </div>
56
+ </li>
57
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
58
+ <?php if ($_dob->isEnabled()): ?>
59
+ <li><?php echo $_dob->setDate($this->getFormData()->getDob())->toHtml() ?></li>
60
+ <?php endif ?>
61
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
62
+ <?php if ($_taxvat->isEnabled()): ?>
63
+ <li><?php echo $_taxvat->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?></li>
64
+ <?php endif ?>
65
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
66
+ <?php if ($_gender->isEnabled()): ?>
67
+ <li><?php echo $_gender->setGender($this->getFormData()->getGender())->toHtml() ?></li>
68
+ <?php endif ?>
69
+
70
+ <?php if($this->getShowAddressFields()): ?>
71
+ <li class="hidden">
72
+ <input type="hidden" name="create_address" value="1" />
73
+ </li>
74
+ <li class="fields">
75
+ <div class="field">
76
+ <label for="company"><?php echo $this->__('Company') ?></label>
77
+ <div class="input-box">
78
+ <input type="text" name="company" id="company" value="<?php echo $this->escapeHtml($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" />
79
+ </div>
80
+ </div>
81
+ <div class="field">
82
+ <label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
83
+ <div class="input-box">
84
+ <input type="tel" name="telephone" id="telephone" value="<?php echo $this->escapeHtml($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" />
85
+ </div>
86
+ </div>
87
+ </li>
88
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
89
+ <li class="wide">
90
+ <label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
91
+ <div class="input-box">
92
+ <input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet(0)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text <?php echo $_streetValidationClass ?>" />
93
+ </div>
94
+ </li>
95
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
96
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
97
+ <li class="wide">
98
+ <label for="billing:street<?php echo $_i ?>"><?php echo $this->__('Street Address %s', $_i) ?></label>
99
+ <div class="input-box">
100
+ <input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet($_i - 1)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i ?>" class="input-text <?php echo $_streetValidationClass ?>" />
101
+ </div>
102
+ </li>
103
+ <?php endfor; ?>
104
+ <li class="fields">
105
+ <div class="field">
106
+ <label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
107
+ <div class="input-box">
108
+ <input type="text" name="city" value="<?php echo $this->escapeHtml($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="city" />
109
+ </div>
110
+ </div>
111
+ <div class="field">
112
+ <label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
113
+ <div class="input-box">
114
+ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
115
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
116
+ </select>
117
+ <script type="text/javascript">
118
+ //<![CDATA[
119
+ $('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
120
+ //]]>
121
+ </script>
122
+ <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
123
+ </div>
124
+ </div>
125
+ </li>
126
+ <li class="fields">
127
+ <div class="field">
128
+ <label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
129
+ <div class="input-box">
130
+ <input type="text" name="postcode" value="<?php echo $this->escapeHtml($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
131
+ </div>
132
+ </div>
133
+ <div class="field">
134
+ <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
135
+ <div class="input-box">
136
+ <?php echo $this->getCountryHtmlSelect() ?>
137
+ </div>
138
+ </div>
139
+ </li>
140
+ <li class="hidden">
141
+ <input type="hidden" name="default_billing" value="1" />
142
+ <input type="hidden" name="default_shipping" value="1" />
143
+ </li>
144
+ <?php endif; ?>
145
+ <li class="fields">
146
+ <div class="field">
147
+ <label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
148
+ <div class="input-box">
149
+ <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
150
+ </div>
151
+ </div>
152
+ <div class="field">
153
+ <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
154
+ <div class="input-box">
155
+ <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
156
+ </div>
157
+ </div>
158
+ </li>
159
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
160
+ <?php if ($this->isNewsletterEnabled()): ?>
161
+ <li class="control">
162
+ <div class="input-box">
163
+ <input type="checkbox" name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" />
164
+ </div>
165
+ <label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
166
+ </li>
167
+ <?php endif ?>
168
+ <?php echo $this->getChildHtml('persistent.remember.me'); ?>
169
+ </ul>
170
+ <?php echo $this->getChildHtml('persistent.remember.me.tooltip'); ?>
171
+ </div>
172
+ <?php echo $this->getChildHtml('studioforty9.recaptcha.explicit'); ?>
173
+ <div class="buttons-set">
174
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>" class="back-link"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
175
+ <button type="submit" title="<?php echo $this->__('Register') ?>" class="button"><span><span><?php echo $this->__('Register') ?></span></span></button>
176
+ </div>
177
+ <?php if (Mage::helper('checkout')->isContextCheckout()): ?>
178
+ <input name="context" type="hidden" value="checkout" />
179
+ <?php endif; ?>
180
+ </form>
181
+ <script type="text/javascript">
182
+ //<![CDATA[
183
+ var dataForm = new VarienForm('form-validate', true);
184
+ <?php if($this->getShowAddressFields()): ?>
185
+ new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
186
+ <?php endif; ?>
187
+ //]]>
188
+ </script>
189
+ </div>
app/design/frontend/base/default/template/studioforty9/recaptcha/samples/rwd/review/form.phtml ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package rwd_default
23
+ * @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="form-add">
28
+ <h2><?php echo $this->__('Write Your Own Review') ?></h2>
29
+ <?php if ($this->getAllowWriteReviewFlag()): ?>
30
+ <form action="<?php echo $this->getAction() ?>" method="post" id="review-form">
31
+ <?php echo $this->getBlockHtml('formkey'); ?>
32
+ <?php echo $this->getChildHtml('form_fields_before')?>
33
+ <h3><?php echo $this->__("You're reviewing:"); ?>
34
+ <span><?php echo $this->escapeHtml($this->getProductInfo()->getName()) ?></span>
35
+ </h3>
36
+
37
+ <div class="fieldset">
38
+ <?php if( $this->getRatings() && $this->getRatings()->getSize()): ?>
39
+ <h4><?php echo $this->__('How do you rate this product?') ?> <em class="required">*</em></h4>
40
+ <span id="input-message-box"></span>
41
+ <table class="data-table review-summary-table ratings" id="product-review-table">
42
+ <col width="1" />
43
+ <col />
44
+ <col />
45
+ <col />
46
+ <col />
47
+ <col />
48
+ <thead>
49
+ <tr>
50
+ <th>&nbsp;</th>
51
+ <th>
52
+ <div class="rating-box">
53
+ <span class="rating-number">1</span>
54
+ <span class="rating nobr" style="width:20%;"><?php echo $this->__('1 star') ?></span>
55
+ </div>
56
+ </th>
57
+ <th>
58
+ <div class="rating-box">
59
+ <span class="rating-number">2</span>
60
+ <span class="rating nobr" style="width:40%;"><?php echo $this->__('2 star') ?></span>
61
+ </div>
62
+ </th>
63
+ <th>
64
+ <div class="rating-box">
65
+ <span class="rating-number">3</span>
66
+ <span class="rating nobr" style="width:60%;"><?php echo $this->__('3 star') ?></span>
67
+ </div>
68
+ </th>
69
+ <th>
70
+ <div class="rating-box">
71
+ <span class="rating-number">4</span>
72
+ <span class="rating nobr" style="width:80%;"><?php echo $this->__('4 star') ?></span>
73
+ </div>
74
+ </th>
75
+ <th>
76
+ <div class="rating-box">
77
+ <span class="rating-number">5</span>
78
+ <span class="rating nobr" style="width:100%;"><?php echo $this->__('5 star') ?></span>
79
+ </div>
80
+ </th>
81
+ </tr>
82
+ </thead>
83
+ <tbody>
84
+ <?php foreach ($this->getRatings() as $_rating): ?>
85
+ <tr>
86
+ <th><?php echo $this->escapeHtml($_rating->getRatingCode()) ?></th>
87
+ <?php foreach ($_rating->getOptions() as $_option): ?>
88
+ <td class="value"><label for="<?php echo $this->escapeHtml($_rating->getRatingCode()) ?>_<?php echo $_option->getValue() ?>"><input type="radio" name="ratings[<?php echo $_rating->getId() ?>]" id="<?php echo $this->escapeHtml($_rating->getRatingCode()) ?>_<?php echo $_option->getValue() ?>" value="<?php echo $_option->getId() ?>" class="radio" /></label></td>
89
+ <?php endforeach; ?>
90
+ </tr>
91
+ <?php endforeach; ?>
92
+ </tbody>
93
+ </table>
94
+ <input type="hidden" name="validate_rating" class="validate-rating" value="" />
95
+ <script type="text/javascript">decorateTable('product-review-table')</script>
96
+ <?php endif; ?>
97
+
98
+ <ul class="form-list">
99
+ <li>
100
+ <label for="review_field" class="required"><em>*</em><?php echo $this->__('Let us know your thoughts') ?></label>
101
+ <div class="input-box">
102
+ <textarea name="detail" id="review_field" cols="5" rows="3" class="required-entry"><?php echo $this->escapeHtml($data->getDetail()) ?></textarea>
103
+ </div>
104
+ </li>
105
+
106
+ <li class="inline-label">
107
+ <label for="summary_field" class="required"><em>*</em><?php echo $this->__('Summary of Your Review') ?></label>
108
+ <div class="input-box">
109
+ <input type="text" name="title" id="summary_field" class="input-text required-entry" value="<?php echo $this->escapeHtml($data->getTitle()) ?>" />
110
+ </div>
111
+ </li>
112
+
113
+ <li class="inline-label">
114
+ <label for="nickname_field" class="required"><em>*</em><?php echo $this->__("What's your nickname?") ?></label>
115
+ <div class="input-box">
116
+ <input type="text" name="nickname" id="nickname_field" class="input-text required-entry" value="<?php echo $this->escapeHtml($data->getNickname()) ?>" />
117
+ </div>
118
+ </li>
119
+
120
+ </ul>
121
+ </div>
122
+ <?php echo $this->getChildHtml('studioforty9.recaptcha.explicit'); ?>
123
+ <div class="buttons-set">
124
+ <button type="submit" title="<?php echo $this->__('Submit Review') ?>" class="button"><span><span><?php echo $this->__('Submit Review') ?></span></span></button>
125
+ </div>
126
+ </form>
127
+ <script type="text/javascript">
128
+ //<![CDATA[
129
+ var dataForm = new VarienForm('review-form');
130
+ Validation.addAllThese(
131
+ [
132
+ ['validate-rating', '<?php echo $this->__('Please select one of each of the ratings above') ?>', function(v) {
133
+ var trs = $('product-review-table').select('tr');
134
+ var inputs;
135
+ var error = 1;
136
+
137
+ for( var j=0; j < trs.length; j++ ) {
138
+ var tr = trs[j];
139
+ if( j > 0 ) {
140
+ inputs = tr.select('input');
141
+
142
+ for( i in inputs ) {
143
+ if( inputs[i].checked == true ) {
144
+ error = 0;
145
+ }
146
+ }
147
+
148
+ if( error == 1 ) {
149
+ return false;
150
+ } else {
151
+ error = 1;
152
+ }
153
+ }
154
+ }
155
+ return true;
156
+ }]
157
+ ]
158
+ );
159
+ //]]>
160
+ </script>
161
+ <?php else: ?>
162
+ <p class="review-nologged" id="review-form">
163
+ <?php echo $this->__('Only registered users can write reviews. Please, <a href="%s">log in</a> or <a href="%s">register</a>', $this->getLoginLink(), Mage::helper('customer')->getRegisterUrl()) ?>
164
+ </p>
165
+ <?php endif ?>
166
+ </div>
app/design/frontend/base/default/template/studioforty9/recaptcha/samples/rwd/sendfriend/send.phtml ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package rwd_default
23
+ * @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ /* @var $this Mage_Sendfriend_Block_Send */
27
+ /**
28
+ * Send to friend form
29
+ *
30
+ * @see Mage_Sendfriend_Block_Send
31
+ */
32
+ ?>
33
+ <script type="text/javascript">
34
+ //<![CDATA[
35
+ i=0;
36
+ var recipCount = 1;
37
+ var maxRecip = <?php echo $this->getMaxRecipients() ?>;
38
+ function remove_recipient(i){
39
+ $('recipients_name'+i).up(2).remove();
40
+ recipCount--;
41
+ if(recipCount<maxRecip && maxRecip != 0) {
42
+ $('add_recipient_button').show();
43
+ $('max_recipient_message').hide();
44
+ }
45
+ return false;
46
+ }
47
+
48
+ function add_recipient(){
49
+ ul = $('recipients_options');
50
+ var li_mail = Element.extend(document.createElement("LI"));
51
+ li_mail.addClassName('fields additional-row');
52
+ li_mail.innerHTML = '<p><a href="delete_email" title="<?php echo $this->jsQuoteEscape($this->__('Remove Email')) ?>" onclick="remove_recipient('+i+'); return false" class="btn-remove"><?php echo $this->jsQuoteEscape($this->__('Remove Email')) ?>"<\/a><\/p>'
53
+ li_mail.innerHTML += '<div class="field"><label for="recipients_name'+i+'" class="required"><em>*<\/em><?php echo $this->jsQuoteEscape($this->__('Name:')) ?><\/label><div class="input-box"><input name="recipients[name][]" type="text" class="input-text required-entry" id="recipients_name'+i+'" /><\/div>';
54
+ li_mail.innerHTML += '<div class="field"><label for="recipients_email'+i+'" class="required"><em>*<\/em><?php echo $this->jsQuoteEscape($this->__('Email Address:')) ?><\/label><div class="input-box"><input name="recipients[email][]" value="" title="<?php echo $this->jsQuoteEscape($this->__('Email Address')) ?>" id="recipients_email'+i+'" type="text" class="input-text required-entry validate-email" /><\/div><\/div>';
55
+ i++;
56
+ recipCount++;
57
+ if(recipCount>=maxRecip && maxRecip != 0) {
58
+ $('add_recipient_button').hide();
59
+ $('max_recipient_message').show();
60
+ }
61
+
62
+ ul.appendChild(li_mail);
63
+ }
64
+ //]]>
65
+ </script>
66
+
67
+ <div class="send-friend">
68
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
69
+ <div class="page-title">
70
+ <h1><?php echo $this->__('Email to a Friend') ?></h1>
71
+ </div>
72
+ <form action="<?php echo $this->getSendUrl() ?>" method="post" id="product_sendtofriend_form">
73
+ <div class="fieldset">
74
+ <?php echo $this->getBlockHtml('formkey')?>
75
+ <h2 class="legend"><?php echo $this->__('Sender:') ?></h2>
76
+ <ul class="form-list" id="sender_options">
77
+ <li class="fields">
78
+ <div class="field">
79
+ <label for="sender_name" class="required"><em>*</em><?php echo $this->__('Name:') ?></label>
80
+ <div class="input-box">
81
+ <input name="sender[name]" value="<?php echo $this->escapeHtml($this->getUserName()) ?>" title="<?php echo $this->__('Name') ?>" id="sender_name" type="text" class="input-text required-entry" />
82
+ </div>
83
+ </div>
84
+ <div class="field">
85
+ <label for="sender_email" class="required"><em>*</em><?php echo $this->__('Email:') ?></label>
86
+ <div class="input-box">
87
+ <input name="sender[email]" value="<?php echo $this->escapeHtml($this->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" id="sender_email" type="email" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry validate-email" />
88
+ </div>
89
+ </div>
90
+ </li>
91
+ <li class="wide">
92
+ <label for="sender_message" class="required"><em>*</em><?php echo $this->__('Message:') ?></label>
93
+ <div class="input-box">
94
+ <textarea name="sender[message]" class="input-text required-entry" id="sender_message" cols="3" rows="3"><?php echo $this->escapeHtml($this->getMessage())?></textarea>
95
+ </div>
96
+ </li>
97
+ </ul>
98
+ </div>
99
+ <div class="fieldset">
100
+ <h2 class="legend"><?php echo $this->__('Recipient:') ?></h2>
101
+ <ul class="form-list" id="recipients_options">
102
+ <li class="fields">
103
+ <div class="field">
104
+ <label for="recipients_name" class="required"><em>*</em><?php echo $this->__('Name:') ?></label>
105
+ <div class="input-box">
106
+ <input name="recipients[name][]" type="text" class="input-text required-entry" id="recipients_name" />
107
+ </div>
108
+ </div>
109
+ <div class="field">
110
+ <label for="recipients_email" class="required"><em>*</em><?php echo $this->__('Email Address:') ?></label>
111
+ <div class="input-box">
112
+ <input name="recipients[email][]" value="" title="<?php echo $this->__('Email Address') ?>" id="recipients_email" type="email" autocapitalize="off" autocorrect="off" spellcheck="false" class="input-text required-entry validate-email" />
113
+ </div>
114
+ </div>
115
+ </li>
116
+ </ul>
117
+ </div>
118
+ <?php echo $this->getChildHtml('studioforty9.recaptcha.explicit'); ?>
119
+ <div class="buttons-set">
120
+ <p class="back-link"><a href="#" onclick="history.back(); return false;"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
121
+ <button type="submit" class="button<?php if (!$this->canSend()):?> disabled<?php endif ?>"<?php if (!$this->canSend()):?> disabled="disabled"<?php endif ?>><span><span><?php echo $this->__('Send Email') ?></span></span></button>
122
+ <div id="max_recipient_message" style="display:none;">
123
+ <?php if ($this->getMaxRecipients()): ?>
124
+ <p class="limit"><?php echo $this->__('Maximum %d email addresses allowed.', $this->getMaxRecipients()) ?></p>
125
+ <?php endif; ?>
126
+ </div>
127
+ <?php if (1 < $this->getMaxRecipients()): ?>
128
+ <p id="add_recipient_button">
129
+ <button type="button" onclick="add_recipient();" class="button"><span><span><?php echo $this->__('Add Recipient') ?></span></span></button>
130
+ </p>
131
+ <?php endif; ?>
132
+ </div>
133
+ </form>
134
+ <script type="text/javascript">
135
+ //<![CDATA[
136
+ var productSendtofriendForm = new VarienForm('product_sendtofriend_form');
137
+ productSendtofriendForm.submit = function() {
138
+ if(this.validator.validate()) {
139
+ this.form.submit();
140
+ }
141
+ }.bind(productSendtofriendForm);
142
+ //]]>
143
+ </script>
144
+ </div>
package.xml CHANGED
@@ -1,8 +1,8 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Studioforty9_Recaptcha</name>
4
- <version>1.1.0</version>
5
- <stability>devel</stability>
6
  <license uri="http://opensource.org/licenses/BSD-3-Clause">BSDL</license>
7
  <channel>community</channel>
8
  <extends/>
@@ -38,9 +38,9 @@
38
  &lt;/ol&gt;</description>
39
  <notes>Tested on Magento versions: 1.7.0.2, 1.8.0.0, 1.8.1.0, 1.9.0.1 and 1.9.1.0. See https://travis-ci.org/StudioForty9/Recaptcha for more.</notes>
40
  <authors><author><name>StudioForty9</name><user>SF9</user><email>info@studioforty9.com</email></author><author><name>Eoghan O'Brien</name><user>eoghanobrien</user><email>eoghan@studioforty9.com</email></author></authors>
41
- <date>2015-02-26</date>
42
- <time>21:56:15</time>
43
- <contents><target name="magecommunity"><dir name="Studioforty9"><dir name="Recaptcha"><dir name="Block"><file name="Autorender.php" hash="ca9fce4b930fd8b6077d6f3b2f04e3bb"/><file name="Explicit.php" hash="32c6e9255f5599282b24f03fd8891c06"/></dir><dir name="Helper"><file name="Data.php" hash="dbc0892e9c6f1e94f3d99c984d95917e"/><file name="Request.php" hash="375c4cde8c292e2360a909498c620db6"/><file name="Response.php" hash="2017ced9053966ccea2c4d23cd52d8ff"/></dir><dir name="Model"><file name="Observer.php" hash="0d67e5dadc00623dc44789228433394a"/><dir name="Source"><file name="Theme.php" hash="7ebe33c57b125ca2520037e862b57075"/></dir></dir><dir name="etc"><file name="config.xml" hash="49ee7e7b3fa81fb662b408e9b6282e81"/><file name="system.xml" hash="da98d3715a9116ff96b898df1e306ddf"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="studioforty9_recaptcha.xml" hash="ca3b59003d7473a73fc4283606fc21b4"/></dir><dir name="template"><dir name="studioforty9"><dir name="recaptcha"><file name="autorender.phtml" hash="d93df7b156aa90ba2c184606a0149202"/><file name="explicit.phtml" hash="fdab9be006a22da28400400e2c34ff93"/><dir name="samples"><dir name="base"><dir name="contacts"><file name="form.phtml" hash="f14cc54dde83a12cb9bac124127902be"/></dir><dir name="persistent"><dir name="customer"><dir name="form"><file name="register.phtml" hash="c4a6ccf18099d9d47ff55edf78e0f416"/></dir></dir></dir><dir name="review"><file name="form.phtml" hash="f7e8587e72a51b124ff2c2bcfd8e20b4"/></dir><dir name="sendfriend"><file name="send.phtml" hash="2f49f6800e901d1d63362dc5391cd971"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Studioforty9_Recaptcha.csv" hash="6387abc316e524840fa3b1fcc49dc25d"/></dir></target><target name="mageetc"><dir name="modules"><file name="Studioforty9_Recaptcha.xml" hash="4ea774e9a930bddc77ab8d408b81e008"/></dir></target></contents>
44
  <compatible/>
45
  <dependencies><required><php><min>5.3.0</min><max>5.5.99</max></php></required></dependencies>
46
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Studioforty9_Recaptcha</name>
4
+ <version>1.2.0.1</version>
5
+ <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/BSD-3-Clause">BSDL</license>
7
  <channel>community</channel>
8
  <extends/>
38
  &lt;/ol&gt;</description>
39
  <notes>Tested on Magento versions: 1.7.0.2, 1.8.0.0, 1.8.1.0, 1.9.0.1 and 1.9.1.0. See https://travis-ci.org/StudioForty9/Recaptcha for more.</notes>
40
  <authors><author><name>StudioForty9</name><user>SF9</user><email>info@studioforty9.com</email></author><author><name>Eoghan O'Brien</name><user>eoghanobrien</user><email>eoghan@studioforty9.com</email></author></authors>
41
+ <date>2015-04-07</date>
42
+ <time>09:29:29</time>
43
+ <contents><target name="magecommunity"><dir name="Studioforty9"><dir name="Recaptcha"><dir name="Block"><file name="Autorender.php" hash="3df0dfcfb1ba0f0b3f5d32e31f3cc518"/><file name="Explicit.php" hash="bbde4491782d433f1959985ccef6f67b"/></dir><dir name="Helper"><file name="Data.php" hash="46056154edbd3d7d64ab59721a9991ca"/><file name="Request.php" hash="fd376a1553576b15674d1410a58562c4"/><file name="Response.php" hash="58dc7c4875099f1f2523b95d2e5fa36b"/></dir><dir name="Model"><file name="Observer.php" hash="e75d655f01d15f64476c3176ee09aafb"/><dir name="Source"><file name="Theme.php" hash="56ae66ec779f3cc00b6924f949ac4622"/></dir></dir><dir name="etc"><file name="config.xml" hash="ac7337edd5b3d6a20f15b439ffe3aea5"/><file name="system.xml" hash="2be67850cc9a964bb09d1cbadc26bd59"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="studioforty9_recaptcha.xml" hash="f8ae24e28f183c843e6cec09ad7019c6"/></dir><dir name="template"><dir name="studioforty9"><dir name="recaptcha"><file name="autorender.phtml" hash="4f616a52fe671f9f6346347427f7b35b"/><file name="explicit.phtml" hash="b30f113ba2a141d6e0bc8a5eb351bfe0"/><dir name="samples"><dir name="base"><dir name="contacts"><file name="form.phtml" hash="d5b584b9863a06fe7adab490584b7e89"/></dir><dir name="persistent"><dir name="customer"><dir name="form"><file name="register.phtml" hash="2d899bd409bad8762b29fee173133858"/></dir></dir></dir><dir name="review"><file name="form.phtml" hash="7be198faa94a0f2b9b1f859f0605adaf"/></dir><dir name="sendfriend"><file name="send.phtml" hash="80d86c444318d2ba30912619653044fb"/></dir></dir><dir name="rwd"><dir name="contacts"><file name="form.phtml" hash="5e32e7445434930b51a86747ecebf553"/></dir><dir name="customer"><dir name="form"><file name="register.phtml" hash="13fa3ff4732b01ebabb382da4b710c21"/></dir></dir><dir name="review"><file name="form.phtml" hash="e4df65a5b3022d8a80f11647c7475cfa"/></dir><dir name="sendfriend"><file name="send.phtml" hash="3adf035329dc6c6cf01a7712cd707760"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Studioforty9_Recaptcha.csv" hash="6387abc316e524840fa3b1fcc49dc25d"/></dir></target><target name="mageetc"><dir name="modules"><file name="Studioforty9_Recaptcha.xml" hash="4ea774e9a930bddc77ab8d408b81e008"/></dir></target></contents>
44
  <compatible/>
45
  <dependencies><required><php><min>5.3.0</min><max>5.5.99</max></php></required></dependencies>
46
  </package>