?
Path : /home/admin/public_html/old/plugins/system/jsntplframework/html/com_content/form/ |
Current File : /home/admin/public_html/old/plugins/system/jsntplframework/html/com_content/form/edit.php |
<?php /** * @package Joomla.Site * @subpackage com_content * * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; // Load template framework if (!defined('JSN_PATH_TPLFRAMEWORK')) { require_once JPATH_ROOT . '/plugins/system/jsntplframework/jsntplframework.defines.php'; require_once JPATH_ROOT . '/plugins/system/jsntplframework/libraries/joomlashine/loader.php'; } JHtml::_('behavior.keepalive'); JHtml::_('behavior.calendar'); // Create shortcut to parameters. $params = $this->state->get('params'); //$images = json_decode($this->item->images); //$urls = json_decode($this->item->urls); $app = JFactory::getApplication(); $template = $app->getTemplate(); $jsnUtils = JSNTplUtils::getInstance(); if ($jsnUtils->isJoomla3()): JHtml::_('behavior.tabstate'); JHtml::_('behavior.formvalidator'); JHtml::_('formbehavior.chosen', 'select'); JHtml::_('behavior.modal', 'a.modal_jform_contenthistory'); // This checks if the editor config options have ever been saved. If they haven't they will fall back to the original settings. $editoroptions = isset($params->show_publishing_options); if (!$editoroptions) { $params->show_urls_images_frontend = '0'; } endif; ?> <script type="text/javascript"> Joomla.submitbutton = function(task) { if (task == 'article.cancel' || document.formvalidator.isValid(document.getElementById('adminForm'))) { <?php echo $this->form->getField('articletext')->save(); ?> Joomla.submitform(task); } else { <?php if (!$jsnUtils->isJoomla3()): ?> alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>'); <?php endif; ?> } } </script> <?php if ($jsnUtils->isJoomla3()): ?> <div class="edit item-page<?php echo $this->pageclass_sfx; ?>"> <?php if ($params->get('show_page_heading', 1)) : ?> <div class="page-header"> <h1> <?php echo $this->escape($params->get('page_heading')); ?> </h1> </div> <?php endif; ?> <form action="<?php echo JRoute::_('index.php?option=com_content&a_id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate form-vertical"> <div class="btn-toolbar"> <div class="btn-group"> <button type="button" class="btn btn-primary" onclick="Joomla.submitbutton('article.save')"> <span class="icon-ok"></span> <?php echo JText::_('JSAVE') ?> </button> </div> <div class="btn-group"> <button type="button" class="btn" onclick="Joomla.submitbutton('article.cancel')"> <span class="icon-cancel"></span> <?php echo JText::_('JCANCEL') ?> </button> </div> <?php if ($params->get('save_history', 0)) : ?> <div class="btn-group"> <?php echo $this->form->getInput('contenthistory'); ?> </div> <?php endif; ?> </div> <fieldset> <ul class="nav nav-tabs"> <li class="active"><a href="#editor" data-toggle="tab"><?php echo JText::_('COM_CONTENT_ARTICLE_CONTENT') ?></a></li> <?php if ($params->get('show_urls_images_frontend') ) : ?> <li><a href="#images" data-toggle="tab"><?php echo JText::_('COM_CONTENT_IMAGES_AND_URLS') ?></a></li> <?php endif; ?> <li><a href="#publishing" data-toggle="tab"><?php echo JText::_('COM_CONTENT_PUBLISHING') ?></a></li> <li><a href="#language" data-toggle="tab"><?php echo JText::_('JFIELD_LANGUAGE_LABEL') ?></a></li> <li><a href="#metadata" data-toggle="tab"><?php echo JText::_('COM_CONTENT_METADATA') ?></a></li> </ul> <div class="tab-content"> <div class="tab-pane active" id="editor"> <?php echo $this->form->renderField('title'); ?> <?php if (is_null($this->item->id)) : ?> <?php echo $this->form->renderField('alias'); ?> <?php endif; ?> <?php echo $this->form->getInput('articletext'); ?> </div> <?php if ($params->get('show_urls_images_frontend')): ?> <div class="tab-pane" id="images"> <?php echo $this->form->renderField('image_intro', 'images'); ?> <?php echo $this->form->renderField('image_intro_alt', 'images'); ?> <?php echo $this->form->renderField('image_intro_caption', 'images'); ?> <?php echo $this->form->renderField('float_intro', 'images'); ?> <?php echo $this->form->renderField('image_fulltext', 'images'); ?> <?php echo $this->form->renderField('image_fulltext_alt', 'images'); ?> <?php echo $this->form->renderField('image_fulltext_caption', 'images'); ?> <?php echo $this->form->renderField('float_fulltext', 'images'); ?> <?php echo $this->form->renderField('urla', 'urls'); ?> <?php echo $this->form->renderField('urlatext', 'urls'); ?> <div class="control-group"> <div class="controls"> <?php echo $this->form->getInput('targeta', 'urls'); ?> </div> </div> <?php echo $this->form->renderField('urlb', 'urls'); ?> <?php echo $this->form->renderField('urlbtext', 'urls'); ?> <div class="control-group"> <div class="controls"> <?php echo $this->form->getInput('targetb', 'urls'); ?> </div> </div> <?php echo $this->form->renderField('urlc', 'urls'); ?> <?php echo $this->form->renderField('urlctext', 'urls'); ?> <div class="control-group"> <div class="controls"> <?php echo $this->form->getInput('targetc', 'urls'); ?> </div> </div> </div> <?php endif; ?> <div class="tab-pane" id="publishing"> <?php echo $this->form->renderField('catid'); ?> <?php echo $this->form->renderField('tags'); ?> <?php if ($params->get('save_history', 0)) : ?> <?php echo $this->form->renderField('version_note'); ?> <?php endif; ?> <?php echo $this->form->renderField('created_by_alias'); ?> <?php if ($this->item->params->get('access-change')) : ?> <?php echo $this->form->renderField('state'); ?> <?php echo $this->form->renderField('featured'); ?> <?php echo $this->form->renderField('publish_up'); ?> <?php echo $this->form->renderField('publish_down'); ?> <?php endif; ?> <?php echo $this->form->renderField('access'); ?> <?php if (is_null($this->item->id)):?> <div class="control-group"> <div class="control-label"> </div> <div class="controls"> <?php echo JText::_('COM_CONTENT_ORDERING'); ?> </div> </div> <?php endif; ?> </div> <div class="tab-pane" id="language"> <?php echo $this->form->renderField('language'); ?> </div> <div class="tab-pane" id="metadata"> <?php echo $this->form->renderField('metadesc'); ?> <?php echo $this->form->renderField('metakey'); ?> <input type="hidden" name="task" value="" /> <input type="hidden" name="return" value="<?php echo $this->return_page; ?>" /> <?php if ($this->params->get('enable_category', 0) == 1) :?> <input type="hidden" name="jform[catid]" value="<?php echo $this->params->get('catid', 1); ?>" /> <?php endif; ?> </div> </div> <?php echo JHtml::_('form.token'); ?> </fieldset> </form> </div> <?php else : JHtml::_('behavior.tooltip'); JHtml::_('behavior.formvalidation'); ?> <div class="com-content edit item-page <?php echo $this->pageclass_sfx; ?>"> <div class="article-submission"> <?php if ($params->get('show_page_heading')) : ?> <h1> <?php echo $this->escape($params->get('page_heading')); ?> </h1> <?php endif; ?> <form action="<?php echo JRoute::_('index.php?option=com_content&a_id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate"> <fieldset> <legend><?php echo JText::_('JEDITOR'); ?></legend> <div class="formelm"> <?php echo $this->form->getLabel('title'); ?> <?php echo $this->form->getInput('title'); ?> </div> <?php if (is_null($this->item->id)):?> <div class="formelm"> <?php echo $this->form->getLabel('alias'); ?> <?php echo $this->form->getInput('alias'); ?> </div> <?php endif; ?> <div class="formelm-buttons"> <button type="button" onclick="Joomla.submitbutton('article.save')"> <?php echo JText::_('JSAVE') ?> </button> <button type="button" onclick="Joomla.submitbutton('article.cancel')"> <?php echo JText::_('JCANCEL') ?> </button> </div> <?php echo $this->form->getInput('articletext'); ?> </fieldset> <?php if ($params->get('show_urls_images_frontend') ): ?> <fieldset> <legend><?php echo JText::_('COM_CONTENT_IMAGES_AND_URLS'); ?></legend> <div class="formelm"> <?php echo $this->form->getLabel('image_intro', 'images'); ?> <?php echo $this->form->getInput('image_intro', 'images'); ?> </div> <div style="clear:both"></div> <div class="formelm"> <?php echo $this->form->getLabel('image_intro_alt', 'images'); ?> <?php echo $this->form->getInput('image_intro_alt', 'images'); ?> </div> <div class="formelm"> <?php echo $this->form->getLabel('image_intro_caption', 'images'); ?> <?php echo $this->form->getInput('image_intro_caption', 'images'); ?> </div> <div class="formelm"> <?php echo $this->form->getLabel('float_intro', 'images'); ?> <?php echo $this->form->getInput('float_intro', 'images'); ?> </div> <div class="formelm"> <?php echo $this->form->getLabel('image_fulltext', 'images'); ?> <?php echo $this->form->getInput('image_fulltext', 'images'); ?> </div> <div style="clear:both"></div> <div class="formelm"> <?php echo $this->form->getLabel('image_fulltext_alt', 'images'); ?> <?php echo $this->form->getInput('image_fulltext_alt', 'images'); ?> </div> <div class="formelm"> <?php echo $this->form->getLabel('image_fulltext_caption', 'images'); ?> <?php echo $this->form->getInput('image_fulltext_caption', 'images'); ?> </div> <div class="formelm"> <?php echo $this->form->getLabel('float_fulltext', 'images'); ?> <?php echo $this->form->getInput('float_fulltext', 'images'); ?> </div> <div class="formelm"> <?php echo $this->form->getLabel('urla', 'urls'); ?> <?php echo $this->form->getInput('urla', 'urls'); ?> </div> <div class="formelm"> <?php echo $this->form->getLabel('urlatext', 'urls'); ?> <?php echo $this->form->getInput('urlatext', 'urls'); ?> </div> <?php echo $this->form->getInput('targeta', 'urls'); ?> <div class="formelm"> <?php echo $this->form->getLabel('urlb', 'urls'); ?> <?php echo $this->form->getInput('urlb', 'urls'); ?> </div> <div class="formelm"> <?php echo $this->form->getLabel('urlbtext', 'urls'); ?> <?php echo $this->form->getInput('urlbtext', 'urls'); ?> </div> <?php echo $this->form->getInput('targetb', 'urls'); ?> <div class="formelm"> <?php echo $this->form->getLabel('urlc', 'urls'); ?> <?php echo $this->form->getInput('urlc', 'urls'); ?> </div> <div class="formelm"> <?php echo $this->form->getLabel('urlctext', 'urls'); ?> <?php echo $this->form->getInput('urlctext', 'urls'); ?> </div> <?php echo $this->form->getInput('targetc', 'urls'); ?> </fieldset> <?php endif; ?> <fieldset> <legend><?php echo JText::_('COM_CONTENT_PUBLISHING'); ?></legend> <div class="formelm"> <?php echo $this->form->getLabel('catid'); ?> <span class="category"> <?php echo $this->form->getInput('catid'); ?> </span> </div> <div class="formelm"> <?php echo $this->form->getLabel('created_by_alias'); ?> <?php echo $this->form->getInput('created_by_alias'); ?> </div> <?php if ($this->item->params->get('access-change')): ?> <div class="formelm"> <?php echo $this->form->getLabel('state'); ?> <?php echo $this->form->getInput('state'); ?> </div> <div class="formelm"> <?php echo $this->form->getLabel('featured'); ?> <?php echo $this->form->getInput('featured'); ?> </div> <div class="formelm"> <?php echo $this->form->getLabel('publish_up'); ?> <?php echo $this->form->getInput('publish_up'); ?> </div> <div class="formelm"> <?php echo $this->form->getLabel('publish_down'); ?> <?php echo $this->form->getInput('publish_down'); ?> </div> <?php endif; ?> <div class="formelm"> <?php echo $this->form->getLabel('access'); ?> <?php echo $this->form->getInput('access'); ?> </div> <?php if (is_null($this->item->id)):?> <div class="form-note"> <p><?php echo JText::_('COM_CONTENT_ORDERING'); ?></p> </div> <?php endif; ?> </fieldset> <fieldset> <legend><?php echo JText::_('JFIELD_LANGUAGE_LABEL'); ?></legend> <div class="formelm-area"> <?php echo $this->form->getLabel('language'); ?> <?php echo $this->form->getInput('language'); ?> </div> </fieldset> <fieldset> <legend><?php echo JText::_('COM_CONTENT_METADATA'); ?></legend> <div class="formelm-area"> <?php echo $this->form->getLabel('metadesc'); ?> <?php echo $this->form->getInput('metadesc'); ?> </div> <div class="formelm-area"> <?php echo $this->form->getLabel('metakey'); ?> <?php echo $this->form->getInput('metakey'); ?> </div> <input type="hidden" name="task" value="" /> <input type="hidden" name="return" value="<?php echo $this->return_page;?>" /> <?php if($this->params->get('enable_category', 0) == 1) :?> <input type="hidden" name="jform[catid]" value="<?php echo $this->params->get('catid', 1);?>"/> <?php endif;?> <?php echo JHtml::_( 'form.token' ); ?> </fieldset> </form> </div> </div> <?php endif; ?>