Current File : /home/pacjaorg/public_html/km/administrator/components/com_djclassifieds/views/email/tmpl/edit.php |
<?php
/**
* @package DJ-Classifieds
* @copyright Copyright (C) DJ-Extensions.com, All rights reserved.
* @license http://www.gnu.org/licenses GNU/GPL
* @author url: http://dj-extensions.com
* @author email: contact@dj-extensions.com
*/
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.formvalidator');
$app = JFactory::getApplication();
?>
<form action="<?php echo JRoute::_('index.php?option=com_djclassifieds&view=email&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="edit-form" class="form-validate" enctype="multipart/form-data">
<div class="form-horizontal">
<?php echo JHTML::_($this->bs_cl->tab.'.startTabSet', 'myTab', array('active' => 'details')); ?>
<?php echo JHTML::_($this->bs_cl->tab.'.addTab', 'myTab', 'details', empty($this->item->id) ? JText::_('COM_DJCLASSIFIEDS_NEW') : JText::_('COM_DJCLASSIFIEDS_EDIT')); ?>
<div class="<?php echo $this->bs_cl->row; ?>">
<div class="<?php echo $this->bs_cl->col; ?>9">
<?php echo $this->form->getField('label')->renderField(); ?>
<?php echo $this->form->getField('title')->renderField(); ?>
<?php echo $this->form->getField('content')->renderField(); ?>
<?php
$plugin_contents = $app->triggerEvent('onAdminEditEmailTemplateFields', array($this->item));
foreach($plugin_contents as $plugin_content){
echo $plugin_content;
}
?>
</div>
<div class="<?php echo $this->bs_cl->col; ?>3">
<fieldset class="form-vertical tags">
<h3><?php echo JText::_('COM_DJCLASSIFIEDS_AVAILABLE_TAGS');?></h3>
<?php if(empty($this->disabled['ad_details'][$this->item->id])){ ?>
<?php
foreach($this->form->getGroup('ad_details') as $field){
if($field->fieldname == 'advert_expire_days' && empty($this->allowed['expiration'][$this->item->id])){
continue;
}elseif(in_array($field->fieldname, array('advert_edit', 'advert_delete')) && empty($this->allowed['ad_edit'][$this->item->id])){
continue;
}
echo $field->renderField();
}
?>
<?php } ?>
<?php if(empty($this->disabled['receiver'][$this->item->id])){ ?>
<?php
foreach($this->form->getGroup('receiver') as $field){
echo $field->renderField();
}
?>
<?php } ?>
<?php if(!empty($this->allowed['receiver_guest'][$this->item->id])){ ?>
<?php
echo $this->form->renderField('spacer_receiver');
echo $this->form->renderField('user_email');
?>
<?php } ?>
<?php foreach(array('ask', 'abuse', 'bidder', 'bidder_contact', 'buynow', 'purchase_details', 'buynow_offer', 'buynow_offer_response', 'payments', 'points', 'plans', 'prom') as $groupname){ ?>
<?php if(!empty($this->allowed[$groupname][$this->item->id])){ ?>
<?php
foreach($this->form->getGroup($groupname) as $field){
if($field->fieldname == 'contact_message_inbox' && empty($this->allowed['ask_integration'][$this->item->id])){
continue;
}
echo $field->renderField();
}
?>
<?php } ?>
<?php } ?>
<?php
foreach($this->form->getGroup('pages') as $field){
echo $field->renderField();
}
?>
<?php
$tags_list = $app->triggerEvent('onAdminEditEmailTemplate', array($this->item->id));
foreach($tags_list as $tags){
echo $tags;
}
?>
</fieldset>
</div>
</div>
<?php echo JHTML::_($this->bs_cl->tab.'.endTab'); ?>
<?php echo JHTML::_($this->bs_cl->tab.'.endTabSet'); ?>
</div>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>
<?php echo DJCFFOOTER; ?>
<script>
Joomla.submitbutton = function(task)
{
var form = document.getElementById('edit-form');
if (task == 'email.cancel') {
Joomla.submitform(task, form);
} else if(document.formvalidator.isValid(form)) {
Joomla.submitform(task, form);
}
else {
alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
}
}
</script>
<style>
.tags .control-group{
margin: 5px;
}
.tags .field-spacer label{
font-weight: bold;
margin-top: 5px;
}
.tags .control-group .controls{
display: none;
}
</style>