1 <?php defined('_JEXEC') or die('Restricted access'); ?>
2 <script language="javascript" type="text/javascript">
3 function submitbutton(pressbutton)
5 var form = document.adminForm;
6 if (pressbutton == 'cancel') {
7 submitform( pressbutton );
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 ); ?>" );
19 submitform( pressbutton );
25 <div class="Post-body">
26 <div class="Post-inner">
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>
35 <div class="PostContent">
37 <form action="<?php echo $this->action ?>" method="post" name="adminForm" id="adminForm">
38 <table cellpadding="4" cellspacing="1" border="0" width="100%">
41 <label for="jformtitle">
42 <?php echo JText::_( 'Name' ); ?>:
46 <input class="inputbox" type="text" id="jformtitle" name="jform[title]" size="50" maxlength="250" value="<?php echo $this->escape($this->weblink->title);?>" />
51 <label for="jformcatid">
52 <?php echo JText::_( 'Category' ); ?>:
56 <?php echo $this->lists['catid']; ?>
61 <label for="jformurl">
62 <?php echo JText::_( 'URL' ); ?>:
66 <input class="inputbox" type="text" id="jformurl" name="jform[url]" value="<?php echo $this->weblink->url; ?>" size="50" maxlength="250" />
71 <label for="jformpublished">
72 <?php echo JText::_( 'Published' ); ?>:
76 <?php echo $this->lists['published']; ?>
81 <label for="jformdescription">
82 <?php echo JText::_( 'Description' ); ?>:
86 <textarea class="inputbox" cols="30" rows="6" id="jformdescription" name="jform[description]" style="width:300px"><?php echo $this->escape( $this->weblink->description);?></textarea>
91 <label for="jformordering">
92 <?php echo JText::_( 'Ordering' ); ?>:
96 <?php echo $this->lists['ordering']; ?>
102 <button type="button" onclick="submitbutton('save')">
103 <?php echo JText::_('Save') ?>
105 <button type="button" onclick="submitbutton('cancel')">
106 <?php echo JText::_('Cancel') ?>
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' ); ?>
120 <div class="cleared"></div>