[ 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/chapters/views/ -> _chapter.form.php (source)

   1  <?php
   2  /**

   3   * This file implements the Chapter 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: _chapter.form.php,v 1.1 2007/06/25 10:59:26 fplanque Exp $

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

  29   * @var Chapter

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

  33   * @var Chapter

  34   */
  35  $edited_Chapter = & $edited_GenericCategory;
  36  
  37  /**

  38   * @var GenericCategoryCache

  39   */
  40  global $GenericCategoryCache;
  41  
  42  global $action, $subset_ID;
  43  
  44  // Determine if we are creating or updating...

  45  $creating = is_create_action( $action );
  46  
  47  $Form = & new Form( NULL, 'form' );
  48  
  49  $Form->global_icon( T_('Cancel editing!'), 'close', regenerate_url( 'action' ) );
  50  
  51  $Form->begin_form( 'fform', $creating ?  T_('New category') : T_('Category') );
  52  
  53  $Form->hidden( 'action', $creating ? 'create' : 'update' );
  54  $Form->hiddens_by_key( get_memorized( 'action' ) );
  55  
  56  $Form->begin_fieldset( T_('Properties') );
  57  
  58      // We're essentially double checking here...

  59      $edited_Blog = & $edited_Chapter->get_Blog();
  60      $Form->info( T_('Blog'), $edited_Blog->dget('name') );
  61  
  62      $Form->select_input_options( $edited_Chapter->dbprefix.'parent_ID',
  63                  $GenericCategoryCache->recurse_select( $edited_Chapter->parent_ID, $subset_ID, true, NULL, 0, array($edited_Chapter->ID) ), T_('Parent category') );
  64  
  65      $Form->text_input( $edited_Chapter->dbprefix.'name', $edited_Chapter->name, 40, T_('Name'), '', array( 'required' => true, 'maxlength' => 255 ) );
  66  
  67      $Form->text_input( $edited_Chapter->dbprefix.'urlname', $edited_Chapter->urlname, 40, T_('URL name'), T_('Used for clean URLs. Must be unique.'), array( 'required' => true, 'maxlength' => 255 ) );
  68  
  69  $Form->end_fieldset();
  70  
  71  if( $creating )
  72  {
  73      $Form->end_form( array( array( 'submit', 'submit', T_('Record'), 'SaveButton' ),
  74                                                      array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
  75  }
  76  else
  77  {
  78      $Form->end_form( array( array( 'submit', 'submit', T_('Update'), 'SaveButton' ),
  79                                                      array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
  80  }
  81  
  82  
  83  /*

  84   * $Log: _chapter.form.php,v $

  85   * Revision 1.1  2007/06/25 10:59:26  fplanque

  86   * MODULES (refactored MVC)

  87   *

  88   * Revision 1.8  2007/04/26 00:11:05  fplanque

  89   * (c) 2007

  90   *

  91   * Revision 1.7  2006/12/11 00:32:26  fplanque

  92   * allow_moving_chapters stting moved to UI

  93   * chapters are now called categories in the UI

  94   *

  95   * Revision 1.6  2006/12/09 17:59:34  fplanque

  96   * started "moving chapters accross blogs" feature

  97   *

  98   * Revision 1.5  2006/12/09 02:37:44  fplanque

  99   * Prevent user from creating loops in the chapter tree

 100   * (still needs a check before writing to DB though)

 101   *

 102   * Revision 1.4  2006/12/09 01:55:36  fplanque

 103   * feel free to fill in some missing notes

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

 105   *

 106   * Revision 1.3  2006/11/24 18:27:25  blueyed

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

 108   */
 109  ?>


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