b2evolution PHP Cross Reference Blogging Systems

Source: /inc/regional/views/_currency.form.php - 72 lines - 3198 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-maxim: Evo Factory / Maxim.
  28   * @author fplanque: Francois Planque.
  29   *
  30   * @version $Id: _currency.form.php 6136 2014-03-08 07:59:48Z manuel $
  31   */
  32  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  33  
  34  /**
  35   * @var Currency
  36   */
  37  global $edited_Currency;
  38  
  39  // Determine if we are creating or updating...
  40  global $action;
  41  $creating = is_create_action( $action );
  42  
  43  $Form = new Form( NULL, 'currency_checkchanges', 'post', 'compact' );
  44  
  45  $Form->global_icon( T_('Delete this currency!'), 'delete', regenerate_url( 'action', 'action=delete&amp;'.url_crumb('currency') ) );
  46  $Form->global_icon( T_('Cancel editing!'), 'close', regenerate_url( 'action' ) );
  47  
  48  $Form->begin_form( 'fform', $creating ?  T_('New currency') : T_('Currency') );
  49  
  50      $Form->add_crumb( 'currency' );
  51      $Form->hiddens_by_key( get_memorized( 'action'.( $creating ? ',curr_ID' : '' ) ) ); // (this allows to come back to the right list order & page)
  52  
  53      $Form->text_input( 'curr_code', $edited_Currency->code, 3, T_('Code'), '', array( 'maxlength'=> 3, 'required'=>true ) );
  54  
  55      $Form->text_input( 'curr_shortcut', $edited_Currency->shortcut, 8, T_('Shortcut'), '', array( 'maxlength'=> 8, 'required'=>true ) );
  56  
  57      $Form->text_input( 'curr_name', $edited_Currency->name, 40, T_('Name'), '', array( 'maxlength'=> 40, 'required'=>true ) );
  58  
  59  if( $creating )
  60  {
  61      $Form->end_form( array( array( 'submit', 'actionArray[create]', T_('Record'), 'SaveButton' ),
  62                                                      array( 'submit', 'actionArray[create_new]', T_('Record, then Create New'), 'SaveButton' ),
  63                                                      array( 'submit', 'actionArray[create_copy]', T_('Record, then Create Similar'), 'SaveButton' ),
  64                                                      array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
  65  }
  66  else
  67  {
  68      $Form->end_form( array( array( 'submit', 'actionArray[update]', T_('Update'), 'SaveButton' ),
  69                                                      array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
  70  }
  71  
  72  ?>

title

Description

title

Description

title

Description

title

title

Body