Use enums for HTTP methods in search forms

This commit is contained in:
Alex Cabal 2025-03-31 12:05:32 -05:00
parent 849276736e
commit 7da87bf9e2
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@
$isAllSelected = sizeof($tags) == 0 || in_array('all', $tags); $isAllSelected = sizeof($tags) == 0 || in_array('all', $tags);
?> ?>
<form action="/ebooks" method="get" rel="search"> <form action="/ebooks" method="<?= Enums\HttpMethod::Get->value ?>" rel="search">
<label class="tags">Subjects <label class="tags">Subjects
<select <? if(!Template::IsEreaderBrowser()){ ?> multiple="multiple"<? } ?> name="tags[]" size="1"> <select <? if(!Template::IsEreaderBrowser()){ ?> multiple="multiple"<? } ?> name="tags[]" size="1">
<option value="all">All</option> <option value="all">All</option>

View file

@ -147,7 +147,7 @@ catch(Exceptions\PageOutOfBoundsException){
You can help Standard Ebooks by <a href="/artworks/new">submitting new public domain artwork</a> to add to this catalog for use in future ebooks. For free access to the submission form, <a href="/about#editor-in-chief">contact the Editor-in-Chief</a>. You can help Standard Ebooks by <a href="/artworks/new">submitting new public domain artwork</a> to add to this catalog for use in future ebooks. For free access to the submission form, <a href="/about#editor-in-chief">contact the Editor-in-Chief</a>.
<? } ?> <? } ?>
</p> </p>
<form class="browse-artwork" action="/artworks" method="get" rel="search"> <form class="browse-artwork" action="/artworks" method="<?= Enums\HttpMethod::Get->value ?>" rel="search">
<label> <label>
<span>Status</span> <span>Status</span>
<span> <span>