Commit 959734c8 authored by Mindiell's avatar Mindiell

Conversion to Drupal 7

parent 285155e5
; $Id$
name = "Modifie le champ corps des citations" name = "Modifie le champ corps des citations"
description = Modifie le champ corps des citations description = Modifie le champ corps des citations
core = 6.x core = 7.x
package = "La Quadrature" package = "La Quadrature"
<?php <?php
/**
* @file
* lqdn_citations module.
*
* @ingroup lqdn
*/
/**
* Implements hook_form_alter().
*
* Modifie le corps du formulaire.
*/
function lqdn_citations_form_alter(&$form, &$form_state, $form_id) { function lqdn_citations_form_alter(&$form, &$form_state, $form_id) {
$texte_defaut_citations = <<<EOF $texte_defaut_citations = <<<EOF
<blockquote>« citation »</blockquote> <blockquote>« citation »</blockquote>
<b>Auteur[, Fonction]</b> - <i><a href="#">source</a>, le (jj mois aaaa). </i> <b>Auteur[, Fonction]</b> - <i><a href="#">source</a>, le (jj mois aaaa). </i>
EOF; EOF;
if($form_id == 'citations_node_form' && $form['nid']['#value']==NULL){
$form['body_field']['body']['#default_value'] = $texte_defaut_citations; if($form_id == 'citations_node_form' && $form['nid']['#value']==NULL){
} $form['body_field']['body']['#default_value'] = $texte_defaut_citations;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment