OSDN Git Service

初回コミット(v2.6.17.1)
[magic3/magic3.git] / templates / webstyles_flowers / 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-tl"></div>
26     <div class="Post-tr"><div></div></div>
27     <div class="Post-bl"><div></div></div>
28     <div class="Post-br"><div></div></div>
29     <div class="Post-tc"><div></div></div>
30     <div class="Post-bc"><div></div></div>
31     <div class="Post-cl"><div></div></div>
32     <div class="Post-cr"><div></div></div>
33     <div class="Post-cc"></div>
34     <div class="Post-body">
35 <div class="Post-inner">
36
37 <?php if ($this->params->def('show_page_title', 1)): ?>
38 <h2 class="PostHeaderIcon-wrapper"> <span class="PostHeader">
39 <span class="componentheading<?php echo $this->params->get('pageclass_sfx')?>"><?php echo $this->escape($this->params->get('page_title')); ?></span>
40 </span>
41 </h2>
42
43 <?php endif; ?>
44 <div class="PostContent">
45
46 <form action="<?php echo $this->action ?>" method="post" name="adminForm" id="adminForm">
47 <table cellpadding="4" cellspacing="1" border="0" width="100%">
48 <tr>
49         <td width="10%">
50                 <label for="jformtitle">
51                         <?php echo JText::_( 'Name' ); ?>:
52                 </label>
53         </td>
54         <td width="80%">
55                 <input class="inputbox" type="text" id="jformtitle" name="jform[title]" size="50" maxlength="250" value="<?php echo $this->escape($this->weblink->title);?>" />
56         </td>
57 </tr>
58 <tr>
59         <td valign="top">
60                 <label for="jformcatid">
61                         <?php echo JText::_( 'Category' ); ?>:
62                 </label>
63         </td>
64         <td>
65                 <?php echo $this->lists['catid']; ?>
66         </td>
67 </tr>
68 <tr>
69         <td valign="top">
70                 <label for="jformurl">
71                         <?php echo JText::_( 'URL' ); ?>:
72                 </label>
73         </td>
74         <td>
75                 <input class="inputbox" type="text" id="jformurl" name="jform[url]" value="<?php echo $this->weblink->url; ?>" size="50" maxlength="250" />
76         </td>
77 </tr>
78 <tr>
79         <td valign="top">
80                 <label for="jformpublished">
81                         <?php echo JText::_( 'Published' ); ?>:
82                 </label>
83         </td>
84         <td>
85                         <?php echo $this->lists['published']; ?>
86         </td>
87 </tr>
88 <tr>
89         <td valign="top">
90                 <label for="jformdescription">
91                         <?php echo JText::_( 'Description' ); ?>:
92                 </label>
93         </td>
94         <td>
95                 <textarea class="inputbox" cols="30" rows="6" id="jformdescription" name="jform[description]" style="width:300px"><?php echo $this->escape( $this->weblink->description);?></textarea>
96         </td>
97 </tr>
98 <tr>
99         <td class="key">
100                 <label for="jformordering">
101                         <?php echo JText::_( 'Ordering' ); ?>:
102                 </label>
103         </td>
104         <td>
105                 <?php echo $this->lists['ordering']; ?>
106         </td>
107 </tr>
108 </table>
109
110 <div>
111         <button type="button" onclick="submitbutton('save')">
112                 <?php echo JText::_('Save') ?>
113         </button>
114         <button type="button" onclick="submitbutton('cancel')">
115                 <?php echo JText::_('Cancel') ?>
116         </button>
117 </div>
118
119         <input type="hidden" name="jform[id]" value="<?php echo $this->weblink->id; ?>" />
120         <input type="hidden" name="jform[ordering]" value="<?php echo $this->weblink->ordering; ?>" />
121         <input type="hidden" name="jform[approved]" value="<?php echo $this->weblink->approved; ?>" />
122         <input type="hidden" name="option" value="com_weblinks" />
123         <input type="hidden" name="controller" value="weblink" />
124         <input type="hidden" name="task" value="" />
125         <?php echo JHTML::_( 'form.token' ); ?>
126 </form>
127
128 </div>
129 <div class="cleared"></div>
130
131
132 </div>
133
134     </div>
135 </div>