Ejemplo n.º 1
0
function doFilesMenu()
{
    echo "<script>function confirmAction() { if (confirm(\"Voulez-vous vraiment réaliser cette opération ?\")) { document.file_operations_form.submit(); } }";
    echo "function onActionChange() {\n     selectedAction = document.getElementById(\"action\").options.selectedIndex;\n     if (selectedAction == 0) {\n     \tdocument.getElementById(\"dest_quiz_div\").style.display = \"none\";\n     \tdocument.getElementById(\"dest_folder_div\").style.display = \"block\";\n     } else if (selectedAction == 1) {\n        document.getElementById(\"dest_quiz_div\").style.display = \"block\";\n     \tdocument.getElementById(\"dest_folder_div\").style.display = \"block\";   \n     } else {\n        document.getElementById(\"dest_quiz_div\").style.display = \"none\";\n     \tdocument.getElementById(\"dest_folder_div\").style.display = \"none\"; \n     }\n   }";
    echo "</script>";
    echo "Avec les fichiers choisis: ";
    echo "<select id=\"action\" class=\"form_elem\" name=\"action\" onchange=\"onActionChange();\">";
    echo "<option value=\"move\">Déplacer dans un autre répertoire</option>";
    echo "<option value=\"move_to_another_quiz\">Déplacer dans un autre quiz</option>";
    echo "<option value=\"remove\">Supprimer</option>";
    echo "</select>";
    echo "<br><div id=\"dest_quiz_div\" style=\"display: none;\">Quiz destination : ";
    echo "<select id=\"dest_quiz\" class=\"form_elem\" name=\"dest_quiz\">";
    $quizes = Quiz::getAllQuizes();
    foreach ($quizes as $quiz_name => $quiz) {
        echo "<option value=\"" . $quiz->getId() . "\">" . $quiz->getName() . "</option>";
    }
    echo "</select></div>";
    echo "<div id=\"dest_folder_div\" style=\"display: block;\">Répertoire destination : ";
    echo "<select id=\"dest_folder\" class=\"form_elem\" name=\"dest_folder\">";
    echo "<option value=\"omr_input\">omr_input</option>";
    echo "<option value=\"omr_output\">omr_output</option>";
    echo "<option value=\"omr_errors\">omr_errors</option>";
    echo "<option value=\"correction\">correction</option>";
    // echo "<option value=\".\">base</option>";
    echo "</select></div><br>";
    echo "<button type=\"submit\" class=\"btn btn-primary\" onclick=\"confirmAction(); return false;\">Valider</button>";
}
Ejemplo n.º 2
0
}
?>
</select>
</td><td style="border:0px;">
<button type="submit" class="btn btn-primary"><i class="icon-folder-open"></i> Go</button>
</td>
</tr>
</table>
</form>
</li>
<li>
<form action="quiz_workflow.php" class="form-horizontal" method="get">
Archives : <br/>
<select name="quiz-id" class="form_elem" id="old_quizes">
<?php 
$quizes = Quiz::getAllQuizes();
foreach ($quizes as $quiz_name => $quiz) {
    if ($quiz->getDate() < $max_date) {
        echo "<option value=\"" . $quiz->getId() . "\">" . $quiz->getName() . "</option>";
    }
}
?>
</select>
<button type="submit" class="btn btn-primary"><i class="icon-folder-open"></i> Go</button>
</li>
</ul>
</form>

</li>
</ul>
<?php