|
| 1 | +<?php |
| 2 | +/** |
| 3 | + * @package Helix Ultimate Framework |
| 4 | + * @author JoomShaper https://www.joomshaper.com |
| 5 | + * @copyright Copyright (c) 2010 - 2018 JoomShaper |
| 6 | + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later |
| 7 | +*/ |
| 8 | + |
| 9 | +defined ('_JEXEC') or die(); |
| 10 | + |
| 11 | +JHtml::_('behavior.tabstate'); |
| 12 | +JHtml::_('behavior.keepalive'); |
| 13 | +JHtml::_('behavior.formvalidator'); |
| 14 | +JHtml::_('formbehavior.chosen', '#jform_catid', null, array('disable_search_threshold' => 0)); |
| 15 | +$this->tab_name = 'com-content-form'; |
| 16 | +$this->ignore_fieldsets = array('image-intro', 'image-full', 'jmetadata', 'item_associations'); |
| 17 | + |
| 18 | +// Create shortcut to parameters. |
| 19 | +$params = $this->state->get('params'); |
| 20 | + |
| 21 | +//Blog Options |
| 22 | +$attribs = json_decode($this->item->attribs); |
| 23 | +// Article type option |
| 24 | + |
| 25 | +$this->form->setValue('astroid_article_type', 'attribs' , (isset($attribs->astroid_article_type) && $attribs->astroid_article_type) ? $attribs->astroid_article_type : ''); |
| 26 | +$this->form->setValue('astroid_article_video_type', 'attribs' , (isset($attribs->astroid_article_video_type) && $attribs->astroid_article_video_type) ? $attribs->astroid_article_video_type : 'standard'); |
| 27 | + |
| 28 | +$this->form->setValue('astroid_article_video_url', 'attribs' , (isset($attribs->astroid_article_video_url) && $attribs->astroid_article_video_url) ? $attribs->astroid_article_video_url : ''); |
| 29 | + |
| 30 | +$this->form->setValue('astroid_article_gallery_width', 'attribs' , (isset($attribs->astroid_article_gallery_width) && $attribs->astroid_article_gallery_width) ? $attribs->astroid_article_gallery_width : ''); |
| 31 | + |
| 32 | +$this->form->setValue('astroid_article_gallery_bullets', 'attribs' , (isset($attribs->astroid_article_gallery_bullets) && $attribs->astroid_article_gallery_bullets) ? $attribs->astroid_article_gallery_bullets : ''); |
| 33 | + |
| 34 | +$this->form->setValue('astroid_article_gallery_navigation', 'attribs' , (isset($attribs->astroid_article_gallery_navigation) && $attribs->astroid_article_gallery_navigation) ? $attribs->astroid_article_gallery_navigation : ''); |
| 35 | + |
| 36 | +$this->form->setValue('astroid_article_thumbnail', 'attribs' , (isset($attribs->astroid_article_thumbnail) && $attribs->astroid_article_thumbnail) ? $attribs->astroid_article_thumbnail : ''); |
| 37 | + |
| 38 | +$this->form->setValue('astroid_article_gallery_items', 'attribs' , (isset($attribs->astroid_article_gallery_items) && $attribs->astroid_article_gallery_items) ? $attribs->astroid_article_gallery_items : ''); |
| 39 | + |
| 40 | +$this->form->setValue('astroid_article_audio_source', 'attribs' , (isset($attribs->astroid_article_audio_source) && $attribs->astroid_article_audio_source) ? $attribs->astroid_article_audio_source : ''); |
| 41 | + |
| 42 | + |
| 43 | +$this->form->setValue('astroid_article_audio_soundcloud', 'attribs' , (isset($attribs->astroid_article_audio_soundcloud) && $attribs->astroid_article_audio_soundcloud) ? $attribs->astroid_article_audio_soundcloud : ''); |
| 44 | + |
| 45 | +$this->form->setValue('astroid_article_audio_spotify', 'attribs' , (isset($attribs->astroid_article_audio_spotify) && $attribs->astroid_article_audio_spotify) ? $attribs->astroid_article_audio_spotify : ''); |
| 46 | + |
| 47 | +$this->form->setValue('astroid_article_review_heading', 'attribs' , (isset($attribs->astroid_article_review_heading) && $attribs->astroid_article_review_heading) ? $attribs->astroid_article_review_heading : ''); |
| 48 | + |
| 49 | +$this->form->setValue('astroid_article_review_summery', 'attribs' , (isset($attribs->astroid_article_review_summery) && $attribs->astroid_article_review_summery) ? $attribs->astroid_article_review_summery : ''); |
| 50 | + |
| 51 | +$this->form->setValue('astroid_article_review_good', 'attribs' , (isset($attribs->astroid_article_review_good) && $attribs->astroid_article_review_good) ? $attribs->astroid_article_review_good : ''); |
| 52 | + |
| 53 | +$this->form->setValue('astroid_article_review_bad', 'attribs' , (isset($attribs->astroid_article_review_bad) && $attribs->astroid_article_review_bad) ? $attribs->astroid_article_review_bad : ''); |
| 54 | + |
| 55 | +$this->form->setValue('astroid_article_review_rating', 'attribs' , (isset($attribs->astroid_article_review_rating) && $attribs->astroid_article_review_rating) ? $attribs->astroid_article_review_rating : ''); |
| 56 | + |
| 57 | +$this->form->setValue('astroid_article_button_action', 'attribs' , (isset($attribs->astroid_article_button_action) && $attribs->astroid_article_button_action) ? $attribs->astroid_article_button_action : ''); |
| 58 | + |
| 59 | +$this->form->setValue('astroid_article_button_link', 'attribs' , (isset($attribs->astroid_article_button_link) && $attribs->astroid_article_button_link) ? $attribs->astroid_article_button_link : ''); |
| 60 | + |
| 61 | +$this->form->setValue('astroid_article_review_criterias', 'attribs' , (isset($attribs->astroid_article_review_criterias) && $attribs->astroid_article_review_criterias) ? $attribs->astroid_article_review_criterias : ''); |
| 62 | + |
| 63 | +$this->form->setValue('astroid_article_quote_text', 'attribs' , (isset($attribs->astroid_article_quote_text) && $attribs->astroid_article_quote_text) ? $attribs->astroid_article_quote_text : ''); |
| 64 | + |
| 65 | +$this->form->setValue('astroid_article_quote_author', 'attribs' , (isset($attribs->astroid_article_quote_author) && $attribs->astroid_article_quote_author) ? $attribs->astroid_article_quote_author : ''); |
| 66 | + |
| 67 | +$this->form->setValue('astroid_article_badge', 'attribs' , (isset($attribs->astroid_article_badge) && $attribs->astroid_article_badge) ? $attribs->astroid_article_badge : ''); |
| 68 | + |
| 69 | +$this->form->setValue('astroid_article_badge_type', 'attribs' , (isset($attribs->astroid_article_badge_type) && $attribs->astroid_article_badge_type) ? $attribs->astroid_article_badge_type : ''); |
| 70 | + |
| 71 | +$this->form->setValue('astroid_article_badge_text', 'attribs' , (isset($attribs->astroid_article_badge_text) && $attribs->astroid_article_badge_text) ? $attribs->astroid_article_badge_text : ''); |
| 72 | + |
| 73 | +$this->form->setValue('astroid_article_badge_color', 'attribs' , (isset($attribs->astroid_article_badge_color) && $attribs->astroid_article_badge_color) ? $attribs->astroid_article_badge_color : ''); |
| 74 | + |
| 75 | +$this->form->setValue('astroid_readtime', 'attribs' , (isset($attribs->astroid_readtime) && $attribs->astroid_readtime) ? $attribs->astroid_readtime : ''); |
| 76 | +$this->form->setValue('astroid_posttype', 'attribs' , (isset($attribs->astroid_posttype) && $attribs->astroid_posttype) ? $attribs->astroid_posttype : ''); |
| 77 | + |
| 78 | +$this->form->setValue('astroid_relatedposts', 'attribs' , (isset($attribs->astroid_relatedposts) && $attribs->astroid_relatedposts) ? $attribs->astroid_relatedposts : ''); |
| 79 | +$this->form->setValue('astroid_socialshare', 'attribs' , (isset($attribs->astroid_socialshare) && $attribs->astroid_socialshare) ? $attribs->astroid_socialshare : ''); |
| 80 | + |
| 81 | +$this->form->setValue('astroid_comments', 'attribs' , (isset($attribs->astroid_comments) && $attribs->astroid_comments) ? $attribs->astroid_comments : ''); |
| 82 | +$this->form->setValue('astroid_og_title', 'attribs' , (isset($attribs->astroid_og_title) && $attribs->astroid_og_title) ? $attribs->astroid_og_title : ''); |
| 83 | +$this->form->setValue('astroid_og_desc', 'attribs' , (isset($attribs->astroid_og_desc) && $attribs->astroid_og_desc) ? $attribs->astroid_og_desc : ''); |
| 84 | +$this->form->setValue('astroid_og_image', 'attribs' , (isset($attribs->astroid_og_image) && $attribs->astroid_og_image) ? $attribs->astroid_og_image : ''); |
| 85 | +$this->form->setValue('astroid_authorinfo', 'attribs' , (isset($attribs->astroid_authorinfo) && $attribs->astroid_authorinfo) ? $attribs->astroid_authorinfo : ''); |
| 86 | +// End Articles Type |
| 87 | + |
| 88 | +// This checks if the editor config options have ever been saved. If they haven't they will fall back to the original settings. |
| 89 | +$editoroptions = isset($params->show_publishing_options); |
| 90 | + |
| 91 | +if (!$editoroptions) |
| 92 | +{ |
| 93 | + $params->show_urls_images_frontend = '0'; |
| 94 | +} |
| 95 | + |
| 96 | +JFactory::getDocument()->addScriptDeclaration(" |
| 97 | + Joomla.submitbutton = function(task) |
| 98 | + { |
| 99 | + if (task == 'article.cancel' || document.formvalidator.isValid(document.getElementById('adminForm'))) |
| 100 | + { |
| 101 | + " . $this->form->getField('articletext')->save() . " |
| 102 | + Joomla.submitform(task); |
| 103 | + } |
| 104 | + } |
| 105 | +"); |
| 106 | +?> |
| 107 | +<div class="edit item-page<?php echo $this->pageclass_sfx; ?>"> |
| 108 | + <?php if ($params->get('show_page_heading')) : ?> |
| 109 | + <div class="page-header"> |
| 110 | + <h1> |
| 111 | + <?php echo $this->escape($params->get('page_heading')); ?> |
| 112 | + </h1> |
| 113 | + </div> |
| 114 | + <?php endif; ?> |
| 115 | + |
| 116 | + <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 com-content-adminForm"> |
| 117 | + <fieldset> |
| 118 | + <?php echo JHtml::_('bootstrap.startTabSet', $this->tab_name, array('active' => 'editor')); ?> |
| 119 | + |
| 120 | + <?php echo JHtml::_('bootstrap.addTab', $this->tab_name, 'editor', JText::_('COM_CONTENT_ARTICLE_CONTENT')); ?> |
| 121 | + <?php echo $this->form->renderField('title'); ?> |
| 122 | + |
| 123 | + <?php if (is_null($this->item->id)) : ?> |
| 124 | + <?php echo $this->form->renderField('alias'); ?> |
| 125 | + <?php endif; ?> |
| 126 | + |
| 127 | + <?php echo $this->form->getInput('articletext'); ?> |
| 128 | + |
| 129 | + <?php if ($this->captchaEnabled) : ?> |
| 130 | + <?php echo $this->form->renderField('captcha'); ?> |
| 131 | + <?php endif; ?> |
| 132 | + <?php echo JHtml::_('bootstrap.endTab'); ?> |
| 133 | + |
| 134 | + <?php if ($params->get('show_urls_images_frontend')) : ?> |
| 135 | + <?php echo JHtml::_('bootstrap.addTab', $this->tab_name, 'images', JText::_('COM_CONTENT_IMAGES_AND_URLS')); ?> |
| 136 | + |
| 137 | + <div class="row"> |
| 138 | + <div class="col-sm-6 mb-3"> |
| 139 | + <?php echo $this->form->renderField('image_intro', 'images'); ?> |
| 140 | + <?php echo $this->form->renderField('image_intro_alt', 'images'); ?> |
| 141 | + <?php echo $this->form->renderField('image_intro_caption', 'images'); ?> |
| 142 | + <?php echo $this->form->renderField('float_intro', 'images'); ?> |
| 143 | + </div> |
| 144 | + |
| 145 | + <div class="col-sm-6"> |
| 146 | + <?php echo $this->form->renderField('image_fulltext', 'images'); ?> |
| 147 | + <?php echo $this->form->renderField('image_fulltext_alt', 'images'); ?> |
| 148 | + <?php echo $this->form->renderField('image_fulltext_caption', 'images'); ?> |
| 149 | + <?php echo $this->form->renderField('float_fulltext', 'images'); ?> |
| 150 | + </div> |
| 151 | + </div> |
| 152 | + |
| 153 | + <hr> |
| 154 | + |
| 155 | + <div class="row"> |
| 156 | + <div class="col-sm-4 mb-3"> |
| 157 | + <?php echo $this->form->renderField('urla', 'urls'); ?> |
| 158 | + <?php echo $this->form->renderField('urlatext', 'urls'); ?> |
| 159 | + <div class="control-group"> |
| 160 | + <div class="controls"> |
| 161 | + <?php echo $this->form->getInput('targeta', 'urls'); ?> |
| 162 | + </div> |
| 163 | + </div> |
| 164 | + </div> |
| 165 | + |
| 166 | + <div class="col-sm-4 mb-3"> |
| 167 | + <?php echo $this->form->renderField('urlb', 'urls'); ?> |
| 168 | + <?php echo $this->form->renderField('urlbtext', 'urls'); ?> |
| 169 | + <div class="control-group"> |
| 170 | + <div class="controls"> |
| 171 | + <?php echo $this->form->getInput('targetb', 'urls'); ?> |
| 172 | + </div> |
| 173 | + </div> |
| 174 | + </div> |
| 175 | + |
| 176 | + <div class="col-sm-4 mb-3"> |
| 177 | + <?php echo $this->form->renderField('urlc', 'urls'); ?> |
| 178 | + <?php echo $this->form->renderField('urlctext', 'urls'); ?> |
| 179 | + <div class="control-group"> |
| 180 | + <div class="controls"> |
| 181 | + <?php echo $this->form->getInput('targetc', 'urls'); ?> |
| 182 | + </div> |
| 183 | + </div> |
| 184 | + </div> |
| 185 | + </div> |
| 186 | + |
| 187 | + <?php echo JHtml::_('bootstrap.endTab'); ?> |
| 188 | + <?php endif; ?> |
| 189 | + |
| 190 | + <?php echo JLayoutHelper::render('joomla.edit.params', $this); ?> |
| 191 | + |
| 192 | + <?php echo JHtml::_('bootstrap.addTab', $this->tab_name, 'publishing', JText::_('COM_CONTENT_PUBLISHING')); ?> |
| 193 | + <?php echo $this->form->renderField('catid'); ?> |
| 194 | + <?php echo $this->form->renderField('tags'); ?> |
| 195 | + <?php if ($params->get('save_history', 0)) : ?> |
| 196 | + <?php echo $this->form->renderField('version_note'); ?> |
| 197 | + <?php endif; ?> |
| 198 | + <?php if ($params->get('show_publishing_options', 1) == 1) : ?> |
| 199 | + <?php echo $this->form->renderField('created_by_alias'); ?> |
| 200 | + <?php endif; ?> |
| 201 | + <?php if ($this->item->params->get('access-change')) : ?> |
| 202 | + <?php echo $this->form->renderField('state'); ?> |
| 203 | + <?php echo $this->form->renderField('featured'); ?> |
| 204 | + <?php if ($params->get('show_publishing_options', 1) == 1) : ?> |
| 205 | + <?php echo $this->form->renderField('publish_up'); ?> |
| 206 | + <?php echo $this->form->renderField('publish_down'); ?> |
| 207 | + <?php endif; ?> |
| 208 | + <?php endif; ?> |
| 209 | + <?php echo $this->form->renderField('access'); ?> |
| 210 | + <?php if (is_null($this->item->id)) : ?> |
| 211 | + <div class="control-group"> |
| 212 | + <div class="control-label"> |
| 213 | + </div> |
| 214 | + <div class="controls"> |
| 215 | + <?php echo JText::_('COM_CONTENT_ORDERING'); ?> |
| 216 | + </div> |
| 217 | + </div> |
| 218 | + <?php endif; ?> |
| 219 | + <?php echo JHtml::_('bootstrap.endTab'); ?> |
| 220 | + |
| 221 | + <?php echo JHtml::_('bootstrap.addTab', $this->tab_name, 'language', JText::_('JFIELD_LANGUAGE_LABEL')); ?> |
| 222 | + <?php echo $this->form->renderField('language'); ?> |
| 223 | + <?php echo JHtml::_('bootstrap.endTab'); ?> |
| 224 | + |
| 225 | + <?php if ($params->get('show_publishing_options', 1) == 1) : ?> |
| 226 | + <?php echo JHtml::_('bootstrap.addTab', $this->tab_name, 'metadata', JText::_('COM_CONTENT_METADATA')); ?> |
| 227 | + <?php echo $this->form->renderField('metadesc'); ?> |
| 228 | + <?php echo $this->form->renderField('metakey'); ?> |
| 229 | + <?php echo JHtml::_('bootstrap.endTab'); ?> |
| 230 | + <?php endif; ?> |
| 231 | + |
| 232 | + <?php echo JHtml::_('bootstrap.endTabSet'); ?> |
| 233 | + |
| 234 | + <input type="hidden" name="task" value=""> |
| 235 | + <input type="hidden" name="return" value="<?php echo $this->return_page; ?>"> |
| 236 | + <?php echo JHtml::_('form.token'); ?> |
| 237 | + </fieldset> |
| 238 | + <div class="btn-toolbar"> |
| 239 | + <button type="button" class="btn btn-primary" onclick="Joomla.submitbutton('article.save')"> |
| 240 | + <span class="fa fa-check"></span> <?php echo JText::_('JSAVE') ?> |
| 241 | + </button> |
| 242 | + <button type="button" class="btn btn-secondary ml-2" onclick="Joomla.submitbutton('article.cancel')"> |
| 243 | + <span class="fa fa-times"></span> <?php echo JText::_('JCANCEL') ?> |
| 244 | + </button> |
| 245 | + <?php if ($params->get('save_history', 0) && $this->item->id) : ?> |
| 246 | + <?php echo $this->form->getInput('contenthistory'); ?> |
| 247 | + <?php endif; ?> |
| 248 | + </div> |
| 249 | + </form> |
| 250 | +</div> |
0 commit comments