Commit f65baa0f authored by Aiguille's avatar Aiguille Committed by Skia
Browse files

fix empty news edition form

parent 69ebf400
...@@ -215,16 +215,6 @@ if ( $_REQUEST["page"] == "edit" && $can_edit ) ...@@ -215,16 +215,6 @@ if ( $_REQUEST["page"] == "edit" && $can_edit )
,$news->type); ,$news->type);
// Prévisualisation // Prévisualisation
if (isset($_REQUEST["preview"])) if (isset($_REQUEST["preview"]))
{
$frm->add_text_field("title", "Titre",$news->titre,true);
$frm->add_entity_select("id_asso", "Association concernée", $site->db, "asso",$news->id_asso,true);
$frm->add_entity_select("id_lieu", "Lieu", $site->db, "lieu",$news->id_lieu,true);
$frm->add_text_field("tags", "Tags",$news->get_tags());
$frm->add_text_area ("resume","Resume",$news->resume);
$frm->add_dokuwiki_toolbar('content');
$frm->add_text_area ("content", "Contenu",$news->contenu,80,10,true);
}
else
{ {
$frm->add_text_field("title", "Titre de la nouvelle", $_REQUEST["title"], true); $frm->add_text_field("title", "Titre de la nouvelle", $_REQUEST["title"], true);
$frm->add_entity_select("id_asso", "Association concernée", $site->db, "asso",$_REQUEST["id_asso"],true); $frm->add_entity_select("id_asso", "Association concernée", $site->db, "asso",$_REQUEST["id_asso"],true);
...@@ -234,6 +224,16 @@ if ( $_REQUEST["page"] == "edit" && $can_edit ) ...@@ -234,6 +224,16 @@ if ( $_REQUEST["page"] == "edit" && $can_edit )
$frm->add_dokuwiki_toolbar('content'); $frm->add_dokuwiki_toolbar('content');
$frm->add_text_area ("content", "Contenu",$_REQUEST["content"],80,10,true); $frm->add_text_area ("content", "Contenu",$_REQUEST["content"],80,10,true);
} }
else
{
$frm->add_text_field("title", "Titre",$news->titre,true);
$frm->add_entity_select("id_asso", "Association concernée", $site->db, "asso",$news->id_asso,true);
$frm->add_entity_select("id_lieu", "Lieu", $site->db, "lieu",$news->id_lieu,true);
$frm->add_text_field("tags", "Tags",$news->get_tags());
$frm->add_text_area ("resume","Resume",$news->resume);
$frm->add_dokuwiki_toolbar('content');
$frm->add_text_area ("content", "Contenu",$news->contenu,80,10,true);
}
if( $site->user->is_in_group("moderateur_site") ) if( $site->user->is_in_group("moderateur_site") )
$frm->add_checkbox("automodere", "<b>Auto-modération</b>", true); $frm->add_checkbox("automodere", "<b>Auto-modération</b>", true);
......
Supports Markdown
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