Commit b58dc558 authored by Loïc DAYOT's avatar Loïc DAYOT Committed by Ploc
Browse files

style(): event edit form same when edit or create

Event edit form looks identical when editing or creating.
Webpage title in variable.

bug fix #52
parent 77e5f361
<?php
/*
* Copyright 2008-2016
* Copyright 2008-2017
* - Thomas Petazzoni <thomas POINT petazzoni CHEZ enix POINT org>
* - Loic Dayot <ldayot CHEZ epnadmin POINT net>
*
......@@ -81,6 +81,8 @@ function updateEvent($user, $newEvent, $oldEvent)
$id = get_safe_integer('id', 0);
$secret = get_safe_hash('secret', false);
$thisTitle = "Édition d'un évènement";
// Get fields and store in $event object
if (isset($_POST['__event_save']) || isset($_POST['__event_preview']))
{
......@@ -94,7 +96,7 @@ if (isset($_POST['__event_save']) || isset($_POST['__event_preview']))
$event = new event($db, $id);
if ($event->error)
{
put_header("édition d'un évènement");
put_header($thisTitle);
error($event->message);
put_footer();
exit;
......@@ -110,7 +112,7 @@ else
{
if ($event->secret != $secret)
{
put_header("Édition d'un évènement");
put_header($thisTitle);
error("Hash d'identification non reconnu");
put_footer();
exit;
......@@ -124,7 +126,7 @@ if (isset($_POST['__event_save']) && $ret)
if ($returnaddr === false)
{
put_header("édition d'un évènement");
put_header($thisTitle);
error ("Problème lors de la sauvegarde de l'évènement <i>".
$_POST['__event_title'] . "</i>");
}
......@@ -142,7 +144,7 @@ if (isset($_POST['__event_save']) && $ret)
exit;
} // end if
put_header("édition d'un évènement");
put_header($thisTitle);
if (isset($message) && $message!="") echo $message;
......@@ -173,7 +175,7 @@ echo ($user ? "<a href=\"moderation.php\">Modération</a>&nbsp;" : "").
"&gt;&gt;&gt;&nbsp;&Eacute;dition de l'évènement";
echo "</p>";
echo '<div class="moderationbox">';
//echo '<div class="moderationbox">';
$posturl = "?id=" . $id. ($user ? "" : "&secret=" . $secret);
......@@ -181,7 +183,7 @@ if (isset($updatedEvent))
$updatedEvent->edit($_preview=true, $_valid=true, $posturl);
else
$event->edit($_preview=true, $_valid=true, $posturl);
echo '</div>';
//echo '</div>';
put_footer();
......
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