| [ Index ] |
PHP Cross Reference of Joomla 1.5.25 |
[Summary view] [Print] [Text view]
1 <?php // @version: $Id: form.php 12389 2009-07-01 00:34:45Z ian $ 2 defined('_JEXEC') or die('Restricted access'); 3 $config =& JFactory::getConfig(); 4 $publish_up =& JFactory::getDate($this->article->publish_up); 5 $publish_up->setOffset($config->getValue('config.offset')); 6 $publish_up = $publish_up->toFormat(); 7 8 if (! isset($this->article->publish_down) || $this->article->publish_down == 'Never') { 9 $publish_down = JText::_('Never'); 10 } else { 11 $publish_down =& JFactory::getDate($this->article->publish_down); 12 $publish_down->setOffset($config->getValue('config.offset')); 13 $publish_down = $publish_down->toFormat(); 14 } 15 ?> 16 <script language="javascript" type="text/javascript"> 17 <!-- 18 function setgood() { 19 // TODO: Put setGood back 20 return true; 21 } 22 23 var sectioncategories = new Array; 24 <?php 25 $i = 0; 26 foreach ($this->lists['sectioncategories'] as $k=>$items) { 27 foreach ($items as $v) { 28 echo "sectioncategories[".$i++."] = new Array( '$k','".addslashes( $v->id )."','".addslashes( $v->title )."' );\n\t\t"; 29 } 30 } 31 ?> 32 33 34 function submitbutton(pressbutton) { 35 var form = document.adminForm; 36 if (pressbutton == 'cancel') { 37 submitform( pressbutton ); 38 return; 39 } 40 try { 41 form.onsubmit(); 42 } catch(e) { 43 alert(e); 44 } 45 46 // do field validation 47 var text = <?php echo $this->editor->getContent( 'text' ); ?> 48 if (form.title.value == '') { 49 return alert ( "<?php echo JText::_( 'Article must have a title', true ); ?>" ); 50 } else if (text == '') { 51 return alert ( "<?php echo JText::_( 'Article must have some text', true ); ?>"); 52 } else if (parseInt('<?php echo $this->article->sectionid;?>')) { 53 // for articles 54 if (form.catid && getSelectedValue('adminForm','catid') < 1) { 55 return alert ( "<?php echo JText::_( 'Please select a category', true ); ?>" ); 56 } 57 } 58 <?php echo $this->editor->save( 'text' ); ?> 59 submitform(pressbutton); 60 } 61 //--> 62 </script> 63 <?php if ($this->params->get('show_page_title', 1)) : ?> 64 <div class="componentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>"><?php echo $this->escape($this->params->get('page_title')); ?></div> 65 <?php endif; ?> 66 <form action="<?php echo $this->action ?>" method="post" name="adminForm" onSubmit="setgood();" class="editor"> 67 <fieldset> 68 <legend><?php echo JText::_('Editor'); ?></legend> 69 70 <div> 71 <label for="title"> 72 <?php echo JText::_( 'Title' ); ?>: 73 </label> 74 <input class="inputbox" type="text" id="title" name="title" size="50" maxlength="100" value="<?php echo $this->escape($this->article->title); ?>" /> 75 </div> 76 <div class="save"> 77 <button type="button" onclick="submitbutton('save')"> 78 <?php echo JText::_('Save') ?> 79 </button> 80 <button type="button" onclick="submitbutton('cancel')" /> 81 <?php echo JText::_('Cancel') ?> 82 </button> 83 </div> 84 <div class="wrap"> </div> 85 86 <?php 87 echo $this->editor->display('text', $this->article->text, '100%', '400', '70', '15'); 88 ?> 89 </fieldset> 90 <fieldset class="publishing"> 91 <legend><?php echo JText::_('Publishing'); ?></legend> 92 93 <div> 94 <label for="sectionid"> 95 <?php echo JText::_( 'Section' ); ?>: 96 </label> 97 98 <?php echo $this->lists['sectionid']; ?> 99 </div> 100 <div class="wrap"> </div> 101 102 <div> 103 <label for="catid"> 104 <?php echo JText::_( 'Category' ); ?>: 105 </label> 106 107 <?php echo $this->lists['catid']; ?> 108 </div> 109 <div class="wrap"> </div> 110 111 <?php if ($this->user->authorize('com_content', 'publish', 'content', 'all')) : ?> 112 113 <div class="radio"> 114 <label for="state" > 115 <span><?php echo JText::_( 'Published' ); ?>:</span> 116 </label> 117 118 <?php echo $this->lists['state']; ?> 119 </div> 120 121 122 <?php endif; ?> 123 124 <div class="radio"> 125 <label for="frontpage"> 126 <span><?php echo JText::_( 'Show on Front Page' ); ?>:</span> 127 </label> 128 129 <?php echo $this->lists['frontpage']; ?> 130 </div> 131 <div class="wrap"> </div> 132 133 <div> 134 <label for="created_by_alias"> 135 <?php echo JText::_( 'Author Alias' ); ?>: 136 </label> 137 138 <input type="text" id="created_by_alias" name="created_by_alias" size="50" maxlength="100" value="<?php echo $this->escape($this->article->created_by_alias); ?>" class="inputbox" /> 139 140 </div> 141 <div class="wrap"> </div> 142 <div> 143 <label for="publish_up"> 144 <?php echo JText::_( 'Start Publishing' ); ?>: 145 </label> 146 <?php echo JHTML::_('calendar', $publish_up, 'publish_up', 'publish_up', '%Y-%m-%d %H:%M:%S', array('class'=>'inputbox', 'size'=>'25', 'maxlength'=>'19')); ?> 147 </div> 148 <div class="wrap"> </div> 149 <div> 150 <label for="publish_down"> 151 <?php echo JText::_( 'Finish Publishing' ); ?>: 152 </label> 153 <?php echo JHTML::_('calendar', $publish_down, 'publish_down', 'publish_down', '%Y-%m-%d %H:%M:%S', array('class'=>'inputbox', 'size'=>'25', 'maxlength'=>'19')); ?> 154 </div> 155 <div class="wrap"> </div> 156 <div> 157 <label for="access"> 158 <?php echo JText::_( 'Access Level' ); ?>: 159 </label> 160 161 <?php echo $this->lists['access']; ?> 162 </div> 163 <div class="wrap"> </div> 164 <div> 165 <label for="ordering"> 166 <?php echo JText::_( 'Ordering' ); ?>: 167 </label> 168 169 <?php echo $this->lists['ordering']; ?> 170 </div> 171 <div class="wrap"> </div> 172 173 </fieldset> 174 175 <fieldset class="metadata"> 176 <legend><?php echo JText::_('Metadata'); ?></legend> 177 178 179 <label for="metadesc"> 180 <?php echo JText::_( 'Description' ); ?>: 181 </label> 182 183 <textarea rows="5" cols="50" style="width:500px; height:120px" class="inputbox" id="metadesc" name="metadesc"><?php echo str_replace('&','&',$this->article->metadesc); ?></textarea> 184 185 <label for="metakey"> 186 <?php echo JText::_( 'Keywords' ); ?>: 187 </label> 188 189 <textarea rows="5" cols="50" style="width:500px; height:50px" class="inputbox" id="metakey" name="metakey"><?php echo str_replace('&','&',$this->article->metakey); ?></textarea> 190 191 </fieldset> 192 193 <input type="hidden" name="option" value="com_content" /> 194 <input type="hidden" name="Returnid" value="<?php echo $this->returnid; ?>" /> 195 <input type="hidden" name="id" value="<?php echo $this->article->id; ?>" /> 196 <input type="hidden" name="version" value="<?php echo $this->article->version; ?>" /> 197 <input type="hidden" name="created_by" value="<?php echo $this->article->created_by; ?>" /> 198 <input type="hidden" name="referer" value="<?php echo str_replace(array('"', '<', '>', "'"), '', @$_SERVER['HTTP_REFERER']); ?>" /> 199 <input type="hidden" name="task" value="" /> 200 <?php echo JHTML::_( 'form.token' ); ?> 201 </form> 202 <?php echo JHTML::_('behavior.keepalive'); ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Nov 14 16:47:20 2011 | Cross-referenced by PHPXref 0.7.1 |