Building/Form: can edit GPS if no gps set yet

This commit is contained in:
Frank Schubert
2021-07-20 20:21:09 +02:00
parent 136bd5641a
commit 550ee56cdc

View File

@@ -122,14 +122,14 @@
<div class="form-group row">
<label class="col-lg-4 col-form-label" for="gps_lat">GPS Länge (N)</label>
<div class="col-lg-8">
<input type="text" class="form-control" name="gps_lat" id="gps_lat" value="<?=$building->gps_lat?>" <?=($building->id) ? "readonly='readonly'" : ""?> />
<input type="text" class="form-control" name="gps_lat" id="gps_lat" value="<?=$building->gps_lat?>" <?=($building->gps_lat) ? "readonly='readonly'" : ""?> />
</div>
</div>
<div class="form-group row">
<label class="col-lg-4 col-form-label" for="gps_long">GPS Breite (E)</label>
<div class="col-lg-8">
<input type="text" class="form-control" name="gps_long" id="gps_long" value="<?=$building->gps_long?>" <?=($building->id) ? "readonly='readonly'" : ""?> />
<input type="text" class="form-control" name="gps_long" id="gps_long" value="<?=$building->gps_long?>" <?=($building->gps_lat) ? "readonly='readonly'" : ""?> />
</div>
</div>
@@ -350,6 +350,7 @@
function enableGpsInputs() {
$("#gps_lat").removeAttr("readonly");
$("#gps_long").removeAttr("readonly");
$("#edit-gps").remove();
}