dolibarr 21.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 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
4 *
5* This program is free software; you can redistribute it and/or modify
6* it under the terms of the GNU General Public License as published by
7* the Free Software Foundation; either version 3 of the License, or
8* (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program. If not, see <https://www.gnu.org/licenses/>.
17*/
18
24require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
25
29class FormMailing extends Form
30{
34 public $errors = array();
35
36
46 public function selectDestinariesStatus($selectedid = '', $htmlname = 'dest_status', $show_empty = 0, $morecss = 'minwidth75')
47 {
48 global $langs;
49
50 $langs->load("mails");
51
52 require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php';
53 $mailing = new Mailing($this->db);
54
55 $options = array();
56
57 $options += $mailing->statut_dest;
58
59 // Note -1 is used for error, so we use -2 for tempty value
60 return Form::selectarray($htmlname, $options, $selectedid, ($show_empty ? -2 : 0), 0, 0, '', 1, 0, 0, '', $morecss);
61 }
62}
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.