|
|
|
@ -65,6 +65,19 @@ function formulaires_editer_blocktype_saisies_dist($id_blocktype = 'new', $retou
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
if (count(array_filter(lire_config('blocks/objets', []))) > 1) {
|
|
|
|
|
$saisies[] = [
|
|
|
|
|
'saisie' => 'blocks_objets',
|
|
|
|
|
'options' => [
|
|
|
|
|
'nom' => 'objets',
|
|
|
|
|
'label' => _T('blocktype:champ_objets_label'),
|
|
|
|
|
'explication' => _T('blocktype:champ_objets_explication'),
|
|
|
|
|
'multiple' => 'oui',
|
|
|
|
|
],
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $saisies;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -114,7 +127,7 @@ function formulaires_editer_blocktype_identifier_dist($id_blocktype = 'new', $re
|
|
|
|
|
*/
|
|
|
|
|
function formulaires_editer_blocktype_charger_dist($id_blocktype = 'new', $retour = '', $lier_trad = 0, $config_fonc = '', $row = [], $hidden = '') {
|
|
|
|
|
$valeurs = formulaires_editer_objet_charger('blocktype', $id_blocktype, '', $lier_trad, $retour, $config_fonc, $row, $hidden);
|
|
|
|
|
|
|
|
|
|
$valeurs['objets'] = blocks_deserialize($valeurs['objets']);
|
|
|
|
|
$valeurs['saisies'] = call_user_func_array('formulaires_editer_blocktype_saisies_dist', func_get_args());
|
|
|
|
|
return $valeurs;
|
|
|
|
|
}
|
|
|
|
@ -171,6 +184,7 @@ function formulaires_editer_blocktype_verifier_dist($id_blocktype = 'new', $reto
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
function formulaires_editer_blocktype_traiter_dist($id_blocktype = 'new', $retour = '', $lier_trad = 0, $config_fonc = '', $row = [], $hidden = '') {
|
|
|
|
|
set_request('objets', blocks_serialize(_request('objets')));
|
|
|
|
|
$retours = formulaires_editer_objet_traiter('blocktype', $id_blocktype, '', $lier_trad, $retour, $config_fonc, $row, $hidden);
|
|
|
|
|
if (!(int)$id_blocktype) {
|
|
|
|
|
// en cas de création d'un type de block, rediriger vers la configuration des champs
|
|
|
|
|