ความเห็น: 0
การส่งเมล์ใน SP PageBuilder Helix ผ่าน Content [C]
การส่งเมล์ใน SP PageBuilder Helix ผ่าน Content ดังนี้
1. เลือก Templates
2. เลือก shaper_helixultimate Templates
3. html/com_mailto/mailto/default.php
4. แก้ไข default.php
<?php
/**
* @package Helix Ultimate Framework
* @author JoomShaper https://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2018 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/
defined ('_JEXEC') or die();
JHtml::_('behavior.core');
JHtml::_('behavior.keepalive');
JFactory::getDocument()->addScriptDeclaration("
Joomla.submitbutton = function(pressbutton)
{
var form = document.getElementById('mailtoForm');
// do field validation
if (form.mailto.value == '' || form.from.value == '')
{
alert('" . JText::_('COM_MAILTO_EMAIL_ERR_NOINFO', true) . "');
return false;
}
form.submit();
}
");
?>
<div id="mailto-window" class="p-2">
<a href="javascript: void window.close()" title="<?php echo JText::_('COM_MAILTO_CLOSE_WINDOW'); ?>" class="close" aria-label="Close">
<span aria-hidden="true">×</span>
</a>
<h4 class="mt-0"><?php echo JText::_('COM_MAILTO_EMAIL_TO_A_FRIEND'); ?></h4>
<form action="<?php echo JRoute::_('index.php?option=com_mailto&task=send'); ?>" method="post" class="form-validate form-horizontal well">
<fieldset>
<?php foreach ($this->form->getFieldset('') as $field) : ?>
<?php if (!$field->hidden) : ?>
<?php echo $field->renderField(); ?>
<?php endif; ?>
<?php endforeach; ?>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-primary validate">
<?php echo JText::_('COM_MAILTO_SEND'); ?>
</button>
<button type="button" class="button" onclick="window.close();return false;">
<?php echo JText::_('COM_MAILTO_CANCEL'); ?>
</button>
</div>
</div>
</fieldset>
<input type="hidden" name="layout" value="<?php echo htmlspecialchars($this->getLayout(), ENT_COMPAT, 'UTF-8'); ?>" />
<input type="hidden" name="option" value="com_mailto" />
<input type="hidden" name="task" value="send" />
<input type="hidden" name="tmpl" value="component" />
<input type="hidden" name="link" value="<?php echo $this->link; ?>" />
<?php echo JHtml::_('form.token'); ?>
</form>
</div>