-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1296 from BCStudentSoftwareDevTeam/eventtoggles
Create Events Page: Split the toggle buttons into 2 sections, and make one of 3 toggles required
- Loading branch information
Showing
3 changed files
with
64 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.toggleHeader{ | ||
padding-bottom: 10px; | ||
font-weight: bold; | ||
text-align: center; | ||
margin-left: 50%; /* Position the header at 50% of the viewport width */ | ||
transform: translateX(-50%); | ||
width: 200px | ||
} | ||
.columnDivide{ | ||
flex: 1; | ||
border-left: 2px solid grey; | ||
margin-left: 10px; | ||
margin-right: -30px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ | |
{% block styles %} | ||
{{super()}} | ||
<link href="https://cdn.jsdelivr.net/gh/kartik-v/[email protected]/css/fileinput.min.css" media="all" rel="stylesheet" type="text/css" /> | ||
<link rel="stylesheet" href="/static/css/createEvent.css"> | ||
{% endblock %} | ||
|
||
{% block app_content %} | ||
|
@@ -59,10 +60,7 @@ <h1>{{page_title}}</h1> | |
|
||
<div class="form-group mb-4"> | ||
<label class="required form-label" for='inputEventLocation-{{pageLocation}}'><strong>Location</strong></label> | ||
<input class="form-control" id='inputEventLocation-{{pageLocation}}' placeholder="Enter location" name="location" required> | ||
{% if eventData.location %} | ||
value="{{eventData.location}}" | ||
{% endif %} | ||
<input class="form-control" id='inputEventLocation-{{pageLocation}}' placeholder="Enter location" name="location" value="{{eventData.location}}" required> | ||
</div> | ||
<!-- Start and End Datepickers --> | ||
<div class="row col-md-12"> | ||
|
@@ -134,7 +132,7 @@ <h1>{{page_title}}</h1> | |
<div class="row p-2"> | ||
<div class="col-md-6"> | ||
{% if eventData.id %} | ||
<input type="hidden" name="id" value="{{eventData.id}}"> | ||
<input type="hidden" id="newEventID" name="id" value="{{eventData.id}}"> | ||
{% endif %} | ||
<div class="form-group mb-4"> | ||
<label class="required form-label" for='inputEventName'><strong>Event Name</strong></label> | ||
|
@@ -233,35 +231,42 @@ <h1>{{page_title}}</h1> | |
</div> | ||
{% if page_title != 'Create All Volunteer Training' %} | ||
<div class="pt-4 mb-4"> | ||
<div class="row col-md-12"> | ||
<div class="form-group col-md-6"> | ||
<div class="row"> | ||
<div class="form-group col-xl-5"> | ||
<label class="label toggleHeader">(Optional)</label> | ||
<div class="form-check form-switch mb-2"> | ||
<label class="custom-control-label" for='checkRSVP'><strong>This event requires RSVP.</strong></label> | ||
<input class="form-check-input" type="checkbox" id="checkRSVP" name="isRsvpRequired" {{"checked" if eventData.isRsvpRequired}}/> | ||
</div> | ||
</div> | ||
<div class="form-group col-md-6"> | ||
<div class="form-check form-switch "> | ||
<label class="custom-control-label" for="checkIsTraining"><strong>This event is a training.</strong></label> | ||
<input class="form-check-input" type="checkbox" id="checkIsTraining" name="isTraining" {{"checked" if eventData.isTraining}}/> | ||
</div> | ||
</div> | ||
<div class="form-group col-md-6 mb-3"> | ||
<div class="form-check form-switch"> | ||
{% set hide = "" if eventData.isRsvpRequired else "display: none" %} | ||
<div class="form-group" id="limitGroup" style= "{{hide}}"> | ||
<label class="form-label mt-2" for='limitRsvp'><strong>Attendance Limit</strong></label> | ||
<input class="form-control mb-2" type="number" id="limitRsvp" name="rsvpLimit" value="{{eventData.rsvpLimit}}" min="0" placeholder="No Limit" pattern="^[0-9]+$"></input> | ||
<div class="form-group mb-3"> | ||
<div class="form-check form-switch"> | ||
{% set hide = "" if eventData.isRsvpRequired else "display: none" %} | ||
<div class="form-group" id="limitGroup" style= "{{hide}}"> | ||
<label class="form-label mt-2" for='limitRsvp'><strong>Attendance Limit</strong></label> | ||
<input class="form-control mb-2" type="number" id="limitRsvp" name="rsvpLimit" value="{{eventData.rsvpLimit}}" min="0" placeholder="No Limit" pattern="^[0-9]+$"></input> | ||
</div> | ||
<label class="custom-control-label" for="checkFood"><strong>This event will provide food.</strong></label> | ||
<input class="form-check-input" type="checkbox" id="checkFood" name="isFoodProvided" {{"checked" if eventData.isFoodProvided}}/> | ||
</div> | ||
<label class="custom-control-label" for="checkFood"><strong>This event will provide food.</strong></label> | ||
<input class="form-check-input" type="checkbox" id="checkFood" name="isFoodProvided" {{"checked" if eventData.isFoodProvided}}/> | ||
</div> | ||
</div> | ||
<div class="form-group col-md-6"> | ||
<div class="col-xl-1 columnDivide"></div> | ||
<div class="form-group col-xl-6"> | ||
<label class="label required toggleHeader">(Must Select One)</label> | ||
<div class="form-check form-switch"> | ||
<label class="custom-control-label" for="checkIsTraining"><strong>This event is a training.</strong></label> | ||
<input class="form-check-input" type="checkbox" id="checkIsTraining" name="isTraining" {{"checked" if eventData.isTraining}}/> | ||
</div> | ||
<div class="form-check form-switch"> | ||
<label class="custom-control-label" for='checkServiceHours'><strong>This event earns service hours.</strong></label> | ||
<input class="form-check-input" type="checkbox" id="checkServiceHours" name="isService" {{"checked" if eventData.isService}}/> | ||
</div> | ||
{% if eventData['program'].isBonnerScholars %} | ||
<div class="form-check form-switch"> | ||
<label class="custom-control-label" for='checkBonners'><strong>This is a Bonner Scholars event.</strong></label> | ||
<input class="form-check-input" type="checkbox" id="checkBonners" name="isBonnersChecked" {{"checked" if eventData['program'].isBonnerScholars and not eventData.isService and not eventData.isTraining}}/> | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
|