Started creating workflow

This commit is contained in:
Frank Schubert
2021-08-24 21:40:30 +02:00
parent 7ad852c4ef
commit 2e9d5d5767
22 changed files with 717 additions and 1 deletions

View File

@@ -0,0 +1,41 @@
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="wfitem_<?=$item->name?>">
<?=$item->label?>
<?=($item->required == 1) ? "*" : ""?>
</label>
<div class="col-lg-10">
<?php
switch($item->type) {
case "string":
include(realpath(dirname(__FILE__)."/items/")."/string.php");
break;
case "int":
include(realpath(dirname(__FILE__)."/items/")."/int.php");
break;
case "bool":
include(realpath(dirname(__FILE__)."/items/")."/bool.php");
break;
case "enum":
include(realpath(dirname(__FILE__)."/items/")."/enum.php");
break;
case "text":
include(realpath(dirname(__FILE__)."/items/")."/text.php");
break;
case "file":
include(realpath(dirname(__FILE__)."/items/")."/file.php");
break;
case "gps":
include(realpath(dirname(__FILE__)."/items/")."/gps.php");
break;
case "color":
include(realpath(dirname(__FILE__)."/items/")."/color.php");
break;
case "delimiter":
include(realpath(dirname(__FILE__)."/items/")."/delimiter.php");
break;
}
?>
</div>
</div>

View File

@@ -0,0 +1 @@
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>" value="<?=$item->value->value_string?>">

View File

@@ -0,0 +1 @@
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>" value="<?=$item->value->value_string?>">

View File

@@ -0,0 +1 @@
<hr />

View File

@@ -0,0 +1,21 @@
<?php
$options = [];
$options = explode(";", $item->typedata);
?>
<select class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>">
<option></option>
<?php foreach($options as $opt): ?>
<?php
$key = $opt;
$label = $opt;
if(strpos($opt, "=") !== false) {
$opt_parts = explode('=', $opt);
$key = $opt_parts[0];
$label = $opt_parts[1];
}
?>
<option value="<?=$key?>"><?=$label?></option>
<?php endforeach; ?>
</select>

View File

@@ -0,0 +1 @@
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>" value="<?=$item->value->value_string?>">

View File

@@ -0,0 +1,26 @@
<?php
$lat = "";
$long = "";
if($item->value_string) {
$gps_parts = explode(";", $item->value_string);
$lat = $gps_parts[0];
$long = $gps_parts[1];
}
?>
<div class="form-group row">
<label class="col-lg-1 col-form-label" for="wfitem_<?=$item->name?>_lat_<?=$building->id?>">GPS Breite:</label>
<div class="col-lg-6">
<input type="text" class="form-control" name="wfitem_<?=$item->name?>_lat" id="wfitem_<?=$item->name?>_lat_<?=$building->id?>" value="<?=$lat?>" placeholder="<?=str_replace(",", ".", TT_PLACEHOLDER_GPS_LAT)?>">
</div>
</div>
<div class="form-group row">
<label class="col-lg-1 col-form-label" for="wfitem_<?=$item->name?>_long_<?=$building->id?>">GPS Länge:</label>
<div class="col-lg-6">
<input type="text" class="form-control" name="wfitem_<?=$item->name?>_lat" id="wfitem_<?=$item->name?>_long_<?=$building->id?>" value="<?=$long?>" placeholder="<?=str_replace(",", ".", TT_PLACEHOLDER_GPS_LONG)?>">
</div>
</div>
<?php if($lat && $long): ?>
<a href="https://www.google.com/maps/search/?api=1&query=<?=$lat?>,<?=$long?>" target="_blank"><i class="fas fa-external-link-alt"></i> Auf Google Maps öffnen</a>
<?php endif; ?>

View File

@@ -0,0 +1 @@
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>" value="<?=$item->value->value_string?>">

View File

@@ -0,0 +1 @@
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>" value="<?=$item->value->value_string?>" placeholder="<?=$item->placeholder?>">

View File

@@ -0,0 +1 @@
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>" value="<?=$item->value->value_string?>">