[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
1 <?php 2 /** 3 * This file implements the UI view for the widgets params form. 4 * 5 * This file is part of the b2evolution/evocms project - {@link http://b2evolution.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 * @license http://b2evolution.net/about/license.html GNU General Public License (GPL) 11 * 12 * @package admin 13 * 14 * @version $Id: _widget.form.php,v 1.1 2007/06/25 11:01:59 fplanque Exp $ 15 */ 16 if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' ); 17 18 load_funcs('plugins/_plugin.funcs.php'); 19 20 /** 21 * @var ComponentWidget 22 */ 23 global $edited_ComponentWidget; 24 25 // Determine if we are creating or updating... 26 $creating = is_create_action( $action ); 27 28 $Form = & new Form( NULL, 'form' ); 29 30 $Form->global_icon( T_('Cancel editing!'), 'close', regenerate_url( 'action' ) ); 31 32 $Form->begin_form( 'fform', $creating ? T_('New widget') : T_('Widget') ); 33 34 $Form->hidden( 'action', $creating ? 'create' : 'update' ); 35 $Form->hidden( 'wi_ID', $edited_ComponentWidget->ID ); 36 $Form->hiddens_by_key( get_memorized( 'action' ) ); 37 38 $Form->begin_fieldset( T_('Properties') ); 39 40 $Form->info( T_('Widget type'), $edited_ComponentWidget->get_name() ); 41 42 $Form->info( T_('Description'), $edited_ComponentWidget->get_desc() ); 43 44 $Form->end_fieldset(); 45 46 47 $Form->begin_fieldset( T_('Params') ); 48 49 //$params = $edited_ComponentWidget->get_params(); 50 51 // Loop through all widget params: 52 foreach( $edited_ComponentWidget->get_param_definitions( $tmp_params = array('for_editing'=>true) ) as $l_name => $l_meta ) 53 { 54 // Display field: 55 autoform_display_field( $l_name, $l_meta, $Form, 'Widget', $edited_ComponentWidget ); 56 } 57 58 $Form->end_fieldset(); 59 60 61 if( $creating ) 62 { 63 $Form->end_form( array( array( 'submit', 'submit', T_('Record'), 'SaveButton' ), 64 array( 'reset', '', T_('Reset'), 'ResetButton' ) ) ); 65 } 66 else 67 { 68 $Form->end_form( array( array( 'submit', 'submit', T_('Update'), 'SaveButton' ), 69 array( 'reset', '', T_('Reset'), 'ResetButton' ) ) ); 70 } 71 72 73 /* 74 * $Log: _widget.form.php,v $ 75 * Revision 1.1 2007/06/25 11:01:59 fplanque 76 * MODULES (refactored MVC) 77 * 78 * Revision 1.2 2007/06/19 20:42:53 fplanque 79 * basic demo of widget params handled by autoform_* 80 * 81 * Revision 1.1 2007/06/19 00:03:26 fplanque 82 * doc / trying to make sense of automatic settings forms generation. 83 */ 84 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |