<?php

$nedap = new Nedap();

get_rfid_js_header();

global $rfid_js_header;
echo $rfid_js_header;
?>

<template id="nedap-station-template">
    <tr>
        <td>
            <label class="etiquette" for="localisation_!!index!!"></label>
        </td>
        <td><?= $nedap->generateLocationOptions() ?></td>
    </tr>
</template>

<div id="nedap-loader" class="loader" style="display:none;">
    <div class="loader-container">
        <i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>
    </div>
</div>

<form class="form-admin" action="./admin.php?categ=plugin&plugin=nedap&sub=nedap&what=stations&action=save" method="post" onsubmit="return saveStations(event)">

    <h3><?= \plugins::get_message("nedap", "stations_title") ?></h3>

    <div class="row">
        <button class="bouton" type="button" onclick="loadStation()">
            <?= \plugins::get_message("nedap", "load_station") ?>
        </button>
    </div>

    <div class="form-contenu">
        <table>
            <thead>
                <tr>
                    <th><?= \plugins::get_message("nedap", "label_station") ?></th>
                    <th><?= \plugins::get_message("nedap", "label_location") ?></th>
                </tr>
            </thead>
            <tbody id="nedap-stations-container"></tbody>
        </table>
    </div>

    <div class="row">
        <div class="left">
            <input type="button" class="bouton" value="<?= $msg['76'] ?>" onclick="cancel()">
            <input type="submit" class="bouton" value="<?= $msg['77'] ?>">
        </div>
    </div>
</form>

<script src="./plugins/nedap/javascript/script.js"></script>
