| [ Index ] | PHP Cross Reference of Mambo 4.6.5 |
|
| [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @package Mambo 4 * @subpackage Menus 5 * @author Mambo Foundation Inc see README.php 6 * @copyright (C) 2000 - 2009 Mambo Foundation Inc. 7 * See COPYRIGHT.php for copyright notices and details. 8 * @license GNU/GPL Version 2, see LICENSE.php 9 * 10 * Redistributions of files must retain the above copyright notice. 11 * 12 * Mambo is free software; you can redistribute it and/or 13 * modify it under the terms of the GNU General Public License 14 * as published by the Free Software Foundation; version 2 of the License. 15 */ 16 17 /** ensure this file is being included by a parent file */ 18 defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); 19 20 /** 21 * Writes the edit form for new and existing content item 22 * 23 * A new record is defined when <var>$row</var> is passed with the <var>id</var> 24 * property set to 0. 25 */ 26 class content_category_menu_html { 27 28 function editCategory( &$menu, &$lists, &$params, $option ) { 29 global $mosConfig_live_site; 30 ?> 31 <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div> 32 <script type="text/javascript"> 33 function submitbutton(pressbutton) { 34 if ( pressbutton == 'cancel' ) { 35 submitform( pressbutton ); 36 return; 37 } 38 var form = document.adminForm; 39 <?php 40 if ( !$menu->id ) { 41 ?> 42 if ( getSelectedValue( 'adminForm', 'componentid' ) < 1 ) { 43 alert( '<?php echo T_('You must select a category'); ?>' ); 44 return; 45 } 46 sectcat = getSelectedText( 'adminForm', 'componentid' ); 47 sectcats = sectcat.split('/'); 48 section = getSelectedOption( 'adminForm', 'componentid' ); 49 50 form.link.value = "index.php?option=com_content&task=category§ionid=" + section.id + "&id=" + form.componentid.value; 51 if ( form.name.value == '' ) { 52 form.name.value = sectcats[1]; 53 } 54 submitform( pressbutton ); 55 <?php 56 } else { 57 ?> 58 if ( form.name.value == '' ) { 59 alert( '<?php echo T_('This Menu item must have a title'); ?>' ); 60 } else { 61 submitform( pressbutton ); 62 } 63 <?php 64 } 65 ?> 66 } 67 </script> 68 <form action="index2.php" method="post" name="adminForm"> 69 <table class="adminheading"> 70 <tr> 71 <th> 72 <?php echo $menu->id ? T_('Edit') : T_('Add');?> <?php echo T_('Menu Item :: Table - Content Category'); ?> 73 </th> 74 </tr> 75 </table> 76 77 <table width="100%"> 78 <tr valign="top"> 79 <td width="60%"> 80 <table class="adminform"> 81 <tr> 82 <th colspan="3"> 83 <?php echo T_('Details'); ?> 84 </th> 85 </tr> 86 <tr> 87 <td width="10%" align="right" valign="top"> 88 <?php echo T_('Name:'); ?> 89 </td> 90 <td width="200px"> 91 <input type="text" name="name" size="30" maxlength="100" class="inputbox" value="<?php echo $menu->name; ?>"/> 92 </td> 93 <td> 94 <?php 95 if ( !$menu->id ) { 96 echo mosToolTip( T_('If you leave this blank the Category name will be automatically used') ); 97 } 98 ?> 99 </td> 100 </tr> 101 <tr> 102 <td width="10%" align="right" valign="top"> 103 <?php echo T_('Category:'); ?> 104 </td> 105 <td colspan="2"> 106 <?php echo $lists['componentid']; ?> 107 </td> 108 </tr> 109 <tr> 110 <td align="right"> 111 <?php echo T_('Url:'); ?> 112 </td> 113 <td colspan="2"> 114 <?php echo $lists['link']; ?> 115 </td> 116 </tr> 117 <tr> 118 <td align="right"> 119 <?php echo T_('Parent Item:'); ?> 120 </td> 121 <td colspan="2"> 122 <?php echo $lists['parent'];?> 123 </td> 124 </tr> 125 <tr> 126 <td valign="top" align="right"> 127 <?php echo T_('Ordering:'); ?> 128 </td> 129 <td colspan="2"> 130 <?php echo $lists['ordering']; ?> 131 </td> 132 </tr> 133 <tr> 134 <td valign="top" align="right"> 135 <?php echo T_('Access Level:'); ?> 136 </td> 137 <td colspan="2"> 138 <?php echo $lists['access']; ?> 139 </td> 140 </tr> 141 <tr> 142 <td valign="top" align="right"> 143 <?php echo T_('Published:'); ?> 144 </td> 145 <td colspan="2"> 146 <?php echo $lists['published']; ?> 147 </td> 148 </tr> 149 <tr> 150 <td colspan="3"> </td> 151 </tr> 152 </table> 153 </td> 154 <td width="40%"> 155 <table class="adminform"> 156 <tr> 157 <th> 158 <?php echo T_('Parameters'); ?> 159 </th> 160 </tr> 161 <tr> 162 <td> 163 <?php echo $params->render();?> 164 </td> 165 </tr> 166 </table> 167 </td> 168 </tr> 169 </table> 170 171 <input type="hidden" name="option" value="<?php echo $option;?>" /> 172 <input type="hidden" name="id" value="<?php echo $menu->id; ?>" /> 173 <input type="hidden" name="menutype" value="<?php echo $menu->menutype; ?>" /> 174 <input type="hidden" name="type" value="<?php echo $menu->type; ?>" /> 175 <input type="hidden" name="task" value="" /> 176 <input type="hidden" name="hidemainmenu" value="0" /> 177 </form> 178 <script src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js" type="text/javascript"></script> 179 <?php 180 } 181 } 182 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed May 23 00:05:01 2012 | Cross-referenced by PHPXref 0.7 |
| Mambo API: Mambo is Free software released under the GNU/General Public License, Version 2 |