Commit 088d6192 authored by Loïc DAYOT's avatar Loïc DAYOT
Browse files

fix(): allow only preview when editing new localgroup

add previewEnable and submitEnable parameters in edit function
parent e7140ca2
......@@ -212,7 +212,7 @@ switch ($op) // display
{
echo "<h3>Édition d'un nouveau {$adl_localgroup}</h3>";
$localgroup = new localgroup($db, 0);
echo $localgroup->formHtml(false);
echo $localgroup->formHtml(false, true, false);
break;
}
......@@ -220,18 +220,23 @@ switch ($op) // display
{
$localgroup = new localgroup($db, $localgroup_id);
echo "<h3>Édition d'après un {$adl_localgroup} existant</h3>";
echo $localgroup->formHtml(true);
echo $localgroup->formHtml(true, true, false);
break;
}
case 'edit' :
{
// TODO : accept edit with secret code
$user->identify();
$localgroup = new localgroup($db, $localgroup_id);
echo "<h3>Édition</h3>";
echo $localgroup->formHtml(false, true, false);
break;
}
case 'edit2' :
{
echo "<h3>Édition</h3>";
echo $localgroup->formHtml(false);
echo $localgroup->formHtml(false, true, true);
break;
}
......
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