1 <?php // no direct access
2 defined('_JEXEC') or die('Restricted access'); ?>
4 <div class="Post-body">
5 <div class="Post-inner">
7 <script language="javascript" type="text/javascript">
10 // TODO: Put setGood back
14 var sectioncategories = new Array;
17 foreach ($this->lists['sectioncategories'] as $k=>$items) {
18 foreach ($items as $v) {
19 echo "sectioncategories[".$i++."] = new Array( '$k','".addslashes( $v->id )."','".addslashes( $v->title )."' );\n\t\t";
25 function submitbutton(pressbutton) {
26 var form = document.adminForm;
27 if (pressbutton == 'cancel') {
28 submitform( pressbutton );
37 // do field validation
38 var text = <?php echo $this->editor->getContent( 'text' ); ?>
39 if (form.title.value == '') {
40 return alert ( "<?php echo JText::_( 'Article must have a title', true ); ?>" );
41 } else if (text == '') {
42 return alert ( "<?php echo JText::_( 'Article must have some text', true ); ?>");
43 } else if (parseInt('<?php echo $this->article->sectionid;?>')) {
45 if (form.catid && getSelectedValue('adminForm','catid') < 1) {
46 return alert ( "<?php echo JText::_( 'Please select a category', true ); ?>" );
49 <?php echo $this->editor->save( 'text' ); ?>
50 submitform(pressbutton);
54 <?php if ($this->params->def('show_page_title', 1)): ?>
55 <h2 class="PostHeaderIcon-wrapper"><?php echo JHTML::_('image.site', 'PostHeaderIcon.png', null, null, null, JText::_("PostHeaderIcon"), array('width' => '24', 'height' => '31')); ?> <span class="PostHeader">
56 <span class="componentheading<?php echo $this->params->get('pageclass_sfx')?>"><?php echo $this->escape($this->params->get('page_title')); ?></span>
61 <div class="PostContent">
63 <form action="<?php echo $this->action ?>" method="post" name="adminForm" onSubmit="setgood();">
65 <legend><?php echo JText::_('Editor'); ?></legend>
66 <table class="adminform" width="100%">
69 <div style="float: left;">
71 <?php echo JText::_( 'Title' ); ?>:
73 <input class="inputbox" type="text" id="title" name="title" size="50" maxlength="100" value="<?php echo $this->escape($this->article->title); ?>" />
74 <input class="inputbox" type="hidden" id="alias" name="alias" value="<?php echo $this->escape($this->article->alias); ?>" />
76 <div style="float: right;">
77 <button type="button" onclick="submitbutton('save')">
78 <?php echo JText::_('Save') ?>
80 <button type="button" onclick="submitbutton('cancel')">
81 <?php echo JText::_('Cancel') ?>
89 echo $this->editor->display('text', $this->article->text, '100%', '400', '70', '15');
93 <legend><?php echo JText::_('Publishing'); ?></legend>
94 <table class="adminform">
97 <label for="sectionid">
98 <?php echo JText::_( 'Section' ); ?>:
102 <?php echo $this->lists['sectionid']; ?>
108 <?php echo JText::_( 'Category' ); ?>:
112 <?php echo $this->lists['catid']; ?>
115 <?php if ($this->user->authorize('com_content', 'publish', 'content', 'all')) : ?>
119 <?php echo JText::_( 'Published' ); ?>:
123 <?php echo $this->lists['state']; ?>
128 <td width="120" class="key">
129 <label for="frontpage">
130 <?php echo JText::_( 'Show on Front Page' ); ?>:
134 <?php echo $this->lists['frontpage']; ?>
139 <label for="created_by_alias">
140 <?php echo JText::_( 'Author Alias' ); ?>:
144 <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" />
149 <label for="publish_up">
150 <?php echo JText::_( 'Start Publishing' ); ?>:
154 <?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')); ?>
159 <label for="publish_down">
160 <?php echo JText::_( 'Finish Publishing' ); ?>:
164 <?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')); ?>
168 <td valign="top" class="key">
170 <?php echo JText::_( 'Access Level' ); ?>:
174 <?php echo $this->lists['access']; ?>
179 <label for="ordering">
180 <?php echo JText::_( 'Ordering' ); ?>:
184 <?php echo $this->lists['ordering']; ?>
191 <legend><?php echo JText::_('Metadata'); ?></legend>
192 <table class="adminform" width="100%">
194 <td valign="top" class="key" width="120">
195 <label for="metadesc">
196 <?php echo JText::_( 'Description' ); ?>:
200 <textarea rows="5" cols="50" style="width: 95%; height: 120px" class="inputbox" id="metadesc" name="metadesc"><?php echo str_replace('&','&',$this->article->metadesc); ?></textarea>
204 <td valign="top" class="key" width="120">
205 <label for="metakey">
206 <?php echo JText::_( 'Keywords' ); ?>:
210 <textarea rows="5" cols="50" style="width: 95%; height: 50px" class="inputbox" id="metakey" name="metakey"><?php echo str_replace('&','&',$this->article->metakey); ?></textarea>
216 <input type="hidden" name="option" value="com_content" />
217 <input type="hidden" name="id" value="<?php echo $this->article->id; ?>" />
218 <input type="hidden" name="version" value="<?php echo $this->article->version; ?>" />
219 <input type="hidden" name="created_by" value="<?php echo $this->article->created_by; ?>" />
220 <input type="hidden" name="referer" value="<?php echo @$_SERVER['HTTP_REFERER']; ?>" />
221 <?php echo JHTML::_( 'form.token' ); ?>
222 <input type="hidden" name="task" value="" />
224 <?php echo JHTML::_('behavior.keepalive'); ?>
227 <div class="cleared"></div>