Annotation of /mambo/trunk/administrator/components/com_menus/contact_category_table/contact_category_table.menu.html.php
Parent Directory
|
Revision Log
Revision 1 - (view) (download)
| 1 : | root | 1 | <?php |
| 2 : | /** | ||
| 3 : | * @version $Id: contact_category_table.menu.html.php,v 1.1 2005/07/22 01:52:50 eddieajau Exp $ | ||
| 4 : | * @package Mambo | ||
| 5 : | * @subpackage Menus | ||
| 6 : | * @copyright (C) 2000 - 2005 Miro International Pty Ltd | ||
| 7 : | * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL | ||
| 8 : | * Mambo is Free Software | ||
| 9 : | */ | ||
| 10 : | |||
| 11 : | /** ensure this file is being included by a parent file */ | ||
| 12 : | defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); | ||
| 13 : | |||
| 14 : | /** | ||
| 15 : | * Writes the edit form for new and existing content item | ||
| 16 : | * | ||
| 17 : | * A new record is defined when <var>$row</var> is passed with the <var>id</var> | ||
| 18 : | * property set to 0. | ||
| 19 : | * @package Mambo | ||
| 20 : | * @subpackage Menus | ||
| 21 : | */ | ||
| 22 : | class contact_category_table_menu_html { | ||
| 23 : | |||
| 24 : | function editCategory( &$menu, &$lists, &$params, $option ) { | ||
| 25 : | global $mosConfig_live_site; | ||
| 26 : | ?> | ||
| 27 : | <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div> | ||
| 28 : | <script language="javascript" type="text/javascript"> | ||
| 29 : | function submitbutton(pressbutton) { | ||
| 30 : | if ( pressbutton == 'cancel' ) { | ||
| 31 : | submitform( pressbutton ); | ||
| 32 : | return; | ||
| 33 : | } | ||
| 34 : | var form = document.adminForm; | ||
| 35 : | <?php | ||
| 36 : | if ( !$menu->id ) { | ||
| 37 : | ?> | ||
| 38 : | if ( getSelectedValue( 'adminForm', 'componentid' ) < 1 ) { | ||
| 39 : | alert( 'You must select a category' ); | ||
| 40 : | return; | ||
| 41 : | } | ||
| 42 : | cat = getSelectedText( 'adminForm', 'componentid' ); | ||
| 43 : | |||
| 44 : | form.link.value = "index.php?option=com_contact&catid=" + form.componentid.value; | ||
| 45 : | if ( form.name.value == '' ) { | ||
| 46 : | form.name.value = cat; | ||
| 47 : | } | ||
| 48 : | submitform( pressbutton ); | ||
| 49 : | <?php | ||
| 50 : | } else { | ||
| 51 : | ?> | ||
| 52 : | if ( form.name.value == '' ) { | ||
| 53 : | alert( 'This Menu item must have a title' ); | ||
| 54 : | } else { | ||
| 55 : | submitform( pressbutton ); | ||
| 56 : | } | ||
| 57 : | <?php | ||
| 58 : | } | ||
| 59 : | ?> | ||
| 60 : | } | ||
| 61 : | </script> | ||
| 62 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 63 : | <table class="adminheading"> | ||
| 64 : | <tr> | ||
| 65 : | <th> | ||
| 66 : | <?php echo $menu->id ? 'Edit' : 'Add';?> Menu Item :: Table - Contact Category | ||
| 67 : | </th> | ||
| 68 : | </tr> | ||
| 69 : | </table> | ||
| 70 : | |||
| 71 : | <table width="100%"> | ||
| 72 : | <tr valign="top"> | ||
| 73 : | <td width="60%"> | ||
| 74 : | <table class="adminform"> | ||
| 75 : | <tr> | ||
| 76 : | <th colspan="3"> | ||
| 77 : | Details | ||
| 78 : | </th> | ||
| 79 : | </tr> | ||
| 80 : | <tr> | ||
| 81 : | <td width="10%" align="right" valign="top"> | ||
| 82 : | Name: | ||
| 83 : | </td> | ||
| 84 : | <td width="200px"> | ||
| 85 : | <input type="text" name="name" size="30" maxlength="100" class="inputbox" value="<?php echo $menu->name; ?>"/> | ||
| 86 : | </td> | ||
| 87 : | <td> | ||
| 88 : | <?php | ||
| 89 : | if ( !$menu->id ) { | ||
| 90 : | echo mosToolTip( 'If you leave this blank the Category name will be automatically used' ); | ||
| 91 : | } | ||
| 92 : | ?> | ||
| 93 : | </td> | ||
| 94 : | </tr> | ||
| 95 : | <tr> | ||
| 96 : | <td width="10%" align="right" valign="top"> | ||
| 97 : | Category: | ||
| 98 : | </td> | ||
| 99 : | <td colspan="2"> | ||
| 100 : | <?php echo $lists['componentid']; ?> | ||
| 101 : | </td> | ||
| 102 : | </tr> | ||
| 103 : | <tr> | ||
| 104 : | <td align="right"> | ||
| 105 : | Url: | ||
| 106 : | </td> | ||
| 107 : | <td colspan="2"> | ||
| 108 : | <?php echo $lists['link']; ?> | ||
| 109 : | </td> | ||
| 110 : | </tr> | ||
| 111 : | <tr> | ||
| 112 : | <td align="right"> | ||
| 113 : | Parent Item: | ||
| 114 : | </td> | ||
| 115 : | <td colspan="2"> | ||
| 116 : | <?php echo $lists['parent'];?> | ||
| 117 : | </td> | ||
| 118 : | </tr> | ||
| 119 : | <tr> | ||
| 120 : | <td valign="top" align="right"> | ||
| 121 : | Ordering: | ||
| 122 : | </td> | ||
| 123 : | <td colspan="2"> | ||
| 124 : | <?php echo $lists['ordering']; ?> | ||
| 125 : | </td> | ||
| 126 : | </tr> | ||
| 127 : | <tr> | ||
| 128 : | <td valign="top" align="right"> | ||
| 129 : | Access Level: | ||
| 130 : | </td> | ||
| 131 : | <td colspan="2"> | ||
| 132 : | <?php echo $lists['access']; ?> | ||
| 133 : | </td> | ||
| 134 : | </tr> | ||
| 135 : | <tr> | ||
| 136 : | <td valign="top" align="right"> | ||
| 137 : | Published: | ||
| 138 : | </td> | ||
| 139 : | <td colspan="2"> | ||
| 140 : | <?php echo $lists['published']; ?> | ||
| 141 : | </td> | ||
| 142 : | </tr> | ||
| 143 : | <tr> | ||
| 144 : | <td colspan="3"> </td> | ||
| 145 : | </tr> | ||
| 146 : | </table> | ||
| 147 : | </td> | ||
| 148 : | <td width="40%"> | ||
| 149 : | <table class="adminform"> | ||
| 150 : | <tr> | ||
| 151 : | <th> | ||
| 152 : | Parameters | ||
| 153 : | </th> | ||
| 154 : | </tr> | ||
| 155 : | <tr> | ||
| 156 : | <td> | ||
| 157 : | <?php echo $params->render();?> | ||
| 158 : | </td> | ||
| 159 : | </tr> | ||
| 160 : | </table> | ||
| 161 : | </td> | ||
| 162 : | </tr> | ||
| 163 : | </table> | ||
| 164 : | |||
| 165 : | <input type="hidden" name="option" value="<?php echo $option;?>" /> | ||
| 166 : | <input type="hidden" name="id" value="<?php echo $menu->id; ?>" /> | ||
| 167 : | <input type="hidden" name="menutype" value="<?php echo $menu->menutype; ?>" /> | ||
| 168 : | <input type="hidden" name="type" value="<?php echo $menu->type; ?>" /> | ||
| 169 : | <input type="hidden" name="link" value="<?php echo $menu->link; ?>" /> | ||
| 170 : | <input type="hidden" name="task" value="" /> | ||
| 171 : | <input type="hidden" name="hidemainmenu" value="0" /> | ||
| 172 : | </form> | ||
| 173 : | <script language="Javascript" src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js"></script> | ||
| 174 : | <?php | ||
| 175 : | } | ||
| 176 : | } | ||
| 177 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

