summaryrefslogtreecommitdiff
path: root/views/partials/importeventform.handlebars
blob: 13fd2aca9e4a5d8fbe0cc08700656263059886d1 (plain)
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
<h4 class="mb-2">Import an existing event</h4>
<p>
  Upload an .ics file here to instantly create an event. You can save a Facebook event as an .ics file by clicking on the context menu next to the 'Import' and 'Edit' buttons on the event page and choosing the 'Export Event' option. Then select the 'Save to calendar' option and save the file on your computer.
</p>

<img class="img-thumbnail mb-3 d-block mx-auto" src="/images/facebook-export.png" alt="Image showing the location of the export option on Facebook" />

<form id="icsImportForm" enctype="multipart/form-data" x-data="importEventForm()" @submit.prevent="submitForm">
  <div class="form-group">
    <div class="custom-file" id="icsImportContainer">
    <input required name="icsImportControl" type="file" class="custom-file-input" id="icsImportControl" aria-describedby="fileHelp" accept="text/calendar" x-ref="icsImportControl"/>
    <label name="icsImportLabel" class="custom-file-label" id="icsImportLabel" for="icsImportControl">
       <i class="far fa-file-alt"></i> Select file
    </label>
  </div>
  </div>
  <div class="form-group">
    <label for="creatorEmail" class="form-label">Your email</label>
    <div class="form-group">
      <input type="email" class="form-control" id="importCreatorEmail" name="creatorEmail" placeholder="Will not be shown anywhere (optional)." x-model="data.creatorEmail" >
    <small class="form-text">If you provide your email, we will send your secret editing password here, and use it to notify you of updates to the event.</small>
    </div>
  </div>
  <div class="form-group">
    <div class="col-12">
      <div
        class="alert alert-danger"
        role="alert"
        x-show="errors.length > 0"
      >
        <p><i class="fas fa-exclamation-triangle"></i> Please fix these errors:</p>
        <ul>
          <template x-for="error in errors">
            <li x-text="error.message"></li>
          </template>
        </ul>
      </div>
    </div>
  </div>
  <button type="submit" class="d-block mt-3 mx-auto btn btn-primary w-50 mb-4">Import</button>
</form>