summaryrefslogtreecommitdiff
path: root/views/newevent.handlebars
blob: d8d2f289fa468e82d2f1dc9963c7ac342c346199 (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
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
<article>
<div class="container mb-4">
  <div class="row">
    <div class="col-sm-4 p-2">
      <button type="button" id="showNewEventFormButton" class="btn btn-secondary w-100"><i class="fas fa-calendar-day"></i> Create a new event</button>
    </div>
    <div class="col-sm-4 p-2">
      <button type="button" id="showImportEventFormButton" class="btn btn-secondary w-100"><i class="fas fa-file-import"></i> Import an existing event</button>
    </div>
    <div class="col-sm-4 p-2">
      <button type="button" id="showNewEventGroupFormButton" class="btn btn-secondary w-100"><i class="fas fa-calendar-alt"></i> Create a new event group </button>
    </div>
  </div>
</div>

<div class="alert alert-info mb-4 text-center" role="alert">
  <i class="fas fa-exclamation-circle"></i> Events are visible to anyone who knows the link.
</div>

<div id="newEventFormContainer">
  <h4 class="mb-2">Create an event</h4>
  <form
    id="newEventForm"
    enctype="multipart/form-data"
    x-data="newEventForm()"
    x-init="init()"
    @submit.prevent="submitForm"
    @event-group-id-changed="data.eventGroupID = $event.detail"
    @event-group-edit-token-changed="data.eventGroupEditToken = $event.detail"
  >
    {{>eventForm}}
    <div class="form-group row">
      <div class="col-sm-12 pt-3 pb-3 text-center">
        <button
          id="newEventFormSubmit"
          type="submit"
          class="btn btn-primary w-50"
          x-bind:disabled="submitting"
        >Create</button>
      </div>
    </div>
  </form>
</div>

<div id="importEventFormContainer">
  {{>importeventform}}
</div>

<div id="newEventGroupFormContainer">
  <h4 class="mb-2">Create an event group</h4>
  <p class="text-muted">An event group is a holding area for a set of linked events, like a recurring game night, a festival, or a band tour. You can share a public link to your event group just like an individual event link, and people who know the secret editing code will be able to add future events to the group.</p>
  <p class="text-muted">Event groups do not get automatically removed like events do, but events which have been removed from {{siteName}} will of course not show up in an event group.</p>
  <form id="newEventGroupForm" enctype="multipart/form-data" x-data="newEventGroupForm()" @submit.prevent="submitForm">
    {{> eventGroupForm }}
    <div class="form-group row">
      <div class="col-sm-12 pt-3 pb-3 text-center">
        <button type="submit" class="btn btn-primary w-50" x-bind:disabled="submitting">Create</button>
      </div>
    </div>
  </form>
</div>

</article>

<script src="/js/generate-timezones.js"></script>
<script src="/js/modules/new.js"></script>
<script src="/js/modules/group-linker.js"></script>