OSDN Git Service

初回コミット(v2.6.17.1)
[magic3/magic3.git] / templates / pwc007_music / html / com_content / article / form.php
1 <?php // no direct access
2 defined('_JEXEC') or die('Restricted access'); ?>
3 <div class="Post">
4     <div class="Post-body">
5 <div class="Post-inner">
6
7 <script language="javascript" type="text/javascript">
8 <!--
9 function setgood() {
10         // TODO: Put setGood back
11         return true;
12 }
13
14 var sectioncategories = new Array;
15 <?php
16 $i = 0;
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";
20         }
21 }
22 ?>
23
24
25 function submitbutton(pressbutton) {
26         var form = document.adminForm;
27         if (pressbutton == 'cancel') {
28                 submitform( pressbutton );
29                 return;
30         }
31         try {
32                 form.onsubmit();
33         } catch(e) {
34                 alert(e);
35         }
36
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;?>')) {
44                 // for articles
45                 if (form.catid && getSelectedValue('adminForm','catid') < 1) {
46                         return alert ( "<?php echo JText::_( 'Please select a category', true ); ?>" );
47                 }
48         }
49         <?php echo $this->editor->save( 'text' ); ?>
50         submitform(pressbutton);
51 }
52 //-->
53 </script>
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>
57 </span>
58 </h2>
59
60 <?php endif; ?>
61 <div class="PostContent">
62
63 <form action="<?php echo $this->action ?>" method="post" name="adminForm" onSubmit="setgood();">
64 <fieldset>
65 <legend><?php echo JText::_('Editor'); ?></legend>
66 <table class="adminform" width="100%">
67 <tr>
68         <td>
69                 <div style="float: left;">
70                         <label for="title">
71                                 <?php echo JText::_( 'Title' ); ?>:
72                         </label>
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); ?>" />
75                 </div>
76                 <div style="float: right;">
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         </td>
85 </tr>
86 </table>
87
88 <?php
89 echo $this->editor->display('text', $this->article->text, '100%', '400', '70', '15');
90 ?>
91 </fieldset>
92 <fieldset>
93 <legend><?php echo JText::_('Publishing'); ?></legend>
94 <table class="adminform">
95 <tr>
96         <td class="key">
97                 <label for="sectionid">
98                         <?php echo JText::_( 'Section' ); ?>:
99                 </label>
100         </td>
101         <td>
102                 <?php echo $this->lists['sectionid']; ?>
103         </td>
104 </tr>
105 <tr>
106         <td class="key">
107                 <label for="catid">
108                         <?php echo JText::_( 'Category' ); ?>:
109                 </label>
110         </td>
111         <td>
112                 <?php echo $this->lists['catid']; ?>
113         </td>
114 </tr>
115 <?php if ($this->user->authorize('com_content', 'publish', 'content', 'all')) : ?>
116 <tr>
117         <td class="key">
118                 <label for="state">
119                         <?php echo JText::_( 'Published' ); ?>:
120                 </label>
121         </td>
122         <td>
123                 <?php echo $this->lists['state']; ?>
124         </td>
125 </tr>
126 <?php endif; ?>
127 <tr>
128         <td width="120" class="key">
129                 <label for="frontpage">
130                         <?php echo JText::_( 'Show on Front Page' ); ?>:
131                 </label>
132         </td>
133         <td>
134                 <?php echo $this->lists['frontpage']; ?>
135         </td>
136 </tr>
137 <tr>
138         <td class="key">
139                 <label for="created_by_alias">
140                         <?php echo JText::_( 'Author Alias' ); ?>:
141                 </label>
142         </td>
143         <td>
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" />
145         </td>
146 </tr>
147 <tr>
148         <td class="key">
149                 <label for="publish_up">
150                         <?php echo JText::_( 'Start Publishing' ); ?>:
151                 </label>
152         </td>
153         <td>
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')); ?>
155         </td>
156 </tr>
157 <tr>
158         <td class="key">
159                 <label for="publish_down">
160                         <?php echo JText::_( 'Finish Publishing' ); ?>:
161                 </label>
162         </td>
163         <td>
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')); ?>
165         </td>
166 </tr>
167 <tr>
168         <td valign="top" class="key">
169                 <label for="access">
170                         <?php echo JText::_( 'Access Level' ); ?>:
171                 </label>
172         </td>
173         <td>
174                 <?php echo $this->lists['access']; ?>
175         </td>
176 </tr>
177 <tr>
178         <td class="key">
179                 <label for="ordering">
180                         <?php echo JText::_( 'Ordering' ); ?>:
181                 </label>
182         </td>
183         <td>
184                 <?php echo $this->lists['ordering']; ?>
185         </td>
186 </tr>
187 </table>
188 </fieldset>
189
190 <fieldset>
191 <legend><?php echo JText::_('Metadata'); ?></legend>
192 <table class="adminform" width="100%">
193 <tr>
194         <td valign="top" class="key" width="120">
195                 <label for="metadesc">
196                         <?php echo JText::_( 'Description' ); ?>:
197                 </label>
198         </td>
199         <td>
200                 <textarea rows="5" cols="50" style="width: 95%; height: 120px" class="inputbox" id="metadesc" name="metadesc"><?php echo str_replace('&','&amp;',$this->article->metadesc); ?></textarea>
201         </td>
202 </tr>
203 <tr>
204         <td  valign="top" class="key" width="120">
205                 <label for="metakey">
206                         <?php echo JText::_( 'Keywords' ); ?>:
207                 </label>
208         </td>
209         <td>
210                 <textarea rows="5" cols="50" style="width: 95%; height: 50px" class="inputbox" id="metakey" name="metakey"><?php echo str_replace('&','&amp;',$this->article->metakey); ?></textarea>
211         </td>
212 </tr>
213 </table>
214 </fieldset>
215
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="" />
223 </form>
224 <?php echo JHTML::_('behavior.keepalive'); ?>
225
226 </div>
227 <div class="cleared"></div>
228
229
230 </div>
231
232     </div>
233 </div>
234