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