All files / src/app/extensions/quickorder/shared/quickorder-csv-form quickorder-csv-form.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 462x                                                                                          
<div class="mt-4">
  <h2 class="h3">{{ 'quickorder.page.csv.title' | translate }}</h2>
  <p>{{ 'quickorder.page.csv.subtitle' | translate }}</p>
  <form
    [formGroup]="csvForm"
    (ngSubmit)="addCsvToCart()"
    [attr.aria-label]="'quickorder.page.csv.form.label' | translate"
  >
    <div class="form-group section">
      <input
        type="file"
        name="csvFile"
        id="CSVFile"
        size="35"
        accept=".csv"
        (change)="uploadListener($event.target)"
        [attr.aria-label]="'quickorder.page.csv.file.upload.aria_label' | translate"
      />
      <div [ngSwitch]="status">
        <small *ngSwitchCase="'IncorrectInput'" class="has-error"
          ><span class="validation-message">{{ 'quickorder.page.csv.file.invalid.input' | translate }}</span></small
        >
        <small *ngSwitchCase="'InvalidFormat'" class="has-error"
          ><span class="validation-message">{{ 'quickorder.page.csv.file.invalid.format' | translate }}</span></small
        >
        <small *ngSwitchCase="'ValidFormat'" class="has-success"
          ><span class="validation-message">{{ 'quickorder.page.csv.file.uploaded' | translate }}</span></small
        >
        <small *ngSwitchDefault></small>
      </div>
      <small
        class="form-text"
        [innerHTML]="'quickorder.page.csv.sample' | translate : { '0': 'assets/sample-data/quickorder.csv' }"
      ></small>
    </div>
    <div>
      <button type="submit" class="btn btn-primary" name="addToCartCSV" [disabled]="isCsvDisabled">
        {{ 'quickorder.page.add.cart' | translate }}
      </button>
      <button type="reset" class="btn btn-link" name="reset" (click)="resetCsvProductArray()">
        {{ 'quickorder.page.csv.reset.form' | translate }}
      </button>
    </div>
  </form>
</div>