QR codes types can now be chosen between the default text mode and the Wifi mode.
The WiFi form is on a dedicated page, and that has been implemented by managing every HTTP request from index.php
For more information about the format used for Wifi QR codes check https://github.com/zxing/zxing/wiki/Barcode-Contents#wi-fi-network-config-android-ios-11
Co-authored-by: Miraty <miraty+git@antopie.org>
Reviewed-on: #27 (https://code.antopie.org/miraty/libreqr/issues/27)
Reviewed-by: Miraty <miraty@noreply.code.antopie.org>
Co-authored-by: Denise <denisebitca@42l.fr>
Co-committed-by: Denise <denisebitca@42l.fr>
e4491752f2
52 lines
No EOL
2.2 KiB
PHP
52 lines
No EOL
2.2 KiB
PHP
<div id="sideParams">
|
|
<div class="param">
|
|
<details>
|
|
<summary><label for="redundancy"><?= getIntlString('label_redundancy') ?></label></summary>
|
|
<p class="helpText">
|
|
<?= getIntlString('help_redundancy') ?>
|
|
</p>
|
|
</details>
|
|
<select id="redundancy" name="main[redundancy]">
|
|
<option <?php if ($_POST['main']['redundancy'] === "low") echo 'selected="" '; ?>value="low">L - 7%</option>
|
|
<option <?php if ($_POST['main']['redundancy'] === "medium") echo 'selected="" '; ?>value="medium">M - 15%</option>
|
|
<option <?php if ($_POST['main']['redundancy'] === "quartile") echo 'selected="" '; ?>value="quartile">Q - 25%</option>
|
|
<option <?php if ($_POST['main']['redundancy'] === "high") echo 'selected="" '; ?>value="high">H - 30%</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="param">
|
|
<details>
|
|
<summary><label for="margin"><?= getIntlString('label_margin') ?></label></summary>
|
|
<p class="helpText">
|
|
<?= getIntlString('help_margin') ?>
|
|
</p>
|
|
</details>
|
|
<input type="number" id="margin" placeholder="<?= DEFAULT_MARGIN ?>" name="main[margin]" required="" min="0" max="1024" value="<?= htmlspecialchars($_POST['main']['margin']) ?>">
|
|
</div>
|
|
|
|
<div class="param">
|
|
<details>
|
|
<summary><label for="size"><?= getIntlString('label_size') ?></label></summary>
|
|
<p class="helpText">
|
|
<?= getIntlString('help_size') ?>
|
|
</p>
|
|
</details>
|
|
<input type="number" id="size" placeholder="<?= DEFAULT_SIZE ?>" name="main[size]" required="" min="21" max="4096" value="<?= htmlspecialchars($_POST['main']['size']) ?>">
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="colors">
|
|
<div class="param">
|
|
<label for="bgColor"><?= getIntlString('label_bgColor') ?></label>
|
|
<input type="color" name="main[bgColor]" id="bgColor" value="<?= htmlspecialchars($_POST['main']['bgColor']) ?>">
|
|
</div>
|
|
<div class="param">
|
|
<label for="fgColor"><?= getIntlString('label_fgColor') ?></label>
|
|
<input type="color" name="main[fgColor]" id="fgColor" value="<?= htmlspecialchars($_POST['main']['fgColor']) ?>">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="centered">
|
|
<input class="button" type="submit" value="<?= getIntlString('button_create', raw: true) ?>" />
|
|
</div>
|