diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2020-01-10 15:28:56 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2020-01-10 15:28:56 +0100 |
commit | d9816ef4affa3d7096a2189e9b171d9d130a727e (patch) | |
tree | 346e26956d0a7521a3736bc85beea397a24d1c46 /app/view | |
parent | 7001272f4e8b683cbc64564c5798d85a34ab9026 (diff) | |
download | wcms-d9816ef4affa3d7096a2189e9b171d9d130a727e.tar.gz wcms-d9816ef4affa3d7096a2189e9b171d9d130a727e.zip |
new feature : multi edit base working
Diffstat (limited to 'app/view')
-rw-r--r-- | app/view/templates/home.php | 4 | ||||
-rw-r--r-- | app/view/templates/homemenu.php | 51 |
2 files changed, 37 insertions, 18 deletions
diff --git a/app/view/templates/home.php b/app/view/templates/home.php index 01bc0e4..63706d0 100644 --- a/app/view/templates/home.php +++ b/app/view/templates/home.php @@ -16,7 +16,7 @@ <?php $optlist = $optlist ?? null; - $this->insert('homemenu', ['user' => $user, 'opt' => $opt, 'optlist' => $optlist]); + $this->insert('homemenu', ['user' => $user, 'opt' => $opt, 'optlist' => $optlist, 'pagelist' => $pagelist]); ?> @@ -85,7 +85,7 @@ <tbody> <?php foreach ($table2 as $item) { ?> <tr> - <td class="hidephone"><input type="checkbox" name="id[]" value="<?= $item->id() ?>" id="id_<?= $item->id() ?>"></td> + <td class="hidephone"><input type="checkbox" name="pagesid[]" value="<?= $item->id() ?>" id="id_<?= $item->id() ?>" form="multiedit"></td> <td><label title="<?= $item->title() ?>" for="id_<?= $item->id() ?>"><?= $item->id() ?></label></td> <td><a href="<?= $this->upage('pageedit', $item->id()) ?>"><img src="<?= Wcms\Model::iconpath() ?>edit.png" class="icon"></a></td> <td><a href="<?= $this->upage('pageread/', $item->id()) ?>" target="_blank"><img src="<?= Wcms\Model::iconpath() ?>read.png" class="icon"></a></td> diff --git a/app/view/templates/homemenu.php b/app/view/templates/homemenu.php index 838ca81..fc16340 100644 --- a/app/view/templates/homemenu.php +++ b/app/view/templates/homemenu.php @@ -44,30 +44,32 @@ <input type="submit" value="delete"> </form> <h2>Edit Meta infos</h2> - <form action="" method="post"> + <form action="<?= $this->url('multiedit') ?>" method="post" id="multiedit"> <strong>Tag</strong> </br> - <input type="checkbox" name="resettag" id="resettag"> + <input type="hidden" name="reset[tag]" value="0"> + <input type="checkbox" name="reset[tag]" id="resettag" value="1"> <label for="resettag">reset tag(s)</label> </br> - <input type="text" name="tag" id="addtag"> + <input type="text" name="addtag" id="addtag"> <label for="addtag">add tag(s)</label> </br> <strong>Date</strong> </br> - <input type="checkbox" name="resetdate" id="resetdate"> + <input type="hidden" name="reset[date]" value="0"> + <input type="checkbox" name="reset[date]" id="resetdate" value="1"> <label for="resetdate">reset date as now</label> </br> - <input type="date" name="date" id="date"> + <input type="date" name="datas[pdate]" id="date"> <label for="date">Date</label> </br> - <input type="time" name="time" id="time"> + <input type="time" name="datas[ptime]" id="time"> <label for="time">Time</label> </br> <strong>Privacy</strong> </br> - <select name="level" id="setlevel"> - <option >--change privacy--</option> + <select name="datas[secure]" id="setlevel"> + <option value="" disabled selected>--change privacy--</option> <option value="0">public</option> <option value="1">private</option> <option value="2">not_published</option> @@ -76,21 +78,38 @@ </br> <strong>Templates</strong> </br> - <select name="templatebody" id="templatebody"> - <option>--set template body--</option> + <select name="datas[templatebody]" id="templatebody"> + <option value="" disabled selected>--set template body--</option> + <?php + foreach ($pagelist as $page) { + echo '<option value ="' . $page . '">' . $page . '</option>'; + } + ?> </select> <label for="templatebody">Body</label> </br> - <select name="templatecss" id="templatecss"> - <option>--set template css--</option> - </select> + <select name="datas[templatecss]" id="templatecss"> + <option value="" disabled selected>--set css template--</option> + <?php + foreach ($pagelist as $page) { + echo '<option value ="' . $page . '">' . $page . '</option>'; + } + ?> </select> <label for="templatecss">CSS</label> </br> - <select name="templatejavascript" id="templatejavascript"> - <option>--set template javascript--</option> - </select> + <select name="datas[templatejavascript]" id="templatejavascript"> + <option value="" disabled selected>--set javascript template--</option> + <?php + foreach ($pagelist as $page) { + echo '<option value ="' . $page . '">' . $page . '</option>'; + } + ?> </select> <label for="templatejavascript">Javascript</label> </br> + <input type="hidden" name="reset[datemodif]" value="0"> + <input type="checkbox" name="reset[datemodif]" id="resetdatemodif" value="1"> + <label for="resetdatemodif">update modification date</label> + </br> <input type="submit" value="edit"> </form> </div> |