dolibarr  7.0.0-beta
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 <http://www.gnu.org/licenses/>.
16 */
17 
23 require_once DOL_DOCUMENT_ROOT .'/core/class/html.form.class.php';
24 
28 class FormMailing extends Form
29 {
30  public $errors=array();
31 
40  public function selectDestinariesStatus($selectedid='',$htmlname='dest_status', $show_empty=0) {
41 
42  global $langs;
43  $langs->load("mails");
44 
45  require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php';
46  $mailing = new Mailing($this->db);
47 
48  $options = array();
49 
50  if ($show_empty) {
51  $options[-2] = ''; // Note -1 is used for error
52  }
53 
54  $options = $options + $mailing->statut_dest;
55 
56  return Form::selectarray($htmlname, $options, $selectedid, 0, 0, 0, '', 1);
57  }
58 }
Class to offer components to list and upload files.
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='', $addjscombo=0, $moreparamonempty='', $disablebademail=0, $nohtmlescape=0)
Return a HTML select string, built from an array of key+value.
Class to manage generation of HTML components Only common components must be here.
selectDestinariesStatus($selectedid='', $htmlname='dest_status', $show_empty=0)
Output a select with destinaries status.
Class to manage emailings module.