| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?php
- namespace App;
- /**
- * @var Address $address
- */
- if(!$address->hasGeolocation()) {
- $latitude = "";
- $longitude = "";
- }
- else {
- $latitude = $address->latitude;
- $longitude = $address->longitude;
- }
- ?>
- <input type="hidden" name="latitude" value="<?=htmlspecialchars($latitude)?>" />
- <input type="hidden" name="longitude" value="<?=htmlspecialchars($longitude)?>" />
- <h4><?=htmlspecialchars(__("Address"))?></h4>
- <div class="mb-3">
- <label class="form-label" for="address-1"><?=htmlspecialchars(__("Address Line 1"))?></label>
- <input class="form-control" type="text" id="address-1" name="address_1" placeholder="<?=htmlspecialchars(__("Type address line 1"))?>" value="<?=htmlspecialchars($address->address_1)?>" />
- </div>
- <div class="mb-3">
- <label class="form-label" for="address-2"><?=htmlspecialchars(__("Address Line 2"))?></label>
- <input class="form-control" type="text" id="address-2" name="address_2" placeholder="<?=htmlspecialchars(__("Type address line 2"))?>" value="<?=htmlspecialchars($address->address_2)?>" />
- </div>
- <div class="mb-3">
- <label class="form-label" for="city"><?=htmlspecialchars(__("Town/City"))?></label>
- <input class="form-control" type="text" id="city" name="city" placeholder="<?=htmlspecialchars(__("Type town/city"))?>" value="<?=htmlspecialchars($address->city)?>" />
- </div>
- <div class="row">
- <div class="col-6">
- <div class="mb-3">
- <label class="form-label" for="county"><?=htmlspecialchars(__("County"))?></label>
- <input class="form-control" type="text" id="county" name="county" placeholder="<?=htmlspecialchars(__("Type county"))?>" value="<?=htmlspecialchars($address->county)?>" />
- </div>
- </div>
- <div class="col-6">
- <div class="mb-3">
- <label class="form-label" for="postal-code"><?=htmlspecialchars(__("Postcode"))?></label>
- <input class="form-control" type="text" id="postal-code" name="postal_code" placeholder="<?=htmlspecialchars(__("Type postcode"))?>" value="<?=htmlspecialchars($address->postal_code)?>" required />
- </div>
- </div>
- </div>
- <div class="row mb-3">
- <div class="col-6">
- <div class="mb-3">
- <label class="form-label" for="country"><?=htmlspecialchars(__("Country"))?></label>
- <select class="form-select" name="country" id="country">
- <option value=""><?=htmlspecialchars(__("Select Country"))?></option>
- <?php
- foreach(Address::getCountryOptions() as $value => $display) {
- ?>
- <option value="<?=$value?>" <?=Html::selected($value, $address->country)?>>
- <?=htmlspecialchars($display)?>
- </option>
- <?php
- }
- ?>
- </select>
- </div>
- </div>
- <div class="col-6 align-self-end">
- <div class="mb-3">
- <button id="plot-button" class="btn btn-primary" type="button">
- <i class="fa fa-fw fa-crosshairs"></i>
- <?=htmlspecialchars(__("Plot on Map"))?>
- </button>
- </div>
- </div>
- </div>
- <div class="mb-3" id="address-map" style="height: 320px; background: #eee;" data-latitude="<?=htmlspecialchars($latitude)?>" data-longitude="<?=htmlspecialchars($longitude)?>">
- </div>
|