OSDN Git Service

初回コミット(v2.6.17.1)
[magic3/magic3.git] / templates / pwc007_music / html / com_weblinks / weblink / form.php
1 <?php defined('_JEXEC') or die('Restricted access'); ?>
2 <script language="javascript" type="text/javascript">
3 function submitbutton(pressbutton)
4 {
5         var form = document.adminForm;
6         if (pressbutton == 'cancel') {
7                 submitform( pressbutton );
8                 return;
9         }
10
11         // do field validation
12         if (document.getElementById('jformtitle').value == ""){
13                 alert( "<?php echo JText::_( 'Weblink item must have a title', true ); ?>" );
14         } else if (document.getElementById('jformcatid').value < 1) {
15                 alert( "<?php echo JText::_( 'You must select a category.', true ); ?>" );
16         } else if (document.getElementById('jformurl').value == ""){
17                 alert( "<?php echo JText::_( 'You must have a url.', true ); ?>" );
18         } else {
19                 submitform( pressbutton );
20         }
21 }
22 </script>
23
24 <div class="Post">
25     <div class="Post-body">
26 <div class="Post-inner">
27
28 <?php if ($this->params->def('show_page_title', 1)): ?>
29 <h2 class="PostHeaderIcon-wrapper"><?php echo JHTML::_('image.site', 'PostHeaderIcon.png', null, null, null, JText::_("PostHeaderIcon"), array('width' => '24', 'height' => '31')); ?> <span class="PostHeader">
30 <span class="componentheading<?php echo $this->params->get('pageclass_sfx')?>"><?php echo $this->escape($this->params->get('page_title')); ?></span>
31 </span>
32 </h2>
33
34 <?php endif; ?>
35 <div class="PostContent">
36
37 <form action="<?php echo $this->action ?>" method="post" name="adminForm" id="adminForm">
38 <table cellpadding="4" cellspacing="1" border="0" width="100%">
39 <tr>
40         <td width="10%">
41                 <label for="jformtitle">
42                         <?php echo JText::_( 'Name' ); ?>:
43                 </label>
44         </td>
45         <td width="80%">
46                 <input class="inputbox" type="text" id="jformtitle" name="jform[title]" size="50" maxlength="250" value="<?php echo $this->escape($this->weblink->title);?>" />
47         </td>
48 </tr>
49 <tr>
50         <td valign="top">
51                 <label for="jformcatid">
52                         <?php echo JText::_( 'Category' ); ?>:
53                 </label>
54         </td>
55         <td>
56                 <?php echo $this->lists['catid']; ?>
57         </td>
58 </tr>
59 <tr>
60         <td valign="top">
61                 <label for="jformurl">
62                         <?php echo JText::_( 'URL' ); ?>:
63                 </label>
64         </td>
65         <td>
66                 <input class="inputbox" type="text" id="jformurl" name="jform[url]" value="<?php echo $this->weblink->url; ?>" size="50" maxlength="250" />
67         </td>
68 </tr>
69 <tr>
70         <td valign="top">
71                 <label for="jformpublished">
72                         <?php echo JText::_( 'Published' ); ?>:
73                 </label>
74         </td>
75         <td>
76                         <?php echo $this->lists['published']; ?>
77         </td>
78 </tr>
79 <tr>
80         <td valign="top">
81                 <label for="jformdescription">
82                         <?php echo JText::_( 'Description' ); ?>:
83                 </label>
84         </td>
85         <td>
86                 <textarea class="inputbox" cols="30" rows="6" id="jformdescription" name="jform[description]" style="width:300px"><?php echo $this->escape( $this->weblink->description);?></textarea>
87         </td>
88 </tr>
89 <tr>
90         <td class="key">
91                 <label for="jformordering">
92                         <?php echo JText::_( 'Ordering' ); ?>:
93                 </label>
94         </td>
95         <td>
96                 <?php echo $this->lists['ordering']; ?>
97         </td>
98 </tr>
99 </table>
100
101 <div>
102         <button type="button" onclick="submitbutton('save')">
103                 <?php echo JText::_('Save') ?>
104         </button>
105         <button type="button" onclick="submitbutton('cancel')">
106                 <?php echo JText::_('Cancel') ?>
107         </button>
108 </div>
109
110         <input type="hidden" name="jform[id]" value="<?php echo $this->weblink->id; ?>" />
111         <input type="hidden" name="jform[ordering]" value="<?php echo $this->weblink->ordering; ?>" />
112         <input type="hidden" name="jform[approved]" value="<?php echo $this->weblink->approved; ?>" />
113         <input type="hidden" name="option" value="com_weblinks" />
114         <input type="hidden" name="controller" value="weblink" />
115         <input type="hidden" name="task" value="" />
116         <?php echo JHTML::_( 'form.token' ); ?>
117 </form>
118
119 </div>
120 <div class="cleared"></div>
121
122
123 </div>
124
125     </div>
126 </div>