Annotation of /mambo/branches/4.6/administrator/components/com_menus/content_section/content_section.menu.html.php
Parent Directory
|
Revision Log
Revision 297 - (view) (download)
| 1 : | root | 1 | <?php |
| 2 : | /** | ||
| 3 : | csouza | 297 | * @package Mambo Open Source |
| 4 : | root | 1 | * @subpackage Menus |
| 5 : | csouza | 297 | * @copyright (C) 2005 - 2006 Mambo Foundation Inc. |
| 6 : | root | 1 | * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL |
| 7 : | csouza | 297 | * |
| 8 : | * Mambo was originally developed by Miro (www.miro.com.au) in 2000. Miro assigned the copyright in Mambo to The Mambo Foundation in 2005 to ensure | ||
| 9 : | * that Mambo remained free Open Source software owned and managed by the community. | ||
| 10 : | root | 1 | * Mambo is Free Software |
| 11 : | csouza | 297 | */ |
| 12 : | root | 1 | |
| 13 : | /** ensure this file is being included by a parent file */ | ||
| 14 : | defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); | ||
| 15 : | |||
| 16 : | /** | ||
| 17 : | * Writes the edit form for new and existing content item | ||
| 18 : | * | ||
| 19 : | * A new record is defined when <var>$row</var> is passed with the <var>id</var> | ||
| 20 : | * property set to 0. | ||
| 21 : | */ | ||
| 22 : | class content_section_menu_html { | ||
| 23 : | |||
| 24 : | function editSection( &$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 : | csouza | 165 | alert( '<?php echo T_('You must select a Section') ?>' ); |
| 40 : | root | 1 | return; |
| 41 : | } | ||
| 42 : | |||
| 43 : | form.link.value = "index.php?option=com_content&task=section&id=" + form.componentid.value; | ||
| 44 : | if ( form.name.value == '' ) { | ||
| 45 : | form.name.value = form.componentid.options[form.componentid.selectedIndex].text; | ||
| 46 : | } | ||
| 47 : | submitform( pressbutton ); | ||
| 48 : | <?php | ||
| 49 : | } else { | ||
| 50 : | ?> | ||
| 51 : | if ( form.name.value == '' ) { | ||
| 52 : | csouza | 165 | alert( '<?php echo T_('This Menu item must have a title') ?>' ); |
| 53 : | root | 1 | } else { |
| 54 : | submitform( pressbutton ); | ||
| 55 : | } | ||
| 56 : | <?php | ||
| 57 : | } | ||
| 58 : | ?> | ||
| 59 : | |||
| 60 : | |||
| 61 : | } | ||
| 62 : | </script> | ||
| 63 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 64 : | |||
| 65 : | <table class="adminheading"> | ||
| 66 : | <tr> | ||
| 67 : | <th> | ||
| 68 : | csouza | 165 | <?php echo $menu->id ? T_('Edit') : T_('Add');?> <?php echo T_('Menu Item :: Table - Content Section') ?> |
| 69 : | root | 1 | </th> |
| 70 : | </tr> | ||
| 71 : | </table> | ||
| 72 : | |||
| 73 : | <table width="100%"> | ||
| 74 : | <tr valign="top"> | ||
| 75 : | <td width="60%"> | ||
| 76 : | <table class="adminform"> | ||
| 77 : | <tr> | ||
| 78 : | <th colspan="3"> | ||
| 79 : | csouza | 165 | <?php echo T_('Details') ?> |
| 80 : | root | 1 | </th> |
| 81 : | </tr> | ||
| 82 : | <tr> | ||
| 83 : | csouza | 165 | <td width="10%" align="right" valign="top"><?php echo T_('Name:') ?></td> |
| 84 : | root | 1 | <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 : | csouza | 165 | echo mosToolTip( T_('If you leave this blank the Section name will be automatically used') ); |
| 91 : | root | 1 | } |
| 92 : | ?> | ||
| 93 : | </td> | ||
| 94 : | </tr> | ||
| 95 : | <tr> | ||
| 96 : | csouza | 165 | <td align="right" valign="top"><?php echo T_('Section:') ?></td> |
| 97 : | root | 1 | <td colspan="2"> |
| 98 : | <?php echo $lists['componentid']; ?> | ||
| 99 : | </td> | ||
| 100 : | </tr> | ||
| 101 : | <tr> | ||
| 102 : | csouza | 165 | <td align="right"><?php echo T_('Url:') ?></td> |
| 103 : | root | 1 | <td colspan="2"> |
| 104 : | <?php echo $lists['link']; ?> | ||
| 105 : | </td> | ||
| 106 : | </tr> | ||
| 107 : | <tr> | ||
| 108 : | csouza | 165 | <td align="right"><?php echo T_('Parent Item:') ?></td> |
| 109 : | root | 1 | <td colspan="2"> |
| 110 : | <?php echo $lists['parent'];?> | ||
| 111 : | </td> | ||
| 112 : | </tr> | ||
| 113 : | <tr> | ||
| 114 : | csouza | 165 | <td valign="top" align="right"><?php echo T_('Ordering:') ?></td> |
| 115 : | root | 1 | <td colspan="2"> |
| 116 : | <?php echo $lists['ordering']; ?> | ||
| 117 : | </td> | ||
| 118 : | </tr> | ||
| 119 : | <tr> | ||
| 120 : | csouza | 165 | <td valign="top" align="right"><?php echo T_('Access Level:') ?></td> |
| 121 : | root | 1 | <td colspan="2"> |
| 122 : | <?php echo $lists['access']; ?> | ||
| 123 : | </td> | ||
| 124 : | </tr> | ||
| 125 : | <tr> | ||
| 126 : | csouza | 165 | <td valign="top" align="right"><?php echo T_('Published:') ?></td> |
| 127 : | root | 1 | <td colspan="2"> |
| 128 : | <?php echo $lists['published']; ?> | ||
| 129 : | </td> | ||
| 130 : | </tr> | ||
| 131 : | <tr> | ||
| 132 : | <td colspan="3"> </td> | ||
| 133 : | </tr> | ||
| 134 : | </table> | ||
| 135 : | </td> | ||
| 136 : | <td width="40%"> | ||
| 137 : | <table class="adminform"> | ||
| 138 : | <tr> | ||
| 139 : | <th> | ||
| 140 : | csouza | 165 | <?php echo T_('Parameters') ?> |
| 141 : | root | 1 | </th> |
| 142 : | </tr> | ||
| 143 : | <tr> | ||
| 144 : | <td> | ||
| 145 : | <?php echo $params->render();?> | ||
| 146 : | </td> | ||
| 147 : | </tr> | ||
| 148 : | </table> | ||
| 149 : | </td> | ||
| 150 : | </tr> | ||
| 151 : | </table> | ||
| 152 : | |||
| 153 : | <input type="hidden" name="option" value="<?php echo $option;?>" /> | ||
| 154 : | <input type="hidden" name="id" value="<?php echo $menu->id; ?>" /> | ||
| 155 : | <input type="hidden" name="menutype" value="<?php echo $menu->menutype; ?>" /> | ||
| 156 : | <input type="hidden" name="type" value="<?php echo $menu->type; ?>" /> | ||
| 157 : | <input type="hidden" name="task" value="" /> | ||
| 158 : | <input type="hidden" name="hidemainmenu" value="0" /> | ||
| 159 : | </form> | ||
| 160 : | <script language="Javascript" src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js"></script> | ||
| 161 : | <?php | ||
| 162 : | } | ||
| 163 : | } | ||
| 164 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

