Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Site
lqdn_citations
Commits
959734c8
Commit
959734c8
authored
Jun 29, 2015
by
Mindiell
Browse files
Conversion to Drupal 7
parent
285155e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
lqdn_citations.info
View file @
959734c8
;
$
Id
$
name
=
"Modifie le champ corps des citations"
description
=
Modifie
le
champ
corps
des
citations
core
=
6
.
x
core
=
7
.
x
package
=
"La Quadrature"
lqdn_citations.module
View file @
959734c8
<?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
)
{
$texte_defaut_citations
=
<<<EOF
$texte_defaut_citations
=
<<<EOF
<blockquote>« citation »</blockquote>
<b>Auteur[, Fonction]</b> - <i><a href="#">source</a>, le (jj mois aaaa). </i>
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
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment