65 lines
1.3 KiB
PHP
65 lines
1.3 KiB
PHP
<?php
|
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
|
return;
|
|
}
|
|
|
|
function inc_gamucontact_dist(){
|
|
$saisies = [
|
|
[
|
|
'saisie' => 'input',
|
|
'options' => [
|
|
'nom' => 'nom',
|
|
'label' => '<:gamucontact:votre_nom:>',
|
|
'obligatoire' => 'oui',
|
|
'class' => 'w100',
|
|
//'fonction' => 'ma_super_fonction'
|
|
]
|
|
],
|
|
[
|
|
'saisie' => 'input',
|
|
'options' => [
|
|
'nom' => 'email_contact',
|
|
'label' => '<:gamucontact:votre_email:>',
|
|
'class' => 'w100',
|
|
'obligatoire' => 'oui',
|
|
]
|
|
],
|
|
];
|
|
|
|
// intégrer ou pas le téléphone selon la config
|
|
$telephone_contact = lire_config('gamucontact/telephone_contact');
|
|
if ($telephone_contact === 'oui') {
|
|
$saisies[] = [
|
|
'saisie' => 'input',
|
|
'options' => [
|
|
'nom' => 'telephone',
|
|
'label' => '<:gamucontact:votre_telephone:>',
|
|
'obligatoire' => lire_config('gamucontact/telephone_obligatoire') === 'oui' ? 'oui' : 'non',
|
|
]
|
|
];
|
|
}
|
|
|
|
$saisies[] = [
|
|
'saisie' => 'input',
|
|
'options' => [
|
|
'nom' => 'objet',
|
|
'label' => '<:gamucontact:objet:>',
|
|
'obligatoire' => 'oui',
|
|
'class' => 'w100'
|
|
//'fonction' => 'ma_super_fonction'
|
|
]
|
|
];
|
|
$saisies[] = [
|
|
'saisie' => 'textarea',
|
|
'options' => [
|
|
'nom' => 'texte',
|
|
'label' => '<:gamucontact:message:>',
|
|
'obligatoire' => 'oui',
|
|
'class' => 'w100',
|
|
'rows' => 4
|
|
//'fonction' => 'ma_super_fonction'
|
|
]
|
|
];
|
|
|
|
return $saisies;
|
|
}
|