All files / src/app/pages/checkout-address/checkout-address-anonymous checkout-address-anonymous.component.html

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 802x                                                                                                                                                              
<div class="row">
  <!-- Error message -->
  <div class="col-md-12">
    <ish-error-message [error]="error" [toast]="false" />
  </div>
 
  <!-- login -->
  <div class="col-lg-6">
    <h2>{{ 'checkout.account.login.returning_customer.heading' | translate }}</h2>
    <ish-identity-provider-login />
  </div>
 
  <div class="col-lg-6">
    <!-- registration -->
    <div class="section">
      <h2>{{ 'account.new_user.heading' | translate }}</h2>
      <p>{{ 'account.create.benefit.text' | translate }}</p>
      <ul>
        <li>{{ 'account.create.benefit1.text' | translate }}</li>
        <li>{{ 'account.create.benefit2.text' | translate }}</li>
        <li>{{ 'account.create.benefit3.text' | translate }}</li>
        <li>{{ 'account.create.benefit4.text' | translate }}</li>
        <li>{{ 'account.create.benefit5.text' | translate }}</li>
      </ul>
      <a
        class="btn btn-secondary"
        routerLink="/register"
        [queryParams]="{ returnUrl: '/checkout', cancelUrl: '/checkout' }"
        data-testing-id="registration-link"
        >{{ 'account.create.button.label' | translate }}
      </a>
    </div>
 
    <!-- checkout as guest -->
    <div *ishFeature="'guestCheckout'">
      <h2>{{ 'checkout.addresses.checkout_as_guest.heading' | translate }}</h2>
      <p>{{ 'checkout.address.anonymous.guestcheckout.text' | translate }}</p>
      <button
        *ngIf="isAddressFormCollapsed"
        class="btn btn-secondary"
        type="button"
        (click)="showAddressForm()"
        [attr.aria-expanded]="!isAddressFormCollapsed"
        aria-controls="collapseBasic"
        data-testing-id="guest-checkout-button"
      >
        {{ 'checkout.addresses.checkout_as_guest.heading' | translate }}
      </button>
 
      <!-- create address form -->
      <div
        id="collapseBasic"
        class="section"
        [ngbCollapse]="isAddressFormCollapsed"
        data-testing-id="create-address-form"
      >
        <form
          #addressForm="ngForm"
          [formGroup]="form"
          (ngSubmit)="submitAddressForm()"
          class="form-horizontal"
          novalidate="novalidate"
        >
          <ish-checkout-address-anonymous-form [parentForm]="form" />
          <div [ngClass]="{ 'row form-group': isShippingAddressFormExpanded }">
            <div [ngClass]="{ 'offset-md-4 col-md-8': isShippingAddressFormExpanded }">
              <button class="btn btn-primary" type="submit" [disabled]="nextDisabled">
                {{ 'checkout.button.label' | translate }}
              </button>
              <button (click)="cancelAddressForm()" type="button" class="btn btn-secondary">
                {{ 'checkout.address.cancel.button.label' | translate }}
              </button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>