blob: 2171dde2cae47d83a82ec0cfd60e92a1dc5e564f [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
2require_once(__DIR__."/../core.php");
3security::checkType(security::HYPERADMIN, security::METHOD_NOTFOUND);
4
5if (!security::checkParams("GET", [
6 ["place", security::PARAM_ISINT]
7])) {
8 security::notFound();
9}
10
11$place = $_GET["place"];
12if (!in_array($place, help::$places)) security::notFound();
13
14$url = help::get($place);
15?>
16
17<form action="dosethelpresource.php" method="POST" autocomplete="off">
18 <input type="hidden" name="place" value="<?=(int)$place?>">
19 <h4 class="mdl-dialog__title">Enlace de ayuda</h4>
20 <div class="mdl-dialog__content">
21 <p><b>Lugar:</b> <?=security::htmlsafe(help::$placesName[$place] ?? "undefined")?></b></p>
22 <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
23 <input class="mdl-textfield__input" type="url" name="url" id="url" autocomplete="off"<?=($url !== false ? ' value="'.security::htmlsafe($url).'"' : '')?>>
24 <label class="mdl-textfield__label" for="url">URL</label>
25 </div>
26 </div>
27 <div class="mdl-dialog__actions">
28 <button type="submit" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--primary">Configurar</button>
29 <button data-dyndialog-close class="mdl-button mdl-js-button mdl-js-ripple-effect cancel">Cancelar</button>
30 </div>
31</form>