|
|
@@ -74,9 +74,11 @@ class Form {
|
|
|
$value = $options->value ?? http::value($options->name);
|
|
|
$required = ($options->required ?? false) ? "required" : "";
|
|
|
?>
|
|
|
- <div class="form-group">
|
|
|
- <label for="<?=$id?>"><?=htmlspecialchars($options->label)?></label>
|
|
|
- <input class="form-control" type="text" name="<?=$options->name?>" id="<?=$id?>" placeholder="<?=htmlspecialchars($placeholder)?>" value="<?=htmlspecialchars($value)?>" <?=$required?> />
|
|
|
+ <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="text" name="<?=$options->name?>" id="<?=$id?>" placeholder="<?=htmlspecialchars($placeholder)?>" value="<?=htmlspecialchars($value)?>" <?=$required?> />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<?php
|
|
|
}
|
|
|
@@ -87,19 +89,21 @@ class Form {
|
|
|
$required = ($options->required ?? false) ? "required" : "";
|
|
|
|
|
|
?>
|
|
|
- <div class="form-group">
|
|
|
- <label for="<?=$id?>"><?=htmlspecialchars($options->label)?></label>
|
|
|
- <select class="form-control" name="<?=$options->name?>" id="<?=$id?>" <?=$required?>>
|
|
|
- <?php
|
|
|
- foreach($options->values as $index => $value) {
|
|
|
- $display = $options->displayStrings[$index];
|
|
|
- $selected = ($selected_value === strval($value)) ? "selected" : "";
|
|
|
- ?>
|
|
|
- <option value="<?=htmlspecialchars($value)?>" <?=$selected?>><?=htmlspecialchars($display)?></option>
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label" for="<?=$id?>"><?=htmlspecialchars($options->label)?></label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <select class="form-control" name="<?=$options->name?>" id="<?=$id?>" <?=$required?>>
|
|
|
<?php
|
|
|
- }
|
|
|
- ?>
|
|
|
- </select>
|
|
|
+ foreach($options->values as $index => $value) {
|
|
|
+ $display = $options->displayStrings[$index];
|
|
|
+ $selected = ($selected_value === strval($value)) ? "selected" : "";
|
|
|
+ ?>
|
|
|
+ <option value="<?=htmlspecialchars($value)?>" <?=$selected?>><?=htmlspecialchars($display)?></option>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<?php
|
|
|
}
|
|
|
@@ -109,9 +113,11 @@ class Form {
|
|
|
$placeholder = "Enter " . strtolower($options->label);
|
|
|
$required = ($options->required ?? false) ? "required" : "";
|
|
|
?>
|
|
|
- <div class="form-group">
|
|
|
- <label for="<?=$id?>"><?=htmlspecialchars($options->label)?></label>
|
|
|
- <input class="form-control-file" type="file" name="<?=$options->name?>" id="<?=$id?>" accept="image/*" capture="camera" <?=$required?> />
|
|
|
+ <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-file" type="file" name="<?=$options->name?>" id="<?=$id?>" accept="image/*" capture="camera" <?=$required?> />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<?php
|
|
|
}
|
|
|
@@ -122,9 +128,11 @@ class Form {
|
|
|
$value = $options->value ?? http::value($options->name);
|
|
|
$required = ($options->required ?? false) ? "required" : "";
|
|
|
?>
|
|
|
- <div class="form-group">
|
|
|
- <label for="<?=$id?>"><?=htmlspecialchars($options->label)?></label>
|
|
|
- <textarea class="form-control" name="<?=$options->name?>" id="<?=$id?>" placeholder="<?=htmlspecialchars($placeholder)?>" rows="4" <?=$required?>><?=htmlspecialchars($value)?></textarea>
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label" for="<?=$id?>"><?=htmlspecialchars($options->label)?></label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <textarea class="form-control" name="<?=$options->name?>" id="<?=$id?>" placeholder="<?=htmlspecialchars($placeholder)?>" rows="4" <?=$required?>><?=htmlspecialchars($value)?></textarea>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<?php
|
|
|
}
|