<%@ page import="ro.emid.common.config.AppConfigManager" %>
<%@ page import="ro.emid.common.config.loader.ConfigLoader" %>
<%@ page import="ro.emid.common.constants.AppConstants" %>
<%@ page import="java.util.List" %>


<%
    List loaders = AppConfigManager.get().getLoaders();
%>

<b>Reload Config Form</b>
<form action="<%=AppConstants.APP_NAME%>?action=config-reload" method="post">
    <table>

        <% for (int i = 0; i < loaders.size(); i++) {
            ConfigLoader loader = (ConfigLoader) loaders.get(i); %>

            <tr><td>
                <input type="checkbox" value="<%=loader.getKey()%>" name="loader-key" id="loader-key<%=i%>" />
                <label for="loader-key<%=i%>"><%=loader.getDescription()%></label>
            </td></tr>
        <% }  %>

        <tr>
            <td>
                <input type="submit" value="Reload config">
            </td>
        </tr>
    </table>
</form>