b2evolution PHP Cross Reference Blogging Systems

Source: /inc/sessions/views/_goal.form.php - 66 lines - 2557 bytes - Text - Print

Description: This file implements the Goal form. b2evolution - {@link http://b2evolution.net/} Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}

   1  <?php
   2  /**
   3   * This file implements the Goal form.
   4   *
   5   * b2evolution - {@link http://b2evolution.net/}
   6   * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
   7   *
   8   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}
   9   *
  10   * @package admin
  11   *
  12   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  13   * @author fplanque: Francois PLANQUE.
  14   *
  15   * @version $Id: _goal.form.php 6136 2014-03-08 07:59:48Z manuel $
  16   */
  17  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  18  
  19  /**
  20   * @var Goal
  21   */
  22  global $edited_Goal;
  23  
  24  // Determine if we are creating or updating...
  25  global $action;
  26  $creating = is_create_action( $action );
  27  
  28  // These params need to be memorized and passed through regenerated urls: (this allows to come back to the right list order & page)
  29  param( 'results_goals_page', 'integer', '', true );
  30  param( 'results_goals_order', 'string', '', true );
  31  
  32  $Form = new Form( NULL, 'goal_checkchanges', 'post', 'compact' );
  33  
  34  if( ! $creating )
  35  {
  36      $Form->global_icon( T_('Delete this goal!'), 'delete', regenerate_url( 'action', 'action=delete' ) );
  37  }
  38  $Form->global_icon( T_('Cancel editing!'), 'close', regenerate_url( 'action' ) );
  39  
  40  $Form->begin_form( 'fform', $creating ?  T_('New goal') : T_('Goal') );
  41  
  42      $Form->add_crumb( 'goal' );
  43      $Form->hiddens_by_key( get_memorized( 'action'.( $creating ? ',goal_ID' : '' ) ) ); // (this allows to come back to the right list order & page)
  44  
  45      $Form->text_input( 'goal_name', $edited_Goal->name, 40, T_('Name'), '', array( 'maxlength'=> 50, 'required'=>true ) );
  46  
  47      $Form->text_input( 'goal_key', $edited_Goal->key, 32, T_('Key'), T_('Should be URL friendly'), array( 'required'=>true ) );
  48  
  49      $Form->text_input( 'goal_redir_url', $edited_Goal->redir_url, 60, T_('Redirection URL'), '', array( 'maxlength'=> 255, 'class'=>'large' ) );
  50  
  51      $Form->text_input( 'goal_default_value', $edited_Goal->default_value, 15, T_('Default value'), '' );
  52  
  53  if( $creating )
  54  {
  55      $Form->end_form( array( array( 'submit', 'actionArray[create]', T_('Record'), 'SaveButton' ),
  56                                                      array( 'submit', 'actionArray[create_new]', T_('Record, then Create New'), 'SaveButton' ),
  57                                                      array( 'submit', 'actionArray[create_copy]', T_('Record, then Create Similar'), 'SaveButton' ),
  58                                                      array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
  59  }
  60  else
  61  {
  62      $Form->end_form( array( array( 'submit', 'actionArray[update]', T_('Update'), 'SaveButton' ),
  63                                                      array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
  64  }
  65  
  66  ?>

title

Description

title

Description

title

Description

title

title

Body