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 <div class="adminform">
55 <div style="float: left;">
56 <label for="title"><?php echo JText::_( 'Title' ); ?>:</label>
57 <input class="inputbox" type="text" id="title" name="title" size="50" maxlength="100" value="<?php echo $this->escape($this->article->title); ?>" />
58 <input class="inputbox" type="hidden" id="alias" name="alias" value="<?php echo $this->escape($this->article->alias); ?>" />
60 <div style="float: right;">
61 <span class="art-button-wrapper">
62 <span class="l"> </span>
63 <span class="r"> </span>
64 <input type="button" class="art-button" onclick="submitbutton('save')" value="<?php echo JText::_('Save') ?>" />
66 <span class="art-button-wrapper">
67 <span class="l"> </span>
68 <span class="r"> </span>
69 <input type="button" class="art-button" onclick="submitbutton('cancel')" value="<?php echo JText::_('Cancel') ?>" />
72 <div style="clear: both;"></div>
74 <?php echo $this->editor->display('text', $this->article->text, '100%', '400', '70', '15'); ?>
77 <legend><?php echo JText::_('Publishing'); ?></legend>
78 <table class="adminform">
80 <td class="key"><label for="sectionid"><?php echo JText::_( 'Section' ); ?>:</label></td>
81 <td><?php echo $this->lists['sectionid']; ?></td>
84 <td class="key"><label for="catid"><?php echo JText::_( 'Category' ); ?>:</label></td>
85 <td><?php echo $this->lists['catid']; ?></td>
87 <?php if ($this->user->authorize('com_content', 'publish', 'content', 'all')) : ?>
89 <td class="key"><label for="state"><?php echo JText::_( 'Published' ); ?>:</label></td>
90 <td><?php echo $this->lists['state']; ?></td>
94 <td width="120" class="key"><label for="frontpage"><?php echo JText::_( 'Show on Front Page' ); ?>:</label></td>
95 <td><?php echo $this->lists['frontpage']; ?></td>
98 <td class="key"><label for="created_by_alias"><?php echo JText::_( 'Author Alias' ); ?>:</label></td>
99 <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>
102 <td class="key"><label for="publish_up"><?php echo JText::_( 'Start Publishing' ); ?>:</label></td>
103 <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>
106 <td class="key"><label for="publish_down"><?php echo JText::_( 'Finish Publishing' ); ?>:</label></td>
107 <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>
110 <td valign="top" class="key"><label for="access"><?php echo JText::_( 'Access Level' ); ?>:</label></td>
111 <td><?php echo $this->lists['access']; ?></td>
114 <td class="key"><label for="ordering"><?php echo JText::_( 'Ordering' ); ?>:</label></td>
115 <td><?php echo $this->lists['ordering']; ?></td>
121 <legend><?php echo JText::_('Metadata'); ?></legend>
122 <table class="adminform" width="100%">
124 <td valign="top" class="key" width="120"><label for="metadesc"><?php echo JText::_( 'Description' ); ?>:</label></td>
126 <textarea rows="5" cols="50" style="width: 95%; height: 120px" class="inputbox" id="metadesc" name="metadesc"><?php echo str_replace('&','&',$this->article->metadesc); ?></textarea>
130 <td valign="top" class="key" width="120"><label for="metakey"><?php echo JText::_( 'Keywords' ); ?>:</label></td>
132 <textarea rows="5" cols="50" style="width: 95%; height: 50px" class="inputbox" id="metakey" name="metakey"><?php echo str_replace('&','&',$this->article->metakey); ?></textarea>
138 <input type="hidden" name="option" value="com_content" />
139 <input type="hidden" name="id" value="<?php echo $this->article->id; ?>" />
140 <input type="hidden" name="version" value="<?php echo $this->article->version; ?>" />
141 <input type="hidden" name="created_by" value="<?php echo $this->article->created_by; ?>" />
142 <input type="hidden" name="referer" value="<?php echo isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; ?>" />
143 <?php echo JHTML::_( 'form.token' ); ?>
144 <input type="hidden" name="task" value="" />
146 <?php echo JHTML::_('behavior.keepalive'); ?>
147 <?php echo artxPost(artxPageTitle($this), ob_get_clean()); ?>