Use number input type instead of select for image and margin sizes

This commit is contained in:
Miraty 2021-05-03 15:18:50 +02:00
parent b009740d6a
commit 50a079ab24
2 changed files with 4 additions and 24 deletions

View file

@ -158,7 +158,7 @@ if (badQuery()) {
?></textarea> ?></textarea>
</div> </div>
<div id="menusDeroulants"> <div id="sideParams">
<div class="param"> <div class="param">
<label for="redondancy"> <label for="redondancy">
@ -186,16 +186,7 @@ if (badQuery()) {
</p> </p>
</details> </details>
</label> </label>
<select id="margin" name="margin"> <input type="number" id="margin" placeholder="2" name="margin" min="0" value="<?= $_GET['margin'] ?>">
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "0")) {echo 'selected="" ';} ?>value="0">0</option>
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "1")) {echo 'selected="" ';} ?>value="1">1</option>
<option <?php if ((isset($_GET['margin']) AND ($_GET['margin'] == "2")) OR (!isset($_GET['margin']) OR empty($_GET['margin']))) {echo 'selected="" ';} ?>value="2">2 - <?= $loc['value_default'] ?></option>
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "3")) {echo 'selected="" ';} ?>value="3">3</option>
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "4")) {echo 'selected="" ';} ?>value="4">4</option>
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "5")) {echo 'selected="" ';} ?>value="5">5</option>
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "8")) {echo 'selected="" ';} ?>value="8">8</option>
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "10")) {echo 'selected="" ';} ?>value="10">10</option>
</select>
</div> </div>
<div class="param"> <div class="param">
@ -207,18 +198,7 @@ if (badQuery()) {
</p> </p>
</details> </details>
</label> </label>
<select id="size" name="size"> <input type="number" id="size" placeholder="4" name="size" min="1" max="44" value="<?= $_GET['size'] ?>">
<option <?php if (isset($_GET['size']) AND ($_GET['size'] == 1)) {echo 'selected="" ';} ?>value="1">1</option>
<option <?php if (isset($_GET['size']) AND ($_GET['size'] == 2)) {echo 'selected="" ';} ?>value="2">2</option>
<option <?php if (isset($_GET['size']) AND ($_GET['size'] == 3)) {echo 'selected="" ';} ?>value="3">3</option>
<option <?php if ((isset($_GET['size']) AND ($_GET['size'] == 4)) OR (!isset($_GET['size']) OR empty($_GET['size']))) {echo 'selected="" ';} ?>value="4">4 - <?= $loc['value_default'] ?></option>
<option <?php if (isset($_GET['size']) AND ($_GET['size'] == 5)) {echo 'selected="" ';} ?>value="5">5</option>
<option <?php if (isset($_GET['size']) AND ($_GET['size'] == 6)) {echo 'selected="" ';} ?>value="6">6</option>
<option <?php if (isset($_GET['size']) AND ($_GET['size'] == 8)) {echo 'selected="" ';} ?>value="8">8</option>
<option <?php if (isset($_GET['size']) AND ($_GET['size'] == 10)) {echo 'selected="" ';} ?>value="10">10</option>
<option <?php if (isset($_GET['size']) AND ($_GET['size'] == 15)) {echo 'selected="" ';} ?>value="15">15</option>
<option <?php if (isset($_GET['size']) AND ($_GET['size'] == 20)) {echo 'selected="" ';} ?>value="20">20</option>
</select>
</div> </div>
</div> </div>

View file

@ -61,7 +61,7 @@ details .helpText {
} }
} }
#menusDeroulants summary { #sideParams summary {
text-align: center; text-align: center;
margin-left: 20px; margin-left: 20px;
} }