[ Index ]
 

Code source de b2evolution 2.1.0-beta

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/blogs/inc/generic/views/ -> _generic_category.form.php (source)

   1  <?php
   2  /**

   3   * This file implements the generic category form

   4   *

   5   * This file is part of the evoCore framework - {@link http://evocore.net/}

   6   * See also {@link http://sourceforge.net/projects/evocms/}.

   7   *

   8   * @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/}

   9   *

  10   * {@internal License choice

  11   * - If you have received this file as part of a package, please find the license.txt file in

  12   *   the same folder or the closest folder above for complete license terms.

  13   * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)

  14   *   then you must choose one of the following licenses before using the file:

  15   *   - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php

  16   *   - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php

  17   * }}

  18   *

  19   * @package admin

  20   *

  21   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}

  22   * @author fplanque: Francois PLANQUE.

  23   *

  24   * @version $Id: _generic_category.form.php,v 1.1 2007/06/25 11:00:18 fplanque Exp $

  25   */
  26  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  27  
  28  /**

  29   * @var GenericCategory

  30   */
  31  global $edited_GenericCategory;
  32  
  33  /**

  34   * @var GenericCategoryCache

  35   */
  36  global $GenericCategoryCache;
  37  
  38  global $action, $subset_ID, $edited_name_maxlen;
  39  
  40  // Determine if we are creating or updating...

  41  $creating = is_create_action( $action );
  42  
  43  $Form = & new Form( NULL, 'form' );
  44  
  45  $Form->global_icon( T_('Cancel editing!'), 'close', regenerate_url( 'action' ) );
  46  
  47  $Form->begin_form( 'fform', $creating ?  T_('New category') : T_('Category') );
  48  
  49  $Form->hidden( 'action', $creating ? 'create' : 'update' );
  50  
  51  $Form->hidden( 'ctrl', $ctrl );
  52  
  53  $Form->hiddens_by_key( get_memorized( 'action, ctrl' ) );
  54  
  55  $Form->begin_fieldset( T_('Properties') );
  56  
  57      $Form->select_input_options( $edited_GenericCategory->dbprefix.'parent_ID',
  58                  $GenericCategoryCache->recurse_select( $edited_GenericCategory->parent_ID, $subset_ID, true ), T_('Parent') );
  59  
  60      $Form->text_input( $edited_GenericCategory->dbprefix.'name', $edited_GenericCategory->name, $edited_name_maxlen, T_('name'), '', array( 'required' => true ) );
  61  
  62  $Form->end_fieldset();
  63  
  64  if( $creating )
  65  {
  66      $Form->end_form( array( array( 'submit', 'submit', T_('Record'), 'SaveButton' ),
  67                                                      array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
  68  }
  69  else
  70  {
  71      $Form->hidden( $edited_GenericCategory->dbIDname, $edited_GenericCategory->ID );
  72      $Form->end_form( array( array( 'submit', 'submit', T_('Update'), 'SaveButton' ),
  73                                                      array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
  74  }
  75  
  76  
  77  /*

  78   * $Log: _generic_category.form.php,v $

  79   * Revision 1.1  2007/06/25 11:00:18  fplanque

  80   * MODULES (refactored MVC)

  81   *

  82   * Revision 1.4  2007/04/26 00:11:11  fplanque

  83   * (c) 2007

  84   *

  85   * Revision 1.3  2006/12/09 01:55:36  fplanque

  86   * feel free to fill in some missing notes

  87   * hint: "login" does not need a note! :P

  88   *

  89   * Revision 1.2  2006/11/24 18:27:26  blueyed

  90   * Fixed link to b2evo CVS browsing interface in file docblocks

  91   */
  92  ?>


Généré le : Thu Nov 29 23:58:50 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics