Created
January 27, 2018 09:11
-
-
Save ProxiBlue/fdf28f9bf8b678e9aa30c475d681f974 to your computer and use it in GitHub Desktop.
ReCaptcha Email a friend template changes diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/design/frontend/default/theme567/template/sendfriend/send.phtml b/app/design/frontend/default/theme567/template/sendfriend/send.phtml | |
index 14432118..be6096dc 100644 | |
--- a/app/design/frontend/default/theme567/template/sendfriend/send.phtml | |
+++ b/app/design/frontend/default/theme567/template/sendfriend/send.phtml | |
@@ -32,8 +32,13 @@ | |
?> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
- i=0; | |
- var recipCount = 1; | |
+ <?php if($recipients = $this->getFormData()->getData('recipients')): ?> | |
+ i=<?php echo count($recipients['name']) - 1; ?>; | |
+ var recipCount = <?php echo count($recipients['name']); ?>; | |
+ <?php else: ?> | |
+ i=0; | |
+ var recipCount = 1; | |
+ <?php endif; ?> | |
var maxRecip = <?php echo $this->getMaxRecipients() ?>; | |
function remove_recipient(i){ | |
$('recipients_name'+i).up(2).remove(); | |
@@ -94,11 +99,34 @@ | |
<textarea name="sender[message]" class="input-text required-entry" id="sender_message" cols="3" rows="3"><?php echo $this->escapeHtml($this->getMessage())?></textarea> | |
</div> | |
</li> | |
+ <?php echo $this->getChildHtml('recaptcha'); ?> | |
</ul> | |
</div> | |
<div class="fieldset"> | |
<h2 class="legend"><?php echo $this->__('Recipient:') ?></h2> | |
<ul class="form-list" id="recipients_options"> | |
+ <?php if($recipients = $this->getFormData()->getData('recipients')): ?> | |
+ <?php for($x = 0; $x < count($recipients['name']); $x++): ?> | |
+ <li class="fields <?php if($x > 0): ?>additional-row<?php endif;?>"> | |
+ <?php if($x > 0): ?> | |
+ <p><a href="delete_email" title="<?php echo $this->jsQuoteEscape($this->__('Remove Email')) ?>" onclick="remove_recipient('<?php echo $x; ?>'); return false" class="btn-remove"><?php echo $this->jsQuoteEscape($this->__('Remove Email')) ?>"</a></p> | |
+ <?php endif;?> | |
+ <div class="field"> | |
+ <label for="recipients_name" class="required"><em>*</em><?php echo $this->__('Name:') ?></label> | |
+ <div class="input-box"> | |
+ <input name="recipients[name][]" type="text" class="input-text required-entry" id="recipients_name<?php echo $x; ?>" value="<?php echo $recipients['name'][$x]; ?>"/> | |
+ </div> | |
+ </div> | |
+ <div class="field"> | |
+ <label for="recipients_email" class="required"><em>*</em><?php echo $this->__('Email Address:') ?></label> | |
+ <div class="input-box"> | |
+ <input value="<?php echo $recipients['email'][$x]; ?>" name="recipients[email][]" title="<?php echo $this->__('Email Address') ?>" id="recipients_email<?php echo $x; ?>" type="text" class="input-text required-entry validate-email" /> | |
+ </div> | |
+ </div> | |
+ </li> | |
+ <?php endfor; ?> | |
+ | |
+ <?php else: ?> | |
<li class="fields"> | |
<div class="field"> | |
<label for="recipients_name" class="required"><em>*</em><?php echo $this->__('Name:') ?></label> | |
@@ -113,6 +141,7 @@ | |
</div> | |
</div> | |
</li> | |
+ <?php endif; ?> | |
</ul> | |
</div> | |
<div class="buttons-set"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment