Skip to content

Commit

Permalink
Merge branch 'develop' of git://github.com/Dolibarr/dolibarr.git into…
Browse files Browse the repository at this point in the history
… develop
  • Loading branch information
simnandez committed Jan 27, 2012
2 parents ef36433 + ec0650e commit 029b837
Show file tree
Hide file tree
Showing 15 changed files with 287 additions and 236 deletions.
42 changes: 22 additions & 20 deletions htdocs/core/class/html.formactions.class.php
@@ -1,5 +1,5 @@
<?php
/* Copyright (c) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (c) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
*
Expand All @@ -25,8 +25,7 @@


/**
* \class FormActions
* \brief Class to manage building of HTML components
* Class to manage building of HTML components
*/
class FormActions
{
Expand All @@ -37,23 +36,23 @@ class FormActions
/**
* Constructor
*
* @param DoliDB $DB Database handler
* @param DoliDB $db Database handler
*/
function FormActions($DB)
function FormActions($db)
{
$this->db = $DB;

$this->db = $db;
return 1;
}


/**
* Show list of action status
* Show list of action status
*
* @param formname Name of form where select in included
* @param selected Preselected value
* @param canedit 1=can edit, 0=read only
* @param htmlname Name of html prefix for html fields (selectX and valX)
* @param string $formname Name of form where select in included
* @param string $selected Preselected value
* @param int $canedit 1=can edit, 0=read only
* @param string $htmlname Name of html prefix for html fields (selectX and valX)
* @return void
*/
function form_select_status_action($formname,$selected,$canedit=1,$htmlname='complete')
{
Expand Down Expand Up @@ -101,11 +100,12 @@ function form_select_status_action($formname,$selected,$canedit=1,$htmlname='com


/**
* Show list of actions for element
* @param object Object
* @param typeelement 'invoice','propal','order','invoice_supplier','order_supplier','fichinter'
* @param socid socid of user
* @return int <0 if KO, >=0 if OK
* Show list of actions for element
*
* @param Object $object Object
* @param string $typeelement 'invoice','propal','order','invoice_supplier','order_supplier','fichinter'
* @param int $socid socid of user
* @return int <0 if KO, >=0 if OK
*/
function showactions($object,$typeelement,$socid=0)
{
Expand Down Expand Up @@ -159,9 +159,11 @@ function showactions($object,$typeelement,$socid=0)


/**
* Output list of type of event
* @param selected Type pre-selectionne
* @param htmlname Nom champ formulaire
* Output list of type of event
*
* @param string $selected Type pre-selectionne
* @param string $htmlname Nom champ formulaire
* @return void
*/
function select_type_actions($selected='',$htmlname='actioncode')
{
Expand Down
8 changes: 3 additions & 5 deletions htdocs/core/class/html.formadmin.class.php
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
*
Expand All @@ -25,8 +25,7 @@


/**
* \class FormAdmin
* \brief Class to generate html code for admin pages
* Class to generate html code for admin pages
*/
class FormAdmin
{
Expand All @@ -42,7 +41,6 @@ class FormAdmin
function FormAdmin($db)
{
$this->db = $db;

return 1;
}

Expand Down Expand Up @@ -279,7 +277,7 @@ function select_menu_families($selected, $htmlname, $dirmenuarray)


/**
* Retourne la liste deroulante des menus disponibles (eldy)
* Return a HTML select list of timezones
*
* @param string $selected Menu pre-selectionnee
* @param string $htmlname Nom de la zone select
Expand Down
6 changes: 2 additions & 4 deletions htdocs/core/class/html.formbarcode.class.php
@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2007-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -24,8 +24,7 @@


/**
* \class Form
* \brief Classe permettant la generation de composants html
* Class to manage barcode HTML
*/
class FormBarCode
{
Expand All @@ -41,7 +40,6 @@ class FormBarCode
function FormBarCode($db)
{
$this->db = $db;

return 1;
}

Expand Down
7 changes: 3 additions & 4 deletions htdocs/core/class/html.formcompany.class.php
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -23,9 +23,8 @@


/**
* \class FormCompany
* \brief Class to build HTML component for third parties management
* \remarks Only common components must be here.
* Class to build HTML component for third parties management
* Only common components are here.
*/
class FormCompany
{
Expand Down
3 changes: 1 addition & 2 deletions htdocs/core/class/html.formfile.class.php
Expand Up @@ -25,8 +25,7 @@


/**
* \class FormFile
* \brief Class to offer components to list and upload files
* Class to offer components to list and upload files
*/
class FormFile
{
Expand Down
37 changes: 22 additions & 15 deletions htdocs/core/class/html.formmail.class.php
@@ -1,5 +1,5 @@
<?PHP
/* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
*
Expand All @@ -25,11 +25,11 @@
require_once(DOL_DOCUMENT_ROOT ."/core/class/html.form.class.php");


/** \class FormMail
* \brief Classe permettant la generation du formulaire html d'envoi de mail unitaire
* \remarks Utilisation: $formail = new FormMail($db)
* \remarks $formmail->proprietes=1 ou chaine ou tableau de valeurs
* \remarks $formmail->show_form() affiche le formulaire
/**
* Classe permettant la generation du formulaire html d'envoi de mail unitaire
* Usage: $formail = new FormMail($db)
* $formmail->proprietes=1 ou chaine ou tableau de valeurs
* $formmail->show_form() affiche le formulaire
*/
class FormMail
{
Expand Down Expand Up @@ -69,12 +69,13 @@ class FormMail


/**
* \brief Constructeur
* \param DB handler d'acces base de donnee
* Constructor
*
* @param DoliDB $DB Database handler
*/
function FormMail($DB)
function FormMail($db)
{
$this->db = $DB;
$this->db = $db;

$this->withform=1;

Expand Down Expand Up @@ -103,6 +104,8 @@ function FormMail($DB)

/**
* Clear list of attached files in send mail form (stored in session)
*
* @return void
*/
function clear_attached_files()
{
Expand All @@ -125,6 +128,7 @@ function clear_attached_files()
* @param string $path Full absolute path on filesystem of file, including file name
* @param string $file Only filename
* @param string $type Mime type
* @return void
*/
function add_attached_files($path,$file,$type)
{
Expand All @@ -148,7 +152,8 @@ function add_attached_files($path,$file,$type)
/**
* Remove a file from the list of attached files (stored in SECTION array)
*
* @param $keytodelete Key in file array
* @param string $keytodelete Key in file array
* @return void
*/
function remove_attached_files($keytodelete)
{
Expand Down Expand Up @@ -190,8 +195,9 @@ function get_attached_files()
* Show the form to input an email
* this->withfile: 0=No attaches files, 1=Show attached files, 2=Can add new attached files
*
* @param addfileaction Name of action when posting file attachments
* @param removefileaction Name of action when removing file attachments
* @param string $addfileaction Name of action when posting file attachments
* @param string $removefileaction Name of action when removing file attachments
* @return void
*/
function show_form($addfileaction='addfile',$removefileaction='removefile')
{
Expand All @@ -202,8 +208,9 @@ function show_form($addfileaction='addfile',$removefileaction='removefile')
* Get the form to input an email
* this->withfile: 0=No attaches files, 1=Show attached files, 2=Can add new attached files
*
* @param addfileaction Name of action when posting file attachments
* @param removefileaction Name of action when removing file attachments
* @param string $addfileaction Name of action when posting file attachments
* @param string $removefileaction Name of action when removing file attachments
* @return string Form to show
*/
function get_form($addfileaction='addfile',$removefileaction='removefile')
{
Expand Down
35 changes: 19 additions & 16 deletions htdocs/core/class/html.formorder.class.php
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -23,9 +23,8 @@


/**
* \class FormOrder
* \brief Classe permettant la generation de composants html
* \remarks Only common components must be here.
* Classe permettant la generation de composants html
* Only common components are here.
*/
class FormOrder
{
Expand All @@ -35,24 +34,24 @@ class FormOrder


/**
* \brief Constructeur
* \param DB handler d'acces base de donnee
* Constructor
*
* @param DoliDB $db Database handler
*/
function FormOrder($DB)
function FormOrder($db)
{
$this->db = $DB;

$this->db = $db;
return 1;
}


/**
* Renvoie la liste des sources de commandes
* Return list of way to order
*
* @param selected Id de la source pre-selectionnee
* @param htmlname Nom de la liste deroulante
* @param addempty 0=liste sans valeur nulle, 1=ajoute valeur inconnue
* @return array Tableau des sources de commandes
* @param string $selected Id of preselected order origin
* @param string $htmlname Name of HTML select list
* @param int $addempty 0=liste sans valeur nulle, 1=ajoute valeur inconnue
* @return array Tableau des sources de commandes
*/
function selectSourcesCommande($selected='',$htmlname='source_id',$addempty=0)
{
Expand All @@ -74,8 +73,12 @@ function selectSourcesCommande($selected='',$htmlname='source_id',$addempty=0)


/**
* Return list of way to order
*
*
* @param string $selected Id of preselected input method
* @param string $htmlname Name of HTML select list
* @param int $addempty 0=liste sans valeur nulle, 1=ajoute valeur inconnue
* @return array Tableau des sources de commandes
*/
function select_methodes_commande($selected='',$htmlname='source_id',$addempty=0)
{
Expand All @@ -89,7 +92,7 @@ function select_methodes_commande($selected='',$htmlname='source_id',$addempty=0
$sql.= " FROM ".MAIN_DB_PREFIX."c_input_method";
$sql.= " WHERE active = 1";

dol_syslog("Form::select_methodes_commande sql=".$sql);
dol_syslog(get_class($this)."::select_methodes_commande sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
Expand Down

0 comments on commit 029b837

Please sign in to comment.