Auto Calculating LAEA and code in Building::save

This commit is contained in:
Frank Schubert
2021-07-15 19:09:29 +02:00
parent dc56881ddd
commit e77dd8b263
6 changed files with 119 additions and 5 deletions

View File

@@ -90,7 +90,7 @@
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="code">Objekt ID</label>
<div class="col-lg-10">
<input type="text" class="form-control" name="code" id="code" value="<?=$building->code?>" />
<input type="text" class="form-control" name="code" id="code" value="<?=$building->code?>" readonly="readonly" />
</div>
</div>
@@ -131,6 +131,13 @@
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="laea">LAEA Koordinaten</label>
<div class="col-lg-10">
<input type="text" class="form-control" name="laea" id="laea" value="<?=$building->laea?>" readonly="readonly" />
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="contact">Kontakt</label>
<div class="col-lg-10">
@@ -159,6 +166,18 @@
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="status_id">Status</label>
<div class="col-lg-10">
<select class="select2 form-control " name="status_id" id="type_id" <?=(!$me->is("Admin")) ? "disabled='disabled'" : ""?>>
<option></option>
<?php foreach($statuses as $status): ?>
<option value="<?=$status->id?>" <?=($building->status_id == $status->id) ? "selected='selected'" : ""?>><?=__($status->name)?></option>
<?php endforeach; ?>
</select>
</div>
</div>
</div>
</div>
@@ -195,7 +214,7 @@
<script type="text/javascript">
$("#network_id").select2({placeholder: ""});
$("#pop_id").select2({placeholder: ""});
$("#pop_id").select2({placeholder: "", allowClear: true,});
$("#type_id").select2({placeholder: ""});
// disable mousewheel on input number field when in focus