Fences/Inputvalidation (HTML) for Paper-/Labelsizes

This commit is contained in:
int2001
2024-02-12 06:05:59 +00:00
parent bb4b7b5160
commit 5789317214
4 changed files with 25 additions and 25 deletions

View File

@@ -48,13 +48,13 @@
<div class="mb-3 row">
<label class="col-sm-2 col-form-label" for="marginTop">Margin Top</label>
<div class="col-sm-4">
<input name="marginTop" type="text" class="form-control" id="marginTop" aria-describedby="marginTopHelp">
<input name="marginTop" type="text" class="form-control" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" required id="marginTop" aria-describedby="marginTopHelp">
<small id="marginTopHelp" class="form-text text-muted">Top margin of labels</small>
</div>
<label class="col-sm-2 col-form-label" for="marginLeft">Margin Left</label>
<div class="col-sm-4">
<input name="marginLeft" type="text" class="form-control" id="marginLeft" aria-describedby="marginLeftHelp">
<input name="marginLeft" type="text" class="form-control" id="marginLeft" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" required aria-describedby="marginLeftHelp">
<small id="marginLeftHelp" class="form-text text-muted">Left margin of labels.</small>
</div>
</div>
@@ -62,13 +62,13 @@
<div class="mb-3 row">
<label class="col-sm-2 col-form-label" for="NX">Labels horizontally</label>
<div class="col-sm-4">
<input name="NX" type="number" min="1" max="40" step="1" class="form-control" id="NX" aria-describedby="NXHelp">
<input name="NX" type="number" min="1" max="40" step="1" required class="form-control" id="NX" aria-describedby="NXHelp">
<small id="NXHelp" class="form-text text-muted">Number of labels horizontally across the page.</small>
</div>
<label class="col-sm-2 col-form-label" for="NY">Labels vertically</label>
<div class="col-sm-4">
<input name="NY" type="number" min="1" max="40" step="1" class="form-control" id="NY" aria-describedby="NYHelp">
<input name="NY" type="number" min="1" max="40" step="1" required class="form-control" id="NY" aria-describedby="NYHelp">
<small id="NYHelp" class="form-text text-muted">Number of labels vertically across the page.</small>
</div>
</div>
@@ -76,13 +76,13 @@
<div class="mb-3 row">
<label class="col-sm-2 col-form-label" for="SpaceX">Horizontal space</label>
<div class="col-sm-4">
<input name="SpaceX" type="text" class="form-control" id="SpaceX">
<input name="SpaceX" type="text" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" required class="form-control" id="SpaceX">
<small id="NYHelp" class="form-text text-muted">Horizontal space between 2 labels.</small>
</div>
<label class="col-sm-2 col-form-label" for="SpaceY">Vertical space</label>
<div class="col-sm-4">
<input name="SpaceY" type="text" class="form-control" id="SpaceY">
<input name="SpaceY" type="text" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" required class="form-control" id="SpaceY">
<small id="NYHelp" class="form-text text-muted">Vertical space between 2 labels.</small>
</div>
</div>
@@ -90,13 +90,13 @@
<div class="mb-3 row">
<label class="col-sm-2 col-form-label" for="width">Width of label</label>
<div class="col-sm-4">
<input name="width" type="text" class="form-control" id="width" aria-describedby="widthHelp">
<input name="width" type="text" class="form-control" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" required id="width" aria-describedby="widthHelp">
<small id="widthHelp" class="form-text text-muted">Total width of one label.</small>
</div>
<label class="col-sm-2 col-form-label" for="height">Height of label</label>
<div class="col-sm-4">
<input name="height" type="text" class="form-control" id="height" aria-describedby="heightHelp">
<input name="height" type="text" class="form-control" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" required id="height" aria-describedby="heightHelp">
<small id="heightHelp" class="form-text text-muted">Total height of one label</small>
</div>
</div>
@@ -104,13 +104,13 @@
<div class="mb-3 row">
<label class="col-sm-2 col-form-label" for="font_size">Font Size</label>
<div class="col-sm-4">
<input name="font_size" type="number" min="1" max="40" step="1" class="form-control" id="font_size" value="8" aria-describedby="font_sizeHelp">
<input name="font_size" type="number" min="1" max="40" step="1" required class="form-control" id="font_size" value="8" aria-describedby="font_sizeHelp">
<small id="font_sizeHelp" class="form-text text-muted">Font size used on the label don't go too big.</small>
</div>
<label class="col-sm-2 col-form-label" for="font_size">QSOs on label</label>
<div class="col-sm-4">
<input name="label_qsos" type="number" min="1" max="40" step="1" class="form-control" id="font_size" value="5" aria-describedby="font_sizeHelp">
<input name="label_qsos" type="number" min="1" max="40" step="1" required class="form-control" id="font_size" value="5" aria-describedby="font_sizeHelp">
</div>
</div>

View File

@@ -50,13 +50,13 @@
<div class="mb-3 row">
<label class="col-sm-2 col-form-label" for="width">Width of paper</label>
<div class="col-sm-4">
<input name="width" type="text" class="form-control" id="width" aria-describedby="widthHelp">
<input name="width" type="text" class="form-control" pattern="[0-9]+([\.,][0-9]+)?" required step="0.01" id="width" aria-describedby="widthHelp">
<small id="widthHelp" class="form-text text-muted">Total width of paper.</small>
</div>
<label class="col-sm-2 col-form-label" for="height">Height of paper</label>
<div class="col-sm-4">
<input name="height" type="text" class="form-control" id="height" aria-describedby="heightHelp">
<input name="height" type="text" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" required class="form-control" id="height" aria-describedby="heightHelp">
<small id="heightHelp" class="form-text text-muted">Total height of paper</small>
</div>
</div>

View File

@@ -20,7 +20,7 @@
<!-- Label Name Input -->
<div class="mb-3">
<label for="LabelName">Label Name</label>
<input name="label_name" type="text" class="form-control" id="LabelName" aria-describedby="label_nameHelp" placeholder="Code 925041 6x3 Generic Label Sheet" value="<?php if(isset($label->label_name)) { echo $label->label_name; } ?>">
<input name="label_name" type="text" class="form-control" required id="LabelName" aria-describedby="label_nameHelp" placeholder="Code 925041 6x3 Generic Label Sheet" value="<?php if(isset($label->label_name)) { echo $label->label_name; } ?>">
<small id="label_nameHelp" class="form-text text-muted">Label name used for display purposes so pick something meaningful perhaps the label style.</small>
</div>
@@ -50,13 +50,13 @@
<div class="mb-3 row">
<label class="col-sm-2 col-form-label" for="marginTop">Margin Top</label>
<div class="col-sm-4">
<input name="marginTop" type="text" class="form-control" id="marginTop" aria-describedby="marginTopHelp" value="<?php if(isset($label->margintop)) { echo $label->margintop; } ?>">
<input name="marginTop" type="text" class="form-control" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" required id="marginTop" aria-describedby="marginTopHelp" value="<?php if(isset($label->margintop)) { echo $label->margintop; } ?>">
<small id="marginTopHelp" class="form-text text-muted">Top margin of labels</small>
</div>
<label class="col-sm-2 col-form-label" for="marginLeft">Margin Left</label>
<div class="col-sm-4">
<input name="marginLeft" type="text" class="form-control" id="marginLeft" aria-describedby="marginLeftHelp" value="<?php if(isset($label->marginleft)) { echo $label->marginleft; } ?>">
<input name="marginLeft" type="text" class="form-control" id="marginLeft" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" required aria-describedby="marginLeftHelp" value="<?php if(isset($label->marginleft)) { echo $label->marginleft; } ?>">
<small id="marginLeftHelp" class="form-text text-muted">Left margin of labels.</small>
</div>
</div>
@@ -64,13 +64,13 @@
<div class="mb-3 row">
<label class="col-sm-2 col-form-label" for="NX">Labels horizontally</label>
<div class="col-sm-4">
<input name="NX" type="number" min="1" max="40" step="1" class="form-control" id="NX" aria-describedby="NXHelp" value="<?php if(isset($label->nx)) { echo $label->nx; } ?>">
<input name="NX" type="number" min="1" max="40" step="1" class="form-control" required id="NX" aria-describedby="NXHelp" value="<?php if(isset($label->nx)) { echo $label->nx; } ?>">
<small id="NXHelp" class="form-text text-muted">Number of labels horizontally across the page.</small>
</div>
<label class="col-sm-2 col-form-label" for="NY">Labels vertically</label>
<div class="col-sm-4">
<input name="NY" type="number" min="1" max="40" step="1" class="form-control" id="NY" aria-describedby="NYHelp" value="<?php if(isset($label->ny)) { echo $label->ny; } ?>">
<input name="NY" type="number" min="1" max="40" step="1" class="form-control" id="NY" required aria-describedby="NYHelp" value="<?php if(isset($label->ny)) { echo $label->ny; } ?>">
<small id="NYHelp" class="form-text text-muted">Number of labels vertically across the page.</small>
</div>
</div>
@@ -78,13 +78,13 @@
<div class="mb-3 row">
<label class="col-sm-2 col-form-label" for="SpaceX">Horizontal space</label>
<div class="col-sm-4">
<input name="SpaceX" type="text" class="form-control" id="SpaceX" value="<?php if(isset($label->spacex)) { echo $label->spacex; } ?>">
<input name="SpaceX" type="text" class="form-control" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" required id="SpaceX" value="<?php if(isset($label->spacex)) { echo $label->spacex; } ?>">
<small id="NYHelp" class="form-text text-muted">Horizontal space between 2 labels.</small>
</div>
<label class="col-sm-2 col-form-label" for="SpaceY">Vertical space</label>
<div class="col-sm-4">
<input name="SpaceY" type="text" class="form-control" id="SpaceY" value="<?php if(isset($label->spacey)) { echo $label->spacey; } ?>">
<input name="SpaceY" type="text" class="form-control" id="SpaceY" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" required value="<?php if(isset($label->spacey)) { echo $label->spacey; } ?>">
<small id="NYHelp" class="form-text text-muted">Vertical space between 2 labels.</small>
</div>
</div>
@@ -92,13 +92,13 @@
<div class="mb-3 row">
<label class="col-sm-2 col-form-label" for="width">Width of label</label>
<div class="col-sm-4">
<input name="width" type="text" class="form-control" id="width" aria-describedby="widthHelp" value="<?php if(isset($label->width)) { echo $label->width; } ?>">
<input name="width" type="text" class="form-control" id="width" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" required aria-describedby="widthHelp" value="<?php if(isset($label->width)) { echo $label->width; } ?>">
<small id="widthHelp" class="form-text text-muted">Total width of one label.</small>
</div>
<label class="col-sm-2 col-form-label" for="height">Height of label</label>
<div class="col-sm-4">
<input name="height" type="text" class="form-control" id="height" aria-describedby="heightHelp" value="<?php if(isset($label->height)) { echo $label->height; } ?>">
<input name="height" type="text" class="form-control" id="height" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" required aria-describedby="heightHelp" value="<?php if(isset($label->height)) { echo $label->height; } ?>">
<small id="heightHelp" class="form-text text-muted">Total height of one label</small>
</div>
</div>
@@ -106,13 +106,13 @@
<div class="mb-3 row">
<label class="col-sm-2 col-form-label" for="font_size">Font Size</label>
<div class="col-sm-4">
<input name="font_size" type="number" min="1" max="40" step="1" class="form-control" id="font_size" aria-describedby="font_sizeHelp" value="<?php if(isset($label->font_size)) { echo $label->font_size; } ?>">
<input name="font_size" type="number" min="1" max="40" step="1" class="form-control" id="font_size" required aria-describedby="font_sizeHelp" value="<?php if(isset($label->font_size)) { echo $label->font_size; } ?>">
<small id="font_sizeHelp" class="form-text text-muted">Font size used on the label don't go too big.</small>
</div>
<label class="col-sm-2 col-form-label" for="font_size">QSOs on label</label>
<div class="col-sm-4">
<input name="label_qsos" type="number" min="1" max="40" step="1" class="form-control" id="label_qsos" aria-describedby="font_sizeHelp" value="<?php if(isset($label->qsos)) { echo $label->qsos; } ?>">
<input name="label_qsos" type="number" min="1" max="40" step="1" class="form-control" id="label_qsos" required aria-describedby="font_sizeHelp" value="<?php if(isset($label->qsos)) { echo $label->qsos; } ?>">
</div>
</div>
<button type="submit" class="btn btn-primary"><i class="fas fa-plus-square"></i> Save Label Type</button>

View File

@@ -50,13 +50,13 @@
<div class="mb-3 row">
<label class="col-sm-2 col-form-label" for="width">Width of paper</label>
<div class="col-sm-4">
<input name="width" type="text" class="form-control" id="width" aria-describedby="widthHelp" value="<?php if(isset($paper->width)) { echo $paper->width; } ?>">
<input name="width" type="text" class="form-control" id="width" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" required aria-describedby="widthHelp" value="<?php if(isset($paper->width)) { echo $paper->width; } ?>">
<small id="widthHelp" class="form-text text-muted">Total width of paper.</small>
</div>
<label class="col-sm-2 col-form-label" for="height">Height of paper</label>
<div class="col-sm-4">
<input name="height" type="text" class="form-control" id="height" aria-describedby="heightHelp" value="<?php if(isset($paper->height)) { echo $paper->height; } ?>">
<input name="height" type="text" class="form-control" id="height" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" required aria-describedby="heightHelp" value="<?php if(isset($paper->height)) { echo $paper->height; } ?>">
<small id="heightHelp" class="form-text text-muted">Total width of paper.</small>
</div>
</div>