Add headers to th cells when editing vote

This commit is contained in:
Olivier PEREZ 2014-12-17 13:39:12 +01:00
parent 7837c01ba0
commit fcc478bb93
2 changed files with 8 additions and 2 deletions

View file

@ -48,7 +48,10 @@ if (!$poll) {
exit;
}
// -------------------------------
// A vote is going to be edited
// -------------------------------
if (!empty($_POST['edit_vote'])) {
// TODO Try what does filter_input with a wrong value
$editingVoteId = filter_input(INPUT_POST, 'edit_vote', FILTER_VALIDATE_INT);
@ -57,7 +60,10 @@ if (!empty($_POST['edit_vote'])) {
}
// -------------------------------
// Something to save (edit or add)
// -------------------------------
if (!empty($_POST['save'])) { // Save edition of an old vote
$editedVote = filter_input(INPUT_POST, 'save', FILTER_VALIDATE_INT);
$choices = $inputService->filterArray($_POST['choices'], FILTER_VALIDATE_REGEXP, ['options'=>['regexp'=>'/^[012]$/']]);