dolibarr 21.0.0-alpha
html.formmailing.class.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2014 Florian Henry florian.henry@open-concept.pro
3 *
4* This program is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License as published by
6* the Free Software Foundation; either version 3 of the License, or
7* (at your option) any later version.
8*
9* This program is distributed in the hope that it will be useful,
10* but WITHOUT ANY WARRANTY; without even the implied warranty of
11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12* GNU General Public License for more details.
13*
14* You should have received a copy of the GNU General Public License
15* along with this program. If not, see <https://www.gnu.org/licenses/>.
16*/
17
23require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
24
28class FormMailing extends Form
29{
33 public $errors = array();
34
35
45 public function selectDestinariesStatus($selectedid = '', $htmlname = 'dest_status', $show_empty = 0, $morecss = 'minwidth75')
46 {
47 global $langs;
48
49 $langs->load("mails");
50
51 require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php';
52 $mailing = new Mailing($this->db);
53
54 $options = array();
55
56 $options = $options + $mailing->statut_dest;
57
58 // Note -1 is used for error, so we use -2 for tempty value
59 return Form::selectarray($htmlname, $options, $selectedid, ($show_empty ? -2 : 0), 0, 0, '', 1, 0, 0, '', $morecss);
60 }
61}
Class to manage generation of HTML components Only common components must be here.
static selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='minwidth75', $addjscombo=1, $moreparamonempty='', $disablebademail=0, $nohtmlescape=0)
Return a HTML select string, built from an array of key+value.
Class to offer components to list and upload files.
selectDestinariesStatus($selectedid='', $htmlname='dest_status', $show_empty=0, $morecss='minwidth75')
Output a select with destinaries status.
Class to manage emailings module.