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