|
|
@@ -126,12 +126,24 @@ class Form {
|
|
|
$max = ($options->max ?? false) ? "max=\"$options->max\"" : "";
|
|
|
$max_length = ($options->maxLength ?? false) ? "maxlength=\"$options->maxLength\"" : "";
|
|
|
$step = $options->step ?? 1;
|
|
|
+ $prepend_text = $options->prependText ?? "";
|
|
|
|
|
|
?>
|
|
|
<div class="row mb-1">
|
|
|
<label class="col-sm-4 col-form-label" for="<?=$id?>"><?=htmlspecialchars($options->label)?></label>
|
|
|
<div class="col-sm">
|
|
|
- <input class="form-control" type="number" name="<?=$options->name?>" id="<?=$id?>" placeholder="<?=htmlspecialchars($placeholder)?>" value="<?=htmlspecialchars($value)?>" step="<?=$step?>" <?=$required?> <?=$min?> <?=$max?> <?=$max_length?> />
|
|
|
+ <div class="input-group">
|
|
|
+ <?php
|
|
|
+ if(!empty($prepend_text)) {
|
|
|
+ ?>
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text"><?=htmlspecialchars($prepend_text)?></span>
|
|
|
+ </div>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ <input class="form-control" type="number" name="<?=$options->name?>" id="<?=$id?>" placeholder="<?=htmlspecialchars($placeholder)?>" value="<?=htmlspecialchars($value)?>" step="<?=$step?>" <?=$required?> <?=$min?> <?=$max?> <?=$max_length?> />
|
|
|
+ </div>
|
|
|
<?php
|
|
|
if($help_text) {
|
|
|
?>
|