diff options
Diffstat (limited to 'src/view')
-rw-r--r-- | src/view/MenuBuilder.php | 7 | ||||
-rw-r--r-- | src/view/templates/menu.php | 8 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/view/MenuBuilder.php b/src/view/MenuBuilder.php index 5331c08..780ca7e 100644 --- a/src/view/MenuBuilder.php +++ b/src/view/MenuBuilder.php | |||
@@ -62,9 +62,12 @@ class MenuBuilder extends AbstractBuilder | |||
62 | <button>' . $entry->getPageName() . '</button>'; | 62 | <button>' . $entry->getPageName() . '</button>'; |
63 | 63 | ||
64 | if(str_starts_with($entry->getEndOfPath(), 'http')){ | 64 | if(str_starts_with($entry->getEndOfPath(), 'http')){ |
65 | $this->html .= '<span id="edit-i..."><img class="move_entry_icon" src="assets/edit.svg" onclick="editUrlEntry(' . $entry->getId() . ')"></span> | 65 | $this->html .= '<span id="edit-i' . $entry->getId() . '"><img class="move_entry_icon" src="assets/edit.svg" onclick="editUrlEntry(' . $entry->getId() . ')"></span> |
66 | <i class="url">' . $entry->getEndOfPath() . '</i> | 66 | <i class="url">' . $entry->getEndOfPath() . '</i> |
67 | <span id="delete-i..."><img class="move_entry_icon" src="assets/delete-bin.svg" onclick="deleteUrlEntry(' . $entry->getId() . ')"></span>'; | 67 | <form style="display: inline;" id="delete-i' . $entry->getId() . '" method="post" action="' . new URL(['from' => 'menu_chemins']) . '"> |
68 | <input type="hidden" name="delete" value="' . $entry->getId() . '"> | ||
69 | <input type="image" class="move_entry_icon" src="assets/delete-bin.svg" alt="delete link button"> | ||
70 | </form>'; | ||
68 | } | 71 | } |
69 | else{ | 72 | else{ |
70 | $this->html .= '<i class="path">' . $entry->getPagePath() . '</i>'; | 73 | $this->html .= '<i class="path">' . $entry->getPagePath() . '</i>'; |
diff --git a/src/view/templates/menu.php b/src/view/templates/menu.php index 49df4e0..d62b78b 100644 --- a/src/view/templates/menu.php +++ b/src/view/templates/menu.php | |||
@@ -7,14 +7,14 @@ | |||
7 | <p>Ajouter au menu un lien vers un site web quelconque avec le formulaire ci-dessous:</p> | 7 | <p>Ajouter au menu un lien vers un site web quelconque avec le formulaire ci-dessous:</p> |
8 | <form method="post" action="<?= new URL(['from' => 'menu_chemins']) ?>"> | 8 | <form method="post" action="<?= new URL(['from' => 'menu_chemins']) ?>"> |
9 | <p> | 9 | <p> |
10 | <label for="url_input">Adresse URL:</label> | ||
11 | <input id="url_input" type="url" name="url_input"> | ||
12 | </p> | ||
13 | <p> | ||
14 | <label for="label_input">Nom:</label> | 10 | <label for="label_input">Nom:</label> |
15 | <input id="label_input" type="text" name="label_input"> | 11 | <input id="label_input" type="text" name="label_input"> |
16 | </p> | 12 | </p> |
17 | <p> | 13 | <p> |
14 | <label for="url_input">Adresse URL:</label> | ||
15 | <input id="url_input" type="url" name="url_input"> | ||
16 | </p> | ||
17 | <p> | ||
18 | <label>Placer le lien juste après cette entrée:</label> | 18 | <label>Placer le lien juste après cette entrée:</label> |
19 | <select id="location" name="location"> | 19 | <select id="location" name="location"> |
20 | <?= $this->options ?> | 20 | <?= $this->options ?> |