<div bsModal #createOrEditModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{backdrop: 'static'}">
    <div class="modal-dialog modal-md">
        <div class="modal-content">
            <form *ngIf="active" #addressForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span *ngIf="address.id">{{l("EditAddress")}}</span>
                        <span *ngIf="!address.id">{{l("CreateNewAddress")}}</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" aria-label="Close" [disabled]="saving">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">

					<!-- <div class="form-group m-form__group">
                        <label for="PostalCodeValue">{{l("PostalCode")}}</label>
                        <div class="input-group">
                            <input class="form-control" id="PostalCodeValue" name="postalCodeValue" [(ngModel)]="postalCodeValue" type="text" disabled>     
                            <div class="input-group-append">
                                <button class="btn btn-primary btn-pill blue" (click)="openSelectPostalCodeModal()" type="button"><i class="fa fa-search"></i> {{l("Pick")}}</button>
                            </div> <div class="input-group-prepend">
                                <button class="btn btn-danger btn-icon btn-pill" type="button" (click)="setPostalCodeIdNull()"><i class="fa fa-times"></i></button>
                            </div>
                        </div>
                    </div>
                    <input class="form-control" name="address.postalCodeId" [(ngModel)]="address.postalCodeId" type="text" required hidden>
		 
					<div class="form-group m-form__group">
                        <label for="GeocodeLatitude">{{l("Geocode")}}</label>
                        <div class="input-group">
                            <input class="form-control" id="GeocodeLatitude" name="geocodeLatitude" [(ngModel)]="geocodeLatitude" type="text" disabled>     
                            <div class="input-group-append">
                                <button class="btn btn-primary btn-pill blue" (click)="openSelectGeocodeModal()" type="button"><i class="fa fa-search"></i> {{l("Pick")}}</button>
                            </div> <div class="input-group-prepend">
                                <button class="btn btn-danger btn-pill btn-icon" type="button" (click)="setGeocodeIdNull()"><i class="fa fa-times"></i></button>
                            </div>
                        </div>
                    </div>
                    <input class="form-control" name="address.geocodeId" [(ngModel)]="address.geocodeId" type="text"  hidden>
		 
					<div class="form-group m-form__group">
                        <label for="AddressTypeName">{{l("AddressType")}}</label>
                        <div class="input-group">
                            <input class="form-control" id="AddressTypeName" name="addressTypeName" [(ngModel)]="addressTypeName" type="text" disabled>     
                            <div class="input-group-append">
                                <button class="btn btn-primary btn-pill blue" (click)="openSelectAddressTypeModal()" type="button"><i class="fa fa-search"></i> {{l("Pick")}}</button>
                            </div> <div class="input-group-prepend">
                                <button class="btn btn-danger btn-pill btn-icon" type="button" (click)="setAddressTypeIdNull()"><i class="fa fa-times"></i></button>
                            </div>
                        </div>
                    </div>
                    <input class="form-control" name="address.addressTypeId" [(ngModel)]="address.addressTypeId" type="text"  hidden>
		 

								<div class="form-group">
									<label for="Address_AddressLine1">{{l("AddressLine1")}} *</label>
									<input type="text" id="Address_AddressLine1" class="form-control" [(ngModel)]="address.addressLine1" name="AddressLine1"   minlength="1"  maxlength="255"  required/>
								</div>
					
								<div class="form-group">
									<label for="Address_AddressLine2">{{l("AddressLine2")}}</label>
									<input type="text" id="Address_AddressLine2" class="form-control" [(ngModel)]="address.addressLine2" name="AddressLine2"   minlength="1"  maxlength="255" />
								</div> -->
                    
                    <addressForm #addressForm [address]="address" [postalCodeId]="this.address.postalCodeId" [postalCodeValue]="this.postalCodeValue" [address]=""></addressForm>

                </div>
                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-default btn-pill" (click)="close()">{{l("Cancel")}}</button>
                    <button type="submit" class="btn btn-primary btn-pill blue"  [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i> <span>{{l("Save")}}</span></button>
                    <!--  -->
                </div>
            </form>
        </div>
    </div>
<!-- <addressPostalCodeLookupTableModal #addressPostalCodeLookupTableModal (modalSave)="getNewPostalCodeId()"></addressPostalCodeLookupTableModal>
		 <addressGeocodeLookupTableModal #addressGeocodeLookupTableModal (modalSave)="getNewGeocodeId()"></addressGeocodeLookupTableModal>
		 <addressAddressTypeLookupTableModal #addressAddressTypeLookupTableModal (modalSave)="getNewAddressTypeId()"></addressAddressTypeLookupTableModal> -->
		 
</div>