PC Gaming Shelter
An archive dedicated to preserving PC Gaming history and more

Form:Event: Difference between revisions

From PC Gaming Shelter
No edit summary
No edit summary
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{{info|add title=Add a new Event|edit title=Edit Event}}}
<noinclude>
{{#forminput: form=Event
|button text=Create or Edit Event Entry
|autocomplete on category=Events
|no autofocus
}}
{{DISPLAYTITLE: Add a New Event}}
</noinclude><includeonly>
{{{info|add title=Add a new Event Entry|edit title=Edit Event Entry}}}


{{{for template|Event}}}
{{{for template|Event}}}
<div class="game-form" style="max-width:800px; background:#fff; border:1px solid #ccc; padding:20px; font-family:sans-serif;">
{{form row
|{{{field
  |Image
  |input type=text
  |uploadable
  |class=form-control
}}}
|label=Cover Image:
|property=Image
}}
{{form row
|{{{field
  |Related game
  |input type=tokens
  |delimiter=,
  |values from category=Games
  |placeholder=e.g. Half-Life
  |class=form-control
}}}
|label=Game:
|property=Related game
}}
{{form row
|{{{field
  |Genre
  |input type=checkboxes
  |property=Has genre
  |delimiter=,
  |class=form-control
}}}
|label=Genre:
|property=Has genre
}}
{{form row
|{{{field
  |Has short description
  |input type=textarea
  |rows=3
  |class=form-control
}}}
|label=Short description:
|property=Has short description
}}


   <div style="font-size:1.5em; font-weight:bold; border-bottom:2px solid #2a4b8d; margin-bottom:20px;">
{{{field
    Add Gaming Event
   |Is recurring
   </div>
  |input type=checkbox
  |label=Recurring event
  |show on select=Yes=>recurring;Yes=>recurring-title;Yes=>recurring-start-info;Yes=>recurring-end-info;
}}}
<div id="recurring-title">
;Recurring Event
</div>
{{form row
|{{{field
  |Has start date
  |input type=datetimepicker
  |class=form-control
}}}
|label=Start date: <span id="recurring-start-info" class="text-warning">For recurring events, the start date of the series.</span>
|property=Has start date
}}
{{form row
|{{{field
  |Has end date
  |input type=datetimepicker
  |class=form-control
}}}
|label=End date: <span id="recurring-end-info" class="text-warning">For recurring events, the end date of the series. If not specified, max 100 recurring event instances will be created.</span>
|property=Has end date
}}
<div id="recurring">
{{form row
|{{{field
  |Recurring period
  |input type=regexp
  |regexp=/^\d*$/
  |message=Only integers!
  |mandatory
  |placeholder=1
  |default=1
  |size=2
  |class=form-control w-auto
}}} {{{field
  |Recurring unit
  |input type=dropdown
  |values=day,week,month,year
  |mandatory
  |default=month
  |placeholder=month
  |class=form-control
}}}
|label=Repeat every
}}
<div class="my-2">
If some occurrences do not follow the regular recurrence rule, you can explicitly include or exclude specific dates below. Enter one date per line in this format: <code>March 23, 2010 17:00</code>
</div>
<div class="d-flex" style="gap: .25rem">
{{form row
|{{{field
  |Exclude dates
  |input type=textarea
  |list
  |delimiter=\n
  |class=form-control
}}}
|label=Exclude dates:
}}
{{form row
|{{{field
  |Include dates
  |input type=textarea
  |list
  |delimiter=\n
   |class=form-control
}}}
|label=Include dates:
}}
</div>
</div>
{{form row
|{{{field
  |Has tag
  |input type=tokens
  |delimiter=,
  |class=form-control
}}}
|label=Tags:
|property=Has tag
}}


  <div style="margin-bottom:15px;">
== Links ==
    <strong>Event Name:</strong><br>
{{{field|Event links|holds template}}}
    {{{field|Name|input type=text|placeholder= Game Night|style=display:block; width:100%; height:34px; box-sizing:border-box; padding:5px; border:1px solid #ccc; border-radius:3px;}}}
{{{end template}}}
  </div>
{{{for template|Event link|multiple|embed in field=Event[Event links]|add button text=Add event link}}}
{{Link fields|Event links}}
{{{end template}}}


  <div style="margin-bottom:15px;">
    <strong>Start Date & Time:</strong><br>
    {{{field|Start date|input type=datetimepicker|style=display:block; width:100%; height:34px; box-sizing:border-box; border:1px solid #ccc; border-radius:3px;}}}
  </div>


  <div style="margin-bottom:15px;">
{{{standard input|save}}}  
    <strong>End Date & Time (Optional):</strong><br>
{{{standard input|preview}}}  
    {{{field|End date|input type=datetimepicker|style=display:block; width:100%; height:34px; box-sizing:border-box; border:1px solid #ccc; border-radius:3px;}}}
{{{standard input|cancel}}}
  </div>
</includeonly>
 
<div style="margin-bottom:15px;">
    <strong>Event Type:</strong><br>
    <div class="one-box-container">
    {{{field|Event type|input type=checkboxes|values=Casual Gaming, Tournament, Anniversary, Gaming|delimiter=,}}}
    </div>
  </div>
 
  <div style="margin-bottom:15px;">
    <strong>Related Game:</strong><br>
    {{{field|Related game|input type=text|autocomplete|values from category=Games|style=display:block; width:100%; height:34px; box-sizing:border-box; padding:5px; border:1px solid #ccc; border-radius:3px;}}}
  </div>
 
  <div style="margin-bottom:15px;">
    <strong>Description:</strong><br>
    {{{field|Description|input type=textarea|rows=5|style=width:100%; box-sizing:border-box;}}}
  </div>
 
  <div style="text-align:right; margin-top:20px;">
    {{{standard input|save}}} {{{standard input|preview}}}
  </div>
 
</div>
{{{end template}}}

Latest revision as of 19:10, 17 June 2026