Skip to content

Commit

Permalink
Disable publishing fields if the option is set
Browse files Browse the repository at this point in the history
  • Loading branch information
brianteeman committed Mar 21, 2017
1 parent d677d97 commit 83292bf
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions components/com_content/views/form/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,18 @@
<?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 // Do not show these publishing options if the edit form is configured not to. ?>
<?php if ($params->get('show_publishing_options', 1) == 1) : ?>
<?php echo $this->form->renderField('created_by_alias'); ?>
<?php endif; ?>
<?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 // Do not show these publishing options if the edit form is configured not to. ?>
<?php if ($params->get('show_publishing_options', 1) == 1) : ?>
<?php echo $this->form->renderField('publish_up'); ?>
<?php echo $this->form->renderField('publish_down'); ?>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->form->renderField('access'); ?>
<?php if (is_null($this->item->id)) : ?>
Expand All @@ -131,10 +137,13 @@
<?php echo $this->form->renderField('language'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>

<?php echo JHtml::_('bootstrap.addTab', $this->tab_name, 'metadata', JText::_('COM_CONTENT_METADATA')); ?>
<?php echo $this->form->renderField('metadesc'); ?>
<?php echo $this->form->renderField('metakey'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php // Do not show these publishing options if the edit form is configured not to. ?>
<?php if ($params->get('show_publishing_options', 1) == 1) : ?>
<?php echo JHtml::_('bootstrap.addTab', $this->tab_name, 'metadata', JText::_('COM_CONTENT_METADATA')); ?>
<?php echo $this->form->renderField('metadesc'); ?>
<?php echo $this->form->renderField('metakey'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>

<?php echo JHtml::_('bootstrap.endTabSet'); ?>

Expand Down

0 comments on commit 83292bf

Please sign in to comment.