2 defined('_JEXEC') or die('Restricted access'); // no direct access
3 require_once dirname(__FILE__) . str_replace('/', DIRECTORY_SEPARATOR, '/../../../functions.php');
6 <script language="javascript" type="text/javascript">
12 var sectioncategories = [];
15 foreach ($this->lists['sectioncategories'] as $k => $items) {
16 foreach ($items as $v) {
17 echo "sectioncategories[" . $i++ . "] = ['$k', '" . addslashes($v->id) . "', '" . addslashes( $v->title ) . "'];\n\t\t";
22 function submitbutton(pressbutton)
24 var form = document.adminForm;
25 if (pressbutton == 'cancel') {
26 submitform(pressbutton);
35 // do field validation
36 var text = <?php echo $this->editor->getContent( 'text' ); ?>
37 if (form.title.value == '') {
38 return alert ("<?php echo JText::_( 'Article must have a title', true ); ?>");
39 } else if (text == '') {
40 return alert ("<?php echo JText::_( 'Article must have some text', true ); ?>");
41 } else if (parseInt('<?php echo $this->article->sectionid;?>')) {
43 if (form.catid && getSelectedValue('adminForm','catid') < 1) {
44 return alert("<?php echo JText::_( 'Please select a category', true ); ?>");
47 <?php echo $this->editor->save('text'); ?>
48 submitform(pressbutton);
51 <form action="<?php echo $this->action ?>" method="post" name="adminForm" onSubmit="setgood();">
53 <legend><?php echo JText::_('Editor'); ?></legend>
54 <table class="adminform" width="100%">
57 <div style="float: left;">
58 <label for="title"><?php echo JText::_( 'Title' ); ?>:</label>
59 <input class="inputbox" type="text" id="title" name="title" size="50" maxlength="100" value="<?php echo $this->escape($this->article->title); ?>" />
60 <input class="inputbox" type="hidden" id="alias" name="alias" value="<?php echo $this->escape($this->article->alias); ?>" />
62 <div style="float: right;">
63 <button type="button" onclick="submitbutton('save')"><?php echo JText::_('Save') ?></button>
64 <button type="button" onclick="submitbutton('cancel')"><?php echo JText::_('Cancel') ?></button>
69 <?php echo $this->editor->display('text', $this->article->text, '100%', '400', '70', '15'); ?>
72 <legend><?php echo JText::_('Publishing'); ?></legend>
73 <table class="adminform">
75 <td class="key"><label for="sectionid"><?php echo JText::_( 'Section' ); ?>:</label></td>
76 <td><?php echo $this->lists['sectionid']; ?></td>
79 <td class="key"><label for="catid"><?php echo JText::_( 'Category' ); ?>:</label></td>
80 <td><?php echo $this->lists['catid']; ?></td>
82 <?php if ($this->user->authorize('com_content', 'publish', 'content', 'all')) : ?>
84 <td class="key"><label for="state"><?php echo JText::_( 'Published' ); ?>:</label></td>
85 <td><?php echo $this->lists['state']; ?></td>
89 <td width="120" class="key"><label for="frontpage"><?php echo JText::_( 'Show on Front Page' ); ?>:</label></td>
90 <td><?php echo $this->lists['frontpage']; ?></td>
93 <td class="key"><label for="created_by_alias"><?php echo JText::_( 'Author Alias' ); ?>:</label></td>
94 <td><input type="text" id="created_by_alias" name="created_by_alias" size="50" maxlength="100" value="<?php echo $this->article->created_by_alias; ?>" class="inputbox" /></td>
97 <td class="key"><label for="publish_up"><?php echo JText::_( 'Start Publishing' ); ?>:</label></td>
98 <td><?php echo JHTML::_('calendar', $this->article->publish_up, 'publish_up', 'publish_up', '%Y-%m-%d %H:%M:%S', array('class'=>'inputbox', 'size'=>'25', 'maxlength'=>'19')); ?></td>
101 <td class="key"><label for="publish_down"><?php echo JText::_( 'Finish Publishing' ); ?>:</label></td>
102 <td><?php echo JHTML::_('calendar', $this->article->publish_down, 'publish_down', 'publish_down', '%Y-%m-%d %H:%M:%S', array('class'=>'inputbox', 'size'=>'25', 'maxlength'=>'19')); ?></td>
105 <td valign="top" class="key"><label for="access"><?php echo JText::_( 'Access Level' ); ?>:</label></td>
106 <td><?php echo $this->lists['access']; ?></td>
109 <td class="key"><label for="ordering"><?php echo JText::_( 'Ordering' ); ?>:</label></td>
110 <td><?php echo $this->lists['ordering']; ?></td>
116 <legend><?php echo JText::_('Metadata'); ?></legend>
117 <table class="adminform" width="100%">
119 <td valign="top" class="key" width="120"><label for="metadesc"><?php echo JText::_( 'Description' ); ?>:</label></td>
121 <textarea rows="5" cols="50" style="width: 95%; height: 120px" class="inputbox" id="metadesc" name="metadesc"><?php echo str_replace('&','&',$this->article->metadesc); ?></textarea>
125 <td valign="top" class="key" width="120"><label for="metakey"><?php echo JText::_( 'Keywords' ); ?>:</label></td>
127 <textarea rows="5" cols="50" style="width: 95%; height: 50px" class="inputbox" id="metakey" name="metakey"><?php echo str_replace('&','&',$this->article->metakey); ?></textarea>
133 <input type="hidden" name="option" value="com_content" />
134 <input type="hidden" name="id" value="<?php echo $this->article->id; ?>" />
135 <input type="hidden" name="version" value="<?php echo $this->article->version; ?>" />
136 <input type="hidden" name="created_by" value="<?php echo $this->article->created_by; ?>" />
137 <input type="hidden" name="referer" value="<?php echo isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; ?>" />
138 <?php echo JHTML::_( 'form.token' ); ?>
139 <input type="hidden" name="task" value="" />
141 <?php echo JHTML::_('behavior.keepalive'); ?>
142 <?php echo artxPost(artxPageTitle($this), ob_get_clean()); ?>