diff options
Diffstat (limited to 'src/view/templates/modify_page.php')
| -rw-r--r-- | src/view/templates/modify_page.php | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/view/templates/modify_page.php b/src/view/templates/modify_page.php new file mode 100644 index 0000000..5ab1a95 --- /dev/null +++ b/src/view/templates/modify_page.php | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | <?php declare(strict_types=1); ?> | ||
| 2 | <section class="page_modification"> | ||
| 3 | <h3>Modification de la page</h3> | ||
| 4 | <div class="edit_page_zone"> | ||
| 5 | <div class="edit_page_title_zone"> | ||
| 6 | <p id="edit_page_title"> | ||
| 7 | <label for="page_name">Titre de la page</label> | ||
| 8 | <input type="text" id="page_name" name="edit_page_title" value="<?= Director::$page_path->getLast()->getPageName() ?>" onchange="makePageNamePath()" required> | ||
| 9 | <button onclick="changePageTitle('<?= Director::$page_path->getLast()->getId() ?>')">Renommer</button> | ||
| 10 | </p> | ||
| 11 | <form id="edit_page_menu_path" method="post" action="<?= new URL(['page' => CURRENT_PAGE]) ?>"> | ||
| 12 | <label for="page_name_path">Chemin en "snake_case"</label> | ||
| 13 | <input type="text" id="page_name_path" name="page_menu_path" value="<?= Director::$page_path->getLast()->getEndOfPath() ?>" placeholder="ex: nouvelle_page" required> | ||
| 14 | <input type="hidden" name="page_id" value="<?= Director::$page_path->getLast()->getId() ?>"><input type="hidden" name="page_name_path_hidden"> | ||
| 15 | <input type="submit" value="Modifier"> | ||
| 16 | </form> | ||
| 17 | </div> | ||
| 18 | <div id="edit_description"> | ||
| 19 | <label for="description_textarea">Description sous le titre dans les moteurs de recherche</label> | ||
| 20 | <div> | ||
| 21 | <textarea id="description_textarea" name="edit_description" cols="40" rows="3" placeholder="ex: nous faisons ceci et cela, etc" required><?= $head_node->getNodeData()->getData()['description'] ?></textarea> | ||
| 22 | <button onclick="changeDescription('<?= $head_node->getNodeData()->getId() ?>')">Modifier</button> | ||
| 23 | </div> | ||
| 24 | </div> | ||
| 25 | </div> | ||
| 26 | <div class="delete_page_zone"> | ||
| 27 | <form method="post" action="<?= new URL ?>"> | ||
| 28 | <label>Supprimer cette page</label> | ||
| 29 | <input type="hidden" name="page_id" value="<?= Director::$page_path->getLast()->getId() ?>"> | ||
| 30 | <input type="hidden" name="submit_hidden"> | ||
| 31 | <input type="submit" value="Supprimer" onclick="return confirm('Voulez-vous vraiment supprimer cette page?');"> | ||
| 32 | </form> | ||
| 33 | </div> | ||
| 34 | <div class="edit_block_zone"> | ||
| 35 | <div class="new_block"> | ||
| 36 | <p>Ajouter un bloc de page</p> | ||
| 37 | <form method="post" action="<?= new URL(['page' => CURRENT_PAGE]) ?>"> | ||
| 38 | <p><label for="bloc_title">Titre</label> | ||
| 39 | <input type="text" id="bloc_title" name="bloc_title" required></p> | ||
| 40 | <p><label for="bloc_select">Type</label> | ||
| 41 | <select id="bloc_select" name="bloc_select" required> | ||
| 42 | <?= $options ?> | ||
| 43 | </select> | ||
| 44 | <input type="hidden" name="bloc_title_hidden"> | ||
| 45 | <input type="submit" value="Valider"></p> | ||
| 46 | </form> | ||
| 47 | </div> | ||
| 48 | <div class="modify_block"> | ||
| 49 | <p>Modifier un bloc</p> | ||
| 50 | <?= $bloc_edit ?> | ||
| 51 | </div> | ||
| 52 | </div> | ||
| 53 | </section> \ No newline at end of file | ||
