diff --git a/module/VuFind/src/VuFind/Controller/AjaxController.php b/module/VuFind/src/VuFind/Controller/AjaxController.php index 3752acc2a81b7133d8a8f441399f65e7f66e4021..52a59ea26e85b0e8897d0cca67eccec29503bb51 100644 --- a/module/VuFind/src/VuFind/Controller/AjaxController.php +++ b/module/VuFind/src/VuFind/Controller/AjaxController.php @@ -1021,7 +1021,7 @@ class AjaxController extends AbstractBase try { // Check captcha $this->recaptcha()->setErrorMode('throw'); - $useRecaptcha = $this->recaptcha()->active('sms'); + $useRecaptcha = $this->recaptcha()->active('email'); // Process form submission: if (!$this->formWasSubmitted('id', $useRecaptcha)) { throw new \Exception('recaptcha_not_passed'); @@ -1085,6 +1085,14 @@ class AjaxController extends AbstractBase // Attempt to send the email: try { + // Check captcha + $this->recaptcha()->setErrorMode('throw'); + $useRecaptcha = $this->recaptcha()->active('email'); + // Process form submission: + if (!$this->formWasSubmitted('url', $useRecaptcha)) { + throw new \Exception('recaptcha_not_passed'); + } + $view = $this->createEmailViewModel(); $mailer = $this->getServiceLocator()->get('VuFind\Mailer'); $mailer->sendLink( diff --git a/module/VuFind/src/VuFind/Controller/CartController.php b/module/VuFind/src/VuFind/Controller/CartController.php index 9975a1834f30b5097e709670b66ad1b26cfbef12..a632da939668379577e516fe2960a1a5c40c8105 100644 --- a/module/VuFind/src/VuFind/Controller/CartController.php +++ b/module/VuFind/src/VuFind/Controller/CartController.php @@ -202,9 +202,11 @@ class CartController extends AbstractBase $view = $this->createEmailViewModel(); $view->records = $this->getRecordLoader()->loadBatch($ids); + // Set up reCaptcha + $view->useRecaptcha = $this->recaptcha()->active('email'); // Process form submission: - if ($this->formWasSubmitted('submit')) { + if ($this->formWasSubmitted('submit', $view->useRecaptcha)) { // Build the URL to share: $params = array(); foreach ($ids as $current) { diff --git a/module/VuFind/src/VuFind/Controller/SearchController.php b/module/VuFind/src/VuFind/Controller/SearchController.php index b26d708aad6b810a3a56fefb4a6e8a0bee56b2ae..c2df102b1a9021e616141d665d9f9693af30baec 100644 --- a/module/VuFind/src/VuFind/Controller/SearchController.php +++ b/module/VuFind/src/VuFind/Controller/SearchController.php @@ -82,6 +82,8 @@ class SearchController extends AbstractSearch // If a URL was explicitly passed in, use that; otherwise, try to // find the HTTP referrer. $view = $this->createEmailViewModel(); + // Set up reCaptcha + $view->useRecaptcha = $this->recaptcha()->active('email'); $view->url = $this->params()->fromPost( 'url', $this->params()->fromQuery( 'url', $this->getRequest()->getServer()->get('HTTP_REFERER') @@ -109,7 +111,7 @@ class SearchController extends AbstractSearch } // Process form submission: - if ($this->formWasSubmitted('submit')) { + if ($this->formWasSubmitted('submit', $view->useRecaptcha)) { // Attempt to send the email and show an appropriate flash message: try { // If we got this far, we're ready to send the email: diff --git a/themes/blueprint/templates/Helpers/email-form-fields.phtml b/themes/blueprint/templates/Helpers/email-form-fields.phtml new file mode 100644 index 0000000000000000000000000000000000000000..72f6eec68f138de68232471e00277eff9c2ef794 --- /dev/null +++ b/themes/blueprint/templates/Helpers/email-form-fields.phtml @@ -0,0 +1,14 @@ +<label class="displayBlock" for="email_to"><?=$this->transEsc('To')?>:</label> +<input id="email_to" type="text" name="to" value="<?=isset($this->to) ? $this->to : ''?>" size="40" class="mainFocus <?=$this->jqueryValidation(array('required'=>'This field is required', 'email'=>'Email address is invalid'))?>"/> +<? if (!$this->disableFrom): ?> + <label class="displayBlock" for="email_from"><?=$this->transEsc('From')?>:</label> + <input id="email_from" type="text" name="from" value="<?=isset($this->from) ? $this->from : ''?>" size="40" class="<?=$this->jqueryValidation(array('required'=>'This field is required', 'email'=>'Email address is invalid'))?>"/> +<? endif; ?> +<label class="displayBlock" for="email_message"><?=$this->transEsc('Message')?>:</label> +<textarea id="email_message" name="message" rows="3" cols="40"><?=isset($this->message) ? $this->message : ''?></textarea> +<br/> +<?=$this->recaptcha()->html($this->useRecaptcha) ?> +<input class="button" type="submit" name="submit" value="<?=$this->transEsc('Send')?>"/> +<? if ($this->disableFrom && $this->userEmailInFrom): ?> + <input type="checkbox" id="ccme" name="ccself"/><label for="ccme"><?=$this->translate('send_email_copy_to_me'); ?></label> +<? endif; ?> diff --git a/themes/blueprint/templates/cart/email.phtml b/themes/blueprint/templates/cart/email.phtml index e7f3976cc326cba0812751a27f559e5f3916a423..f89e5ca4c7a81c8862b33b139ab3a44517e6f959 100644 --- a/themes/blueprint/templates/cart/email.phtml +++ b/themes/blueprint/templates/cart/email.phtml @@ -13,17 +13,5 @@ <input type="hidden" name="ids[]" value="<?=$this->escapeHtmlAttr($current->getResourceSource() . '|' . $current->getUniqueId())?>" /> <? endforeach; ?> <br /> - <label class="displayBlock" for="email_to"><?=$this->transEsc('To')?>:</label> - <input id="email_to" type="text" name="to" value="<?=isset($this->to) ? $this->to : ''?>" size="40" class="mainFocus <?=$this->jqueryValidation(array('required'=>'This field is required', 'email'=>'Email address is invalid'))?>"/> - <? if (!$this->disableFrom): ?> - <label class="displayBlock" for="email_from"><?=$this->transEsc('From')?>:</label> - <input id="email_from" type="text" name="from" value="<?=isset($this->from) ? $this->from : ''?>" size="40" class="<?=$this->jqueryValidation(array('required'=>'This field is required', 'email'=>'Email address is invalid'))?>"/> - <? endif; ?> - <label class="displayBlock" for="email_message"><?=$this->transEsc('Message')?>:</label> - <textarea id="email_message" name="message" rows="3" cols="40"><?=isset($this->message) ? $this->message : ''?></textarea> - <br/> - <input class="button" type="submit" name="submit" value="<?=$this->transEsc('Send')?>"/> - <? if ($this->disableFrom && $this->userEmailInFrom): ?> - <input type="checkbox" id="ccme" name="ccself"/><label for="ccme"><?=$this->translate('send_email_copy_to_me'); ?></label> - <? endif; ?> + <?=$this->render('Helpers/email-form-fields.phtml')?> </form> diff --git a/themes/blueprint/templates/record/email.phtml b/themes/blueprint/templates/record/email.phtml index 45486d7f079efbe4b8667fc601fe9ec208d13c98..762fd95d2a024cfc901cca27c73fd1bd5ae68c91 100644 --- a/themes/blueprint/templates/record/email.phtml +++ b/themes/blueprint/templates/record/email.phtml @@ -10,18 +10,5 @@ <form action="" method="post" name="emailRecord"> <input type="hidden" name="id" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" /> <input type="hidden" name="source" value="<?=$this->escapeHtmlAttr($this->driver->getResourceSource())?>" /> - <label class="displayBlock" for="email_to"><?=$this->transEsc('To')?>:</label> - <input id="email_to" type="text" name="to" value="<?=isset($this->to) ? $this->to : ''?>" size="40" class="mainFocus <?=$this->jqueryValidation(array('required'=>'This field is required', 'email'=>'Email address is invalid'))?>"/> - <? if (!$this->disableFrom): ?> - <label class="displayBlock" for="email_from"><?=$this->transEsc('From')?>:</label> - <input id="email_from" type="text" name="from" value="<?=isset($this->from) ? $this->from : ''?>" size="40" class="<?=$this->jqueryValidation(array('required'=>'This field is required', 'email'=>'Email address is invalid'))?>"/> - <? endif; ?> - <label class="displayBlock" for="email_message"><?=$this->transEsc('Message')?>:</label> - <textarea id="email_message" name="message" rows="3" cols="40"><?=isset($this->message) ? $this->message : ''?></textarea> - <br/> - <?=$this->recaptcha()->html($this->useRecaptcha) ?> - <input class="button" type="submit" name="submit" value="<?=$this->transEsc('Send')?>"/> - <? if ($this->disableFrom && $this->userEmailInFrom): ?> - <input type="checkbox" id="ccme" name="ccself"/><label for="ccme"><?=$this->translate('send_email_copy_to_me'); ?></label> - <? endif; ?> + <?=$this->render('Helpers/email-form-fields.phtml')?> </form> diff --git a/themes/blueprint/templates/search/email.phtml b/themes/blueprint/templates/search/email.phtml index e026683a8e136a925d32ea1ccb9ace3232f4f8ef..3d4b9378e90f9c43e60c9ecb7b88fd52eeaeb2ad 100644 --- a/themes/blueprint/templates/search/email.phtml +++ b/themes/blueprint/templates/search/email.phtml @@ -9,17 +9,5 @@ <?=$this->flashmessages()?> <form action="" method="post" name="emailSearch"> <input type="hidden" name="url" value="<?=$this->escapeHtmlAttr($this->url)?>" /> - <label class="displayBlock" for="email_to"><?=$this->transEsc('To')?>:</label> - <input id="email_to" type="text" name="to" value="<?=isset($this->to) ? $this->to : ''?>" size="40" class="mainFocus <?=$this->jqueryValidation(array('required'=>'This field is required', 'email'=>'Email address is invalid'))?>"/> - <? if (!$this->disableFrom): ?> - <label class="displayBlock" for="email_from"><?=$this->transEsc('From')?>:</label> - <input id="email_from" type="text" name="from" value="<?=isset($this->from) ? $this->from : ''?>" size="40" class="<?=$this->jqueryValidation(array('required'=>'This field is required', 'email'=>'Email address is invalid'))?>"/> - <? endif; ?> - <label class="displayBlock" for="email_message"><?=$this->transEsc('Message')?>:</label> - <textarea id="email_message" name="message" rows="3" cols="40"><?=isset($this->message) ? $this->message : ''?></textarea> - <br/> - <input class="button" type="submit" name="submit" value="<?=$this->transEsc('Send')?>"/> - <? if ($this->disableFrom && $this->userEmailInFrom): ?> - <input type="checkbox" id="ccme" name="ccself"/><label for="ccme"><?=$this->translate('send_email_copy_to_me'); ?></label> - <? endif; ?> + <?=$this->render('Helpers/email-form-fields.phtml')?> </form> diff --git a/themes/bootstrap3/templates/Helpers/email-form-fields.phtml b/themes/bootstrap3/templates/Helpers/email-form-fields.phtml new file mode 100644 index 0000000000000000000000000000000000000000..25d914108bfa2ea7d8a778542933de073ac8ffb2 --- /dev/null +++ b/themes/bootstrap3/templates/Helpers/email-form-fields.phtml @@ -0,0 +1,37 @@ +<div class="form-group"> + <label class="col-sm-3 control-label" for="email_to"><?=$this->transEsc('To')?>:</label> + <div class="col-sm-9"> + <input type="email" id="email_to" class="form-control" oninvalid="$('#modal .fa-spinner').remove()" name="to" value="<?=isset($this->to) ? $this->to : ''?>"/> + </div> +</div> +<? if (!$this->disableFrom): ?> + <div class="form-group"> + <label class="col-sm-3 control-label" for="email_from"><?=$this->transEsc('From')?>:</label> + <div class="col-sm-9"> + <input type="email" id="email_from" oninvalid="$('#modal .fa-spinner').remove()" name="from" value="<?=isset($this->from) ? $this->from : ''?>" size="40" class="form-control"/> + </div> + </div> +<? endif; ?> +<div class="form-group"> + <label class="col-sm-3 control-label" for="email_message"><?=$this->transEsc('Message')?>:</label> + <div class="col-sm-9"> + <textarea id="email_message" class="form-control" name="message" rows="4"><?=isset($this->message) ? $this->message : ''?></textarea> + </div> +</div> +<? if ($this->disableFrom && $this->userEmailInFrom): ?> + <div class="form-group"> + <div class="col-sm-9 col-sm-offset-3"> + <div class="checkbox"> + <label> + <input type="checkbox" name="ccself"/> <?=$this->translate('send_email_copy_to_me'); ?> + </label> + </div> + </div> + </div> +<? endif ?> +<?=$this->recaptcha()->html($this->useRecaptcha) ?> +<div class="form-group"> + <div class="col-sm-9 col-sm-offset-3"> + <input type="submit" class="btn btn-primary" name="submit" value="<?=$this->transEsc('Send')?>"/> + </div> +</div> diff --git a/themes/bootstrap3/templates/cart/email.phtml b/themes/bootstrap3/templates/cart/email.phtml index 782aa11992d10367fb45b6f4943c0230902c648f..1c78eaab2fbc02bb661df553dd92ef7220a305ea 100644 --- a/themes/bootstrap3/templates/cart/email.phtml +++ b/themes/bootstrap3/templates/cart/email.phtml @@ -31,42 +31,7 @@ <? endif; ?> </div> </div> - <div class="form-group"> - <label class="col-sm-3 control-label" for="email_to"><?=$this->transEsc('To')?>:</label> - <div class="col-sm-9"> - <input id="email_to" type="email" name="to" value="<?=isset($this->to) ? $this->to : ''?>" size="40" class="form-control" oninvalid="$('#modal .fa-spinner').remove()"/> - </div> - </div> - <? if (!$this->disableFrom): ?> - <div class="form-group"> - <label class="col-sm-3 control-label" for="email_from"><?=$this->transEsc('From')?>:</label> - <div class="col-sm-9"> - <input id="email_from" type="email" name="from" value="<?=isset($this->from) ? $this->from : ''?>" size="40" class="form-control" oninvalid="$('#modal .fa-spinner').remove()"/> - </div> - </div> - <? endif; ?> - <div class="form-group"> - <label class="col-sm-3 control-label" for="email_message"><?=$this->transEsc('Message')?>:</label> - <div class="col-sm-9"> - <textarea id="email_message" name="message" rows="3" cols="40" class="form-control"><?=isset($this->message) ? $this->message : ''?></textarea> - </div> - </div> - <? if ($this->disableFrom && $this->userEmailInFrom): ?> - <div class="form-group"> - <div class="col-sm-9 col-sm-offset-3"> - <div class="checkbox"> - <label> - <input type="checkbox" name="ccself"/> <?=$this->translate('send_email_copy_to_me'); ?> - </label> - </div> - </div> - </div> - <? endif ?> - <div class="form-group"> - <div class="col-sm-9 col-sm-offset-3"> - <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Send')?>"/> - </div> - </div> + <?=$this->render('Helpers/email-form-fields.phtml')?> </form> <? $script = <<<JS diff --git a/themes/bootstrap3/templates/record/email.phtml b/themes/bootstrap3/templates/record/email.phtml index 45e0973acadb6015f348241fa847a827cd3f220d..ee0bfce24d596d3b6490465855b7a9c463aa7a68 100644 --- a/themes/bootstrap3/templates/record/email.phtml +++ b/themes/bootstrap3/templates/record/email.phtml @@ -11,41 +11,5 @@ <form class="form-horizontal" action="" method="post" name="emailRecord"> <input type="hidden" name="id" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" /> <input type="hidden" name="source" value="<?=$this->escapeHtmlAttr($this->driver->getResourceSource())?>" /> - <div class="form-group"> - <label class="col-sm-3 control-label" for="email_to"><?=$this->transEsc('To')?>:</label> - <div class="col-sm-9"> - <input type="email" id="email_to" class="form-control" oninvalid="$('#modal .fa-spinner').remove()" name="to" value="<?=isset($this->to) ? $this->to : ''?>"/> - </div> - </div> - <? if (!$this->disableFrom): ?> - <div class="form-group"> - <label class="col-sm-3 control-label" for="email_from"><?=$this->transEsc('From')?>:</label> - <div class="col-sm-9"> - <input type="email" id="email_from" oninvalid="$('#modal .fa-spinner').remove()" name="from" value="<?=isset($this->from) ? $this->from : ''?>" size="40" class="form-control"/> - </div> - </div> - <? endif; ?> - <div class="form-group"> - <label class="col-sm-3 control-label" for="email_message"><?=$this->transEsc('Message')?>:</label> - <div class="col-sm-9"> - <textarea id="email_message" class="form-control" name="message" rows="4"><?=isset($this->message) ? $this->message : ''?></textarea> - </div> - </div> - <? if ($this->disableFrom && $this->userEmailInFrom): ?> - <div class="form-group"> - <div class="col-sm-9 col-sm-offset-3"> - <div class="checkbox"> - <label> - <input type="checkbox" name="ccself"/> <?=$this->translate('send_email_copy_to_me'); ?> - </label> - </div> - </div> - </div> - <? endif ?> - <?=$this->recaptcha()->html($this->useRecaptcha) ?> - <div class="form-group"> - <div class="col-sm-9 col-sm-offset-3"> - <input type="submit" class="btn btn-primary" name="submit" value="<?=$this->transEsc('Send')?>"/> - </div> - </div> + <?=$this->render('Helpers/email-form-fields.phtml')?> </form> diff --git a/themes/bootstrap3/templates/search/email.phtml b/themes/bootstrap3/templates/search/email.phtml index 4e31a12c17510dd76cea8a84def3fff8d34330cb..5366ddb993ee1527c22f9f303feda72a2949c6ff 100644 --- a/themes/bootstrap3/templates/search/email.phtml +++ b/themes/bootstrap3/templates/search/email.phtml @@ -9,40 +9,5 @@ <?=$this->flashmessages()?> <form class="form-horizontal" action="" method="post" name="emailSearch"> <input type="hidden" name="url" value="<?=$this->escapeHtmlAttr($this->url)?>" /> - <div class="form-group"> - <label class="col-sm-3 control-label" for="email_to"><?=$this->transEsc('To')?>:</label> - <div class="col-sm-9"> - <input class="form-control" id="email_to" type="email" name="to" value="<?=isset($this->to) ? $this->to : ''?>"/> - </div> - </div> - <? if (!$this->disableFrom): ?> - <div class="form-group"> - <label class="col-sm-3 control-label" for="email_from"><?=$this->transEsc('From')?>:</label> - <div class="col-sm-9"> - <input class="form-control" id="email_from" type="email" name="from" value="<?=isset($this->from) ? $this->from : ''?>"/> - </div> - </div> - <? endif; ?> - <div class="form-group"> - <label class="col-sm-3 control-label" for="email_message"><?=$this->transEsc('Message')?>:</label> - <div class="col-sm-9"> - <textarea class="form-control" id="email_message" name="message" rows="3"><?=isset($this->message) ? $this->message : ''?></textarea> - </div> - </div> - <? if ($this->disableFrom && $this->userEmailInFrom): ?> - <div class="form-group"> - <div class="col-sm-9 col-sm-offset-3"> - <div class="checkbox"> - <label> - <input type="checkbox" name="ccself"/> <?=$this->translate('send_email_copy_to_me'); ?> - </label> - </div> - </div> - </div> - <? endif ?> - <div class="form-group"> - <div class="col-sm-9 col-sm-offset-3"> - <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Send')?>"/> - </div> - </div> + <?=$this->render('Helpers/email-form-fields.phtml')?> </form> diff --git a/themes/jquerymobile/templates/Helpers/email-form-fields.phtml b/themes/jquerymobile/templates/Helpers/email-form-fields.phtml new file mode 100644 index 0000000000000000000000000000000000000000..0e9e2a00eb96e021afd5d230812199f36e292182 --- /dev/null +++ b/themes/jquerymobile/templates/Helpers/email-form-fields.phtml @@ -0,0 +1,17 @@ +<div data-role="fieldcontain"> + <label for="email_to"><?=$this->transEsc('To')?>:</label> + <input id="email_to" type="text" name="to" value="<?=isset($this->to) ? $this->to : ''?>" size="40" class="mainFocus <?=$this->jqueryValidation(array('required'=>'This field is required', 'email'=>'Email address is invalid'))?>"/> + <? if (!$this->disableFrom): ?> + <label for="email_from"><?=$this->transEsc('From')?>:</label> + <input id="email_from" type="text" name="from" value="<?=isset($this->from) ? $this->from : ''?>" size="40" class="<?=$this->jqueryValidation(array('required'=>'This field is required', 'email'=>'Email address is invalid'))?>"/> + <? endif; ?> + <label for="email_message"><?=$this->transEsc('Message')?>:</label> + <textarea id="email_message" name="message"><?=isset($this->message) ? $this->message : ''?></textarea> +</div> +<?=$this->recaptcha()->html($this->useRecaptcha) ?> +<div data-role="fieldcontain"> + <input class="button" type="submit" name="submit" value="<?=$this->transEsc('Send')?>"/> +</div> +<? if ($this->disableFrom && $this->userEmailInFrom): ?> + <input type="checkbox" id="ccme" name="ccself"/><label for="ccme"><?=$this->translate('send_email_copy_to_me'); ?></label> +<? endif; ?> diff --git a/themes/jquerymobile/templates/record/email.phtml b/themes/jquerymobile/templates/record/email.phtml index 5012278b7988c63bb457e6eb8efd43259b57e56f..a8b3798c65aa3694d15ba6ce1786fb4eb6820096 100644 --- a/themes/jquerymobile/templates/record/email.phtml +++ b/themes/jquerymobile/templates/record/email.phtml @@ -7,25 +7,9 @@ <div data-role="content"> <?=$this->flashmessages()?> <form method="post" name="emailRecord" data-ajax="false"> - <input type="hidden" name="id" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" /> - <input type="hidden" name="source" value="<?=$this->escapeHtmlAttr($this->driver->getResourceSource())?>" /> - <div data-role="fieldcontain"> - <label for="email_to"><?=$this->transEsc('To')?>:</label> - <input id="email_to" type="text" name="to" value="<?=isset($this->to) ? $this->to : ''?>" size="40" class="mainFocus <?=$this->jqueryValidation(array('required'=>'This field is required', 'email'=>'Email address is invalid'))?>"/> - <? if (!$this->disableFrom): ?> - <label for="email_from"><?=$this->transEsc('From')?>:</label> - <input id="email_from" type="text" name="from" value="<?=isset($this->from) ? $this->from : ''?>" size="40" class="<?=$this->jqueryValidation(array('required'=>'This field is required', 'email'=>'Email address is invalid'))?>"/> - <? endif; ?> - <label for="email_message"><?=$this->transEsc('Message')?>:</label> - <textarea id="email_message" name="message"><?=isset($this->message) ? $this->message : ''?></textarea> - </div> - <?=$this->recaptcha()->html($this->useRecaptcha) ?> - <div data-role="fieldcontain"> - <input class="button" type="submit" name="submit" value="<?=$this->transEsc('Send')?>"/> - </div> - <? if ($this->disableFrom && $this->userEmailInFrom): ?> - <input type="checkbox" id="ccme" name="ccself"/><label for="ccme"><?=$this->translate('send_email_copy_to_me'); ?></label> - <? endif; ?> + <input type="hidden" name="id" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" /> + <input type="hidden" name="source" value="<?=$this->escapeHtmlAttr($this->driver->getResourceSource())?>" /> + <?=$this->render('Helpers/email-form-fields.phtml')?> </form> </div> <?=$this->mobileMenu()->footer()?> diff --git a/themes/jquerymobile/templates/search/email.phtml b/themes/jquerymobile/templates/search/email.phtml index e3e629aae144bb3f49ccc0e6def9747052ac07ab..6b879aee1625753083f5e1b7c7827422bc7056ab 100644 --- a/themes/jquerymobile/templates/search/email.phtml +++ b/themes/jquerymobile/templates/search/email.phtml @@ -8,19 +8,7 @@ <?=$this->flashmessages()?> <form method="post" name="emailSearch" data-ajax="false"> <input type="hidden" name="url" value="<?=$this->escapeHtmlAttr($this->url)?>" /> - <div data-role="fieldcontain"> - <label for="email_to"><?=$this->transEsc('To')?>:</label> - <input id="email_to" type="text" name="to" value="<?=isset($this->to) ? $this->to : ''?>" size="40" /> - <? if (!$this->disableFrom): ?> - <label for="email_from"><?=$this->transEsc('From')?>:</label> - <input id="email_from" type="text" name="from" value="<?=isset($this->from) ? $this->from : ''?>" size="40" /> - <? endif; ?> - <label for="email_message"><?=$this->transEsc('Message')?>:</label> - <textarea id="email_message" name="message"><?=isset($this->message) ? $this->message : ''?></textarea> - </div> - <div data-role="fieldcontain"> - <input class="button" type="submit" name="submit" value="<?=$this->transEsc('Send')?>"/> - </div> + <?=$this->render('Helpers/email-form-fields.phtml')?> </form> </div> <?=$this->mobileMenu()->footer()?>