Files
@ 7ec91347b83f
Branch filter:
Location: hot67beta/administrator/components/com_weblinks/views/weblink/tmpl/form.php
7ec91347b83f
3.8 KiB
text/x-php
there we go
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 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | <?php defined('_JEXEC') or die('Restricted access'); ?>
<?php JHTML::_('behavior.tooltip'); ?>
<?php
// Set toolbar items for the page
$edit = JRequest::getVar('edit',true);
$text = !$edit ? JText::_( 'New' ) : JText::_( 'Edit' );
JToolBarHelper::title( JText::_( 'Weblink' ).': <small><small>[ ' . $text.' ]</small></small>' );
JToolBarHelper::save();
if (!$edit) {
JToolBarHelper::cancel();
} else {
// for existing items the button is renamed `close`
JToolBarHelper::cancel( 'cancel', 'Close' );
}
JToolBarHelper::help( 'screen.weblink.edit' );
?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
// do field validation
if (form.title.value == ""){
alert( "<?php echo JText::_( 'Weblink item must have a title', true ); ?>" );
} else if (form.catid.value == "0"){
alert( "<?php echo JText::_( 'You must select a category', true ); ?>" );
} else if (form.url.value == ""){
alert( "<?php echo JText::_( 'You must have a url.', true ); ?>" );
} else {
submitform( pressbutton );
}
}
</script>
<style type="text/css">
table.paramlist td.paramlist_key {
width: 92px;
text-align: left;
height: 30px;
}
</style>
<form action="index.php" method="post" name="adminForm" id="adminForm">
<div class="col width-50">
<fieldset class="adminform">
<legend><?php echo JText::_( 'Details' ); ?></legend>
<table class="admintable">
<tr>
<td width="100" align="right" class="key">
<label for="title">
<?php echo JText::_( 'Name' ); ?>:
</label>
</td>
<td>
<input class="text_area" type="text" name="title" id="title" size="32" maxlength="250" value="<?php echo $this->weblink->title;?>" />
</td>
</tr>
<tr>
<td width="100" align="right" class="key">
<label for="alias">
<?php echo JText::_( 'Alias' ); ?>:
</label>
</td>
<td>
<input class="text_area" type="text" name="alias" id="alias" size="32" maxlength="250" value="<?php echo $this->weblink->alias;?>" />
</td>
</tr>
<tr>
<td valign="top" align="right" class="key">
<?php echo JText::_( 'Published' ); ?>:
</td>
<td>
<?php echo $this->lists['published']; ?>
</td>
</tr>
<tr>
<td valign="top" align="right" class="key">
<label for="catid">
<?php echo JText::_( 'Category' ); ?>:
</label>
</td>
<td>
<?php echo $this->lists['catid']; ?>
</td>
</tr>
<tr>
<td valign="top" align="right" class="key">
<label for="url">
<?php echo JText::_( 'URL' ); ?>:
</label>
</td>
<td>
<input class="text_area" type="text" name="url" id="url" value="<?php echo $this->weblink->url; ?>" size="32" maxlength="250" />
</td>
</tr>
<tr>
<td valign="top" align="right" class="key">
<label for="ordering">
<?php echo JText::_( 'Ordering' ); ?>:
</label>
</td>
<td>
<?php echo $this->lists['ordering']; ?>
</td>
</tr>
</table>
</fieldset>
</div>
<div class="col width-50">
<fieldset class="adminform">
<legend><?php echo JText::_( 'Parameters' ); ?></legend>
<table class="admintable">
<tr>
<td colspan="2">
<?php echo $this->params->render();?>
</td>
</tr>
</table>
</fieldset>
</div>
<div class="col width-50">
<fieldset class="adminform">
<legend><?php echo JText::_( 'Description' ); ?></legend>
<table class="admintable">
<tr>
<td>
<textarea class="text_area" cols="44" rows="9" name="description" id="description"><?php echo $this->weblink->description; ?></textarea>
</td>
</tr>
</table>
</fieldset>
</div>
<div class="clr"></div>
<input type="hidden" name="option" value="com_weblinks" />
<input type="hidden" name="cid[]" value="<?php echo $this->weblink->id; ?>" />
<input type="hidden" name="task" value="" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
|