|
38 | 38 | <div class="jdscf-row"> |
39 | 39 | <?php |
40 | 40 | ModJDSimpleContactFormHelper::renderForm($params, $module); |
41 | | - ?> |
42 | | - </div> |
43 | 41 |
|
44 | | - <?php |
45 | | - if ($captcha) { |
46 | | - JPluginHelper::importPlugin('captcha'); |
47 | | - $dispatcher = JEventDispatcher::getInstance(); |
48 | | - $dispatcher->trigger('onInit', 'jdscf_recaptcha_' . $module->id); |
49 | | - $plugin = JPluginHelper::getPlugin('captcha', 'recaptcha'); |
50 | | - if (!empty($plugin)) { |
51 | | - $plugin_params = new JRegistry($plugin->params); |
52 | | - $attributes = []; |
53 | | - $attributes['data-theme'] = $plugin_params->get('theme2', ''); |
54 | | - $attributes['data-size'] = $plugin_params->get('size', ''); |
55 | | - $attributeArray = []; |
56 | | - foreach ($attributes as $attributeKey => $attributeValue) { |
57 | | - $attributeArray[] = $attributeKey . '="' . $attributeValue . '"'; |
58 | | - } |
59 | | - ?> |
60 | | - <div class="jdscf-row"> |
61 | | - <div class="jdscf-col"> |
62 | | - <div class="form-group"> |
63 | | - <div id="jdscf_recaptcha_<?php echo $module->id; ?>" class="g-recaptcha" data-sitekey="<?php echo $plugin_params->get('public_key', ''); ?>" <?php echo implode(' ', $attributeArray); ?>></div> |
| 42 | + if ($captcha) { |
| 43 | + JPluginHelper::importPlugin('captcha'); |
| 44 | + $dispatcher = JEventDispatcher::getInstance(); |
| 45 | + $dispatcher->trigger('onInit', 'jdscf_recaptcha_' . $module->id); |
| 46 | + $plugin = JPluginHelper::getPlugin('captcha', 'recaptcha'); |
| 47 | + if (!empty($plugin)) { |
| 48 | + $plugin_params = new JRegistry($plugin->params); |
| 49 | + $attributes = []; |
| 50 | + $attributes['data-theme'] = $plugin_params->get('theme2', ''); |
| 51 | + $attributes['data-size'] = $plugin_params->get('size', ''); |
| 52 | + $attributeArray = []; |
| 53 | + foreach ($attributes as $attributeKey => $attributeValue) { |
| 54 | + $attributeArray[] = $attributeKey . '="' . $attributeValue . '"'; |
| 55 | + } |
| 56 | + ?> |
| 57 | + <div class="jdscf-row"> |
| 58 | + <div class="jdscf-col"> |
| 59 | + <div class="form-group"> |
| 60 | + <div id="jdscf_recaptcha_<?php echo $module->id; ?>" class="g-recaptcha" data-sitekey="<?php echo $plugin_params->get('public_key', ''); ?>" <?php echo implode(' ', $attributeArray); ?>></div> |
| 61 | + </div> |
| 62 | + </div> |
64 | 63 | </div> |
65 | | - </div> |
66 | | - </div> |
67 | | - <?php |
68 | | - } |
69 | | - } |
70 | | - ?> |
| 64 | + <?php |
| 65 | + } |
| 66 | + } |
| 67 | + ?> |
71 | 68 |
|
72 | | - <div class="jdscf-row"> |
73 | | - <div class="jdscf-col"> |
74 | | - <div class="form-group"> |
| 69 | + <div class="form-group"> |
75 | 70 | <?php |
76 | 71 | if($single_cc_enable) { |
77 | | - $singleCC = new JLayoutFile('fields.singlecc', JPATH_SITE . '/modules/mod_jdsimplecontactform/layouts'); |
78 | | - echo $singleCC->render(['params' => $params]); |
79 | | - } ?> |
80 | | - </div> |
| 72 | + $singleCC = new JLayoutFile('fields.singlecc', JPATH_SITE . '/modules/mod_jdsimplecontactform/layouts'); |
| 73 | + echo $singleCC->render(['params' => $params]); |
| 74 | + } |
| 75 | + ?> |
81 | 76 | </div> |
82 | | - </div> |
83 | 77 |
|
84 | | - <div class="jdscf-row"> |
85 | 78 | <?php |
86 | 79 | $submit = new JLayoutFile('fields.submit', JPATH_SITE . '/modules/mod_jdsimplecontactform/layouts'); |
87 | 80 | echo $submit->render(['params' => $params]); |
88 | 81 | ?> |
| 82 | + |
89 | 83 | </div> |
| 84 | + |
90 | 85 | <input type="hidden" name="returnurl" value="<?php echo urlencode(JUri::getInstance()); ?>"/> |
91 | 86 | <input type="hidden" name="id" value="<?php echo $module->id; ?>" /> |
92 | 87 | <?php echo JHtml::_('form.token'); ?> |
|
0 commit comments