<?php
// $Id: content_blog_category.menu.html.php,v 1.1 2003/11/13 22:27:10 rcastley Exp $
/**
* Administrator menu content blog category presentation layer - By ChipJack
* @package Mambo Open Source
* @Copyright (C) 2000 - 2003 Miro International Pty Ltd
* @ All rights reserved
* @ Mambo Open Source is Free Software
* @ Released under GNU/GPL License: http://www.gnu.org/copyleft/gpl.html
* @version $Revision: 1.1 $
**/

// ensure this file is being included by a parent file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

/**
* Writes the edit form for new and existing content item
*
* A new record is defined when <var>$row</var> is passed with the <var>id</var>
* property set to 0.
* @param mosContent The category object
*/

class content_blog_category_menu_html {

   function edit( &$menu, &$slist, &$olist, &$glist, &$parlist, $option ) {
   /* in the HTML below, references to "section" were changed to "category" */
?>
      <script language="javascript" type="text/javascript">
      function submitbutton(pressbutton) {
         if (pressbutton == 'cancel') {
            submitform( pressbutton );
            return;
         }
         var form = document.adminForm;
         form.link.value = "index.php?option=content&task=blogcategory&id=" + form.componentid.value;
         
         // do field validation
         if (form.name.value == ""){
            alert( "Content item must have a title" );
         } else {
            submitform( pressbutton );
         }
      }
      </script>

      <form action="index2.php" method="POST" name="adminForm">
      <table cellpadding="5" cellspacing="0" border="0" width="100%">
         <tr>
            <td colspan="2" class="sectionname" >
               <?php echo $menu->id ? 'Edit' : 'Add';?> Menu Item - Blog Category
            </td>
         </tr>
      </table>
      <table cellpadding="5" cellspacing="0" border="0" width="100%" class="adminform">
         <tr>
            <td width="20%" align="right">Name:</td>
            <td width="80%">
               <input class="inputbox" type="text" name="name" size="50" maxlength="100" value="<?php echo $menu->name; ?>" />
            </td>
         </tr>
         <tr>
            <td valign="top" align="right" width="20%">Category:</td>
            <td width="80%">
               <?php echo $slist; ?>
            </td>
         </tr>
         <tr>
            <td align="right">Parent Item:</td>
            <td>
               <?php echo $parlist;?>
            </td>
         </tr>
         <tr>
            <td valign="top" align="right">Ordering:</td>
            <td>
               <?php echo $olist; ?>
            </td>
         </tr>
         <tr>
            <td valign="top" align="right">Access Level:</td>
            <td>
               <?php echo $glist; ?>
            </td>
         </tr>
         <tr>
            <td valign="top" align="right">Parameters:</td>
            <td>
               <textarea name="params" cols="50" rows="5" class="inputbox"><?php echo $menu->params; ?></textarea>
            </td>
         </tr>
      </table>

      <input type="hidden" name="option" value="<?php echo $option;?>" />
      <input type="hidden" name="id" value="<?php echo $menu->id; ?>" />
      <input type="hidden" name="menutype" value="<?php echo $menu->menutype; ?>" />
      <input type="hidden" name="link" value="" />
      <input type="hidden" name="type" value="<?php echo $menu->type; ?>" />
      <input type="hidden" name="task" value="" />
      </form>
<?php
   }
}
?>