gamuContact/gamucontact_options.php
2021-03-12 16:17:19 +01:00

69 lines
1.4 KiB
PHP

<?php
/**
* Options au chargement du plugin Gamu Contact
*
* @plugin Gamu Contact
* @copyright 2021
* @author tofulm
* @licence GNU/GPL
* @package SPIP\Gamucontact\Options
*/
if (!defined('_ECRIRE_INC_VERSION')) {
return;
}
$GLOBALS['formulaires_no_spam'][] = 'gamucontact';
$GLOBALS['gamucontact'] = [
[
'saisie' => 'input',
'options' => array(
'nom' => 'nom',
'label' => 'Votre Nom',
'obligatoire' => 'oui',
//'fonction' => 'ma_super_fonction'
)
],
[
'saisie' => 'input',
'options' => array(
'nom' => 'email_contact',
'label' => 'Votre Email',
'obligatoire' => 'oui',
)
],
[
'saisie' => 'input',
'options' => array(
'nom' => 'objet',
'label' => 'Objet',
'obligatoire' => 'oui',
'class' => 'w100'
//'fonction' => 'ma_super_fonction'
)
],
[
'saisie' => 'textarea',
'options' => array(
'nom' => 'texte',
'label' => 'Message',
'obligatoire' => 'oui',
'class' => 'w100',
'rows' => 4
//'fonction' => 'ma_super_fonction'
)
],
];
function gamucontact_declarer_tables_objets_sql($tables) {
$tables['spip_messages']['field']['telephone'] = "varchar(55) NOT NULL";
$tables['spip_messages']['field']['nom'] = "varchar(255) NOT NULL";
$tables['spip_messages']['field']['objet'] = "varchar(255) NOT NULL";
$tables['spip_messages']['field']['email_contact'] = "varchar(255) NOT NULL";
return $tables;
}