b2evolution PHP Cross Reference Blogging Systems

Source: /inc/items/views/_itemtype.form.php - 81 lines - 3166 bytes - Text - Print

Description: This file is part of the evoCore framework - {@link http://evocore.net/} See also {@link http://sourceforge.net/projects/evocms/}.

   1  <?php
   2  /**
   3   * This file is part of the evoCore framework - {@link http://evocore.net/}
   4   * See also {@link http://sourceforge.net/projects/evocms/}.
   5   *
   6   * @copyright (c)2009-2014 by Francois PLANQUE - {@link http://fplanque.net/}
   7   * Parts of this file are copyright (c)2009 by The Evo Factory - {@link http://www.evofactory.com/}.
   8   *
   9   * {@internal License choice
  10   * - If you have received this file as part of a package, please find the license.txt file in
  11   *   the same folder or the closest folder above for complete license terms.
  12   * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
  13   *   then you must choose one of the following licenses before using the file:
  14   *   - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
  15   *   - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
  16   * }}
  17   *
  18   * {@internal Open Source relicensing agreement:
  19   * The Evo Factory grants Francois PLANQUE the right to license
  20   * The Evo Factory's contributions to this file and the b2evolution project
  21   * under any OSI approved OSS license (http://www.opensource.org/licenses/).
  22   * }}
  23   *
  24   * @package evocore
  25   *
  26   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  27   * @author efy-sergey: Evo Factory / Sergey.
  28   * @author fplanque: Francois PLANQUE.
  29   *
  30   * @version $Id: _itemtype.form.php 6136 2014-03-08 07:59:48Z manuel $
  31   */
  32  
  33  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  34  
  35  load_class( 'items/model/_itemtype.class.php', 'ItemType' );
  36  
  37  /**
  38   * @var Itemtype
  39   */
  40  global $edited_Itemtype;
  41  
  42  // Determine if we are creating or updating...
  43  global $action;
  44  
  45  $creating = is_create_action( $action );
  46  
  47  $Form = new Form( NULL, 'itemtype_checkchanges', 'post', 'compact' );
  48  
  49  $Form->global_icon( T_('Delete this item type!'), 'delete', regenerate_url( 'action', 'action=delete' ) );
  50  $Form->global_icon( T_('Cancel editing!'), 'close', regenerate_url( 'action' ) );
  51  
  52  $Form->begin_form( 'fform', $creating ?  T_('New item type') : T_('Item type') );
  53  
  54      $Form->add_crumb( 'itemtype' );
  55      $Form->hiddens_by_key( get_memorized( 'action'.( $creating ? ',ptyp_ID' : '' ) ) ); // (this allows to come back to the right list order & page)
  56  
  57  if( $creating )
  58  {
  59      $Form->text_input( 'new_ptyp_ID', '', 8, T_('ID'), '', array( 'maxlength'=> 10, 'required'=>true ) );
  60  }
  61  else
  62  {
  63      $Form->hidden( 'ptyp_ID', $edited_Itemtype->ID );
  64  }
  65  
  66  $Form->text_input( 'ptyp_name', $edited_Itemtype->name, 50, T_('Name'), '', array( 'maxlength'=> 255, 'required'=>true ) );
  67  
  68  if( $creating )
  69  {
  70      $Form->end_form( array( array( 'submit', 'actionArray[create]', T_('Record'), 'SaveButton' ),
  71                                                      array( 'submit', 'actionArray[create_new]', T_('Record, then Create New'), 'SaveButton' ),
  72                                                      array( 'submit', 'actionArray[create_copy]', T_('Record, then Create Similar'), 'SaveButton' ),
  73                                                      array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
  74  }
  75  else
  76  {
  77      $Form->end_form( array( array( 'submit', 'actionArray[update]', T_('Update'), 'SaveButton' ),
  78                                                      array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
  79  }
  80  
  81  ?>

title

Description

title

Description

title

Description

title

title

Body