Complete the change of name for XmlFormField classes.
This commit is contained in:
David Callizaya
2017-08-14 15:53:48 -04:00
parent 21ba72af7f
commit 3b53ef4d9c
25 changed files with 195 additions and 384 deletions

View File

@@ -54,7 +54,7 @@ if (! is_file( XMLFORM_AJAX_PATH . $xmlFile )) {
}
}
$G_FORM = new form( $xmlFile, $sPath );
$G_FORM = new Form( $xmlFile, $sPath );
$G_FORM->id = urlDecode( $_POST['form'] );
$G_FORM->values = isset( $_SESSION[$G_FORM->id] ) ? $_SESSION[$G_FORM->id] : array ();

View File

@@ -32,7 +32,7 @@
*
*/
class filterForm extends form
class filterForm extends Form
{
public $cols = 3;
public $type = 'filterform';

View File

@@ -1,34 +1,8 @@
<?php
/**
* class.database_base.php
*
* @package gulliver.system
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/**
* Class Form
*
* @author David S. Callizaya S. <davidsantos@colosa.com>
* @package gulliver.system
* @access public
*/
@@ -57,7 +31,6 @@ class Form extends XmlForm
/**
* Function setDefaultValues
*
* @author David S. Callizaya S. <davidsantos@colosa.com>
* @access public
* @return string
*/
@@ -109,7 +82,6 @@ class Form extends XmlForm
/**
* Function Form
*
* @author David S. Callizaya S. <davidsantos@colosa.com>
* @access public
* @param string filename
* @param string home
@@ -118,7 +90,7 @@ class Form extends XmlForm
* @param string $visual_frontend
* @return string
*/
public function Form ($filename, $home = '', $language = '', $forceParse = false, $visual_frontend = null)
public function __construct ($filename, $home = '', $language = '', $forceParse = false, $visual_frontend = null)
{
$this->visual_frontend = $visual_frontend;
if ($language === '') {
@@ -218,7 +190,7 @@ class Form extends XmlForm
$values = $this->values;
$aValuekeys = array_keys( $values );
if (isset( $aValuekeys[0] ) && ((int) $aValuekeys[0] == 1)) {
$values = XmlForm_Field_Grid::flipValues( $values );
$values = XmlFormFieldGrid::flipValues( $values );
}
//TODO: Review when $values of a grid has only one row it is converted as a $values for a list (when template="grid" at addContent())
if (is_array( reset( $values ) )) {

View File

@@ -1,38 +1,12 @@
<?php
/**
* class.htmlArea.php
*
* @package gulliver.system
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/**
*
* @package gulliver.system
*
*/
class XmlForm_Field_HTML extends XmlForm_Field_Textarea
class XmlFormFieldHTML extends XmlFormFieldTextarea
{
/* //'default','office2003','silver'
var $skin = 'default';

View File

@@ -90,7 +90,7 @@ class pagedTable
public $name = 'pagedTable';
public $id = 'A1';
public $disableFooter = false;
//This attribute is used to set STYLES to groups of TD, using the field type "cellMark" (see XmlForm_Field_cellMark)
//This attribute is used to set STYLES to groups of TD, using the field type "cellMark" (see XmlFormFieldCellMark)
public $tdStyle = '';
public $tdClass = '';
//Config Save definition

View File

@@ -192,7 +192,7 @@ class Publisher
if (($this->publishType == 'dynaform') && (($Part['Template'] == 'xmlform') || ($Part['Template'] == 'xmlform_preview'))) {
$dynaformShow = (isset( $G_FORM->printdynaform ) && ($G_FORM->printdynaform)) ? 'gulliver/dynaforms_OptionsPrint' : 'gulliver/dynaforms_Options';
$G_FORM->fields = G::array_merges( array ('__DYNAFORM_OPTIONS' => new XmlForm_Field_XmlMenu( new Xml_Node( '__DYNAFORM_OPTIONS', 'complete', '', array ('type' => 'xmlmenu','xmlfile' => $dynaformShow, 'parentFormId' => $G_FORM->id
$G_FORM->fields = G::array_merges( array ('__DYNAFORM_OPTIONS' => new XmlFormFieldXmlMenu( new Xml_Node( '__DYNAFORM_OPTIONS', 'complete', '', array ('type' => 'xmlmenu','xmlfile' => $dynaformShow, 'parentFormId' => $G_FORM->id
) ), SYS_LANG, PATH_XMLFORM, $G_FORM )
), $G_FORM->fields );
}
@@ -369,7 +369,7 @@ class Publisher
default:
$label = ($oTable->fields[$f]['Label'] != '') ? $oTable->fields[$f]['Label'] : $f;
$label = str_replace( "\n", ' ', $label );
$pm->fields[$f] = new XmlForm_Field_PopupOption( new Xml_Node( $f, 'complete', '', array ('label' => $label,'type' => 'popupOption','launch' => $oTable->id . '.showHideField("' . $f . '")' ) ) );
$pm->fields[$f] = new XmlFormFieldPopupOption( new Xml_Node( $f, 'complete', '', array ('label' => $label,'type' => 'popupOption','launch' => $oTable->id . '.showHideField("' . $f . '")' ) ) );
$pm->values[$f] = '';
}
}

View File

@@ -26,7 +26,7 @@
*/
/**
* XmlForm_Field_HTML class definition
* XmlFormFieldWYSIWYGEditor class definition
* It is useful to see dynaforms how are built
*
* @package gulliver.system
@@ -36,7 +36,7 @@
*
*/
class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
class XmlFormFieldWYSIWYGEditor extends XmlFormField
{
public $width = '100%';
public $height = '300';

View File

@@ -30,21 +30,21 @@
*
* @package gulliver.system
*/
class xmlMenu extends form
class xmlMenu extends Form
{
public $type = 'xmlmenu';
public $parentFormId;
}
/**
* XmlForm_Field_XmlMenu
* XmlFormFieldXmlMenu
*
* extends XmlForm_Field
* extends XmlFormField
*
* @package gulliver.system
*
*/
class XmlForm_Field_XmlMenu extends XmlForm_Field
class XmlFormFieldXmlMenu extends XmlFormField
{
public $xmlfile = '';
public $type = 'xmlmenuDyn';
@@ -54,7 +54,7 @@ class XmlForm_Field_XmlMenu extends XmlForm_Field
public $parentFormId;
/**
* XmlForm_Field_XmlMenu
* XmlFormFieldXmlMenu
*
* @param string $xmlNode
* @param string $lang default value 'en'
@@ -63,9 +63,9 @@ class XmlForm_Field_XmlMenu extends XmlForm_Field
*
* @return none
*/
public function XmlForm_Field_XmlMenu ($xmlNode, $lang = 'en', $home = '', $owner = null)
public function XmlFormFieldXmlMenu ($xmlNode, $lang = 'en', $home = '', $owner = null)
{
parent::XmlForm_Field( $xmlNode, $lang, $home, $owner );
parent::__construct( $xmlNode, $lang, $home, $owner );
$this->home = $home;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,36 +1,10 @@
<?php
/**
* class.xmlformExtension.php
*
* @package gulliver.system
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/**
*
* @package gulliver.system
*/
class XmlForm_Field_Label extends XmlForm_Field
class XmlFormFieldLabel extends XmlFormField
{
public $withoutValue = true;
public $align = 'left';
@@ -43,7 +17,7 @@ class XmlForm_Field_Label extends XmlForm_Field
*
* @package gulliver.system
*/
class XmlForm_Field_cellMark extends XmlForm_Field
class XmlFormFieldCellMark extends XmlFormField
{
/* Defines the style of the next tds
of the pagedTable.
@@ -91,14 +65,14 @@ class XmlForm_Field_cellMark extends XmlForm_Field
}
/**
* XmlForm_Field_DVEditor
* XmlFormFieldDVEditor
*
* extends XmlForm_Field
* extends XmlFormField
*
* @package gulliver.system
*
*/
class XmlForm_Field_DVEditor extends XmlForm_Field
class XmlFormFieldDVEditor extends XmlFormField
{
public $toolbarSet = 'toolbar2lines.html';
public $width = '90%';
@@ -150,7 +124,7 @@ class XmlForm_Field_DVEditor extends XmlForm_Field
*
* @package gulliver.system
*/
class XmlForm_Field_FastSearch extends XmlForm_Field_Text
class XmlFormFieldFastSearch extends XmlFormFieldText
{
public $onkeypress = "if (event.keyCode===13)@#PAGED_TABLE_ID.doFastSearch(this.value);if (event.keyCode===13)return false;";
public $colAlign = "right";

View File

@@ -82,7 +82,7 @@ class PmBootstrap extends Bootstrap
$this->autoloader->registerClass('publisher', PATH_GULLIVER . 'class.publisher');
$this->autoloader->registerClass('templatePower', PATH_GULLIVER . 'class.templatePower');
$this->autoloader->registerClass('xmlDocument', PATH_GULLIVER . 'class.xmlDocument');
$this->autoloader->registerClass('XmlForm_Field_XmlMenu', PATH_GULLIVER . 'class.xmlMenu');
$this->autoloader->registerClass('XmlFormFieldXmlMenu', PATH_GULLIVER . 'class.xmlMenu');
$this->autoloader->registerClass('xmlform', PATH_GULLIVER . 'class.xmlform');
$this->autoloader->registerClass('xmlformExtension', PATH_GULLIVER . 'class.xmlformExtension');
@@ -96,7 +96,7 @@ class PmBootstrap extends Bootstrap
$this->autoloader->registerClass('headPublisher', PATH_GULLIVER . 'class.headPublisher');
$this->autoloader->registerClass('Xml_Node', PATH_GULLIVER . 'class.xmlDocument');
$this->autoloader->registerClass('Xml_document', PATH_GULLIVER . 'class.xmlDocument');
$this->autoloader->registerClass('XmlForm_Field_*', PATH_GULLIVER . 'class.xmlform');
$this->autoloader->registerClass('XmlFormField*', PATH_GULLIVER . 'class.xmlform');
$this->autoloader->registerClass('ServerConf', PATH_CORE . 'classes/class.serverConfiguration');
}

View File

@@ -117,7 +117,7 @@
$form = new Form($fileTmp, PATH_DYNAFORM, SYS_LANG, true);
//Navigation Bar
$form->fields = G::array_merges(array("__DYNAFORM_OPTIONS" => new XmlForm_Field_XmlMenu(new Xml_Node("__DYNAFORM_OPTIONS", "complete", "", array("type" => "xmlmenu", "xmlfile" => "gulliver/dynaforms_Options"
$form->fields = G::array_merges(array("__DYNAFORM_OPTIONS" => new XmlFormFieldXmlMenu(new Xml_Node("__DYNAFORM_OPTIONS", "complete", "", array("type" => "xmlmenu", "xmlfile" => "gulliver/dynaforms_Options"
)), SYS_LANG, PATH_XMLFORM, $form)
), $form->fields);
@@ -187,7 +187,7 @@
$form = new Form($fileTmp, PATH_DYNAFORM, SYS_LANG, true);
//Navigation Bar
$form->fields = G::array_merges(array("__DYNAFORM_OPTIONS" => new XmlForm_Field_XmlMenu(new Xml_Node("__DYNAFORM_OPTIONS", "complete", "", array("type" => "xmlmenu", "xmlfile" => "gulliver/dynaforms_Options"
$form->fields = G::array_merges(array("__DYNAFORM_OPTIONS" => new XmlFormFieldXmlMenu(new Xml_Node("__DYNAFORM_OPTIONS", "complete", "", array("type" => "xmlmenu", "xmlfile" => "gulliver/dynaforms_Options"
)), SYS_LANG, PATH_XMLFORM, $form)
), $form->fields);

View File

@@ -8,7 +8,7 @@
* @package workflow.engine.ProcessMaker
* @copyright COLOSA
*/
class PopupMenu extends form
class PopupMenu extends Form
{
var $type = 'PopupMenu';
var $theme = 'processmaker';
@@ -37,7 +37,7 @@ class PopupMenu extends form
$label = str_replace( "\n", ' ', $label );
$pmXmlNode = new Xml_Node( $f, 'complete', '', array ('label' => $label,'type' => 'popupOption','launch' => $tableId . '.showHideField("' . $f . '")'
) );
$this->fields[$f] = new XmlForm_Field_PopupOption( $pmXmlNode );
$this->fields[$f] = new XmlFormFieldPopupOption( $pmXmlNode );
$this->values[$f] = '';
}
}

View File

@@ -75,7 +75,7 @@ class PropelTable
public $name = 'pagedTable';
public $id = 'A1';
public $disableFooter = false;
//This attribute is used to set STYLES to groups of TD, using the field type "cellMark" (see XmlForm_Field_cellMark)
//This attribute is used to set STYLES to groups of TD, using the field type "cellMark" (see XmlFormFieldCellMark)
public $tdStyle = '';
public $tdClass = '';
//Config Save definition

View File

@@ -1,6 +1,6 @@
<?php
class ToolBar extends form
class ToolBar extends Form
{
public $type = 'toolbar';
public $align = 'left';

View File

@@ -1,10 +1,10 @@
<?php
/**
* Class XmlForm_Field_hours
* Class XmlFormFieldHours
*
*/
class XmlForm_Field_Hours extends XmlForm_Field_SimpleText
class XmlFormFieldHours extends XmlFormFieldSimpleText
{
public $size = 15;
public $maxLength = 64;

View File

@@ -1,11 +1,11 @@
<?php
/**
* XmlForm_Field_popupOption - XmlForm_Field_popupOption class
* XmlFormFieldpopupOption - XmlFormFieldPopupOption class
*
* @package workflow.engine.ProcessMaker
*/
class XmlForm_Field_PopupOption extends XmlForm_Field
class XmlFormFieldPopupOption extends XmlFormField
{
public $launch = '';

View File

@@ -3,7 +3,7 @@
/**
* Class XmlFormFieldTextareaPm
*/
class XmlFormFieldTextAreaPm extends XmlForm_Field
class XmlFormFieldTextAreaPm extends XmlFormField
{
public $rows = 12;
public $cols = 40;

View File

@@ -1,6 +1,6 @@
<?php
class XmlFormFieldTextPm extends XmlForm_Field_SimpleText
class XmlFormFieldTextPm extends XmlFormFieldSimpleText
{
public $size = 15;
public $maxLength = 64;

View File

@@ -6,7 +6,7 @@
*
* @package workflow.engine.ProcessMaker
*/
class XmlFormFieldToolBar extends XmlForm_Field
class XmlFormFieldToolBar extends XmlFormField
{
public $xmlfile = '';
public $type = 'toolbar';
@@ -15,7 +15,7 @@ class XmlFormFieldToolBar extends XmlForm_Field
public $withoutLabel = true;
/**
* Constructor of the class XmlForm_Field_ToolBar
* Constructor of the class XmlFormFieldToolBar
*
* @param string $xmlNode
* @param string $lang
@@ -25,7 +25,7 @@ class XmlFormFieldToolBar extends XmlForm_Field
*/
public function XmlFormFieldToolBar($xmlNode, $lang = 'en', $home = '', $owner = ' ')
{
parent::XmlForm_Field($xmlNode, $lang, $home, $owner);
parent::__construct($xmlNode, $lang, $home, $owner);
$this->home = $home;
}

View File

@@ -6,7 +6,7 @@
*
* @package workflow.engine.ProcessMaker
*/
class XmlFormFieldToolButton extends XmlForm_Field
class XmlFormFieldToolButton extends XmlFormField
{
public $file = '';
public $fileAlt = '';

View File

@@ -1,10 +1,10 @@
<?php
/**
* Class XmlForm_Field_CheckBoxTable
* Class XmlFormFieldCheckBoxTable
*
*/
class XmlForm_Field_CheckBoxTable extends XmlForm_Field_Checkbox
class XmlFormFieldCheckBoxTable extends XmlFormFieldCheckbox
{
/**

View File

@@ -73,7 +73,7 @@ $formValues = (Bootstrap::json_decode( $_POST['fields'] ));
$sFieldName = $_POST['fieldName'];
$sMasterField = '';
$sPath = PATH_DYNAFORM;
$G_FORM = new form( $sDynUid, $sPath );
$G_FORM = new Form( $sDynUid, $sPath );
$aux = array ();
$newValues = Bootstrap::json_decode( urlDecode( stripslashes( $_POST['form'] ) ) );

View File

@@ -47,7 +47,7 @@ if (isset( $_SESSION['CURRENT_PAGE_INITILIZATION'] )) {
eval( $_SESSION['CURRENT_PAGE_INITILIZATION'] );
}
$G_FORM = new form( G::getUIDName( urlDecode( $_POST['form'] ) ) );
$G_FORM = new Form( G::getUIDName( urlDecode( $_POST['form'] ) ) );
$G_FORM->id = urlDecode( $_POST['form'] );
$G_FORM->values = $_SESSION[$G_FORM->id];

View File

@@ -25,7 +25,7 @@ try {
global $RBAC;
$RBAC->requirePermissions( 'PM_LOGIN' );
// deprecated the class XmlForm_Field_Image is currently part of the class.xmlform.php package
// deprecated the class XmlFormFieldImage is currently part of the class.xmlform.php package
// the use of the external xmlfield_Image is highly discouraged
unset( $_SESSION['CURRENT_USER'] );