<commit_before>﻿@using StockportWebapp.Config
@using StockportWebapp.Models
@using StockportWebapp.ViewModels
@model EventSubmission
@{
    ViewData["Title"] = "Add your event";
    ViewData["og:title"] = "Add your event";
    Layout = "../Shared/_Layout.cshtml";
    var controllerType = "Events";
    if (!string.IsNullOrEmpty(Model.GroupName))
    {
        controllerType = "Groups";
    }
}

@section Breadcrumbs {
    @if (!string.IsNullOrEmpty(Model.GroupName))
    {
        @Html.Partial("Breadcrumb", new List<Crumb> {new Crumb("Stockport Local", "groups", "Group"), new Crumb("Manage your groups", "manage", "groups"), new Crumb(Model.GroupName, "manage/" + Model.GroupSlug, "groups"), new Crumb("Manage your events", "manage/" + Model.GroupSlug + "/events/", "groups")})
    }
    else
    {
        @Html.Partial("Breadcrumb", new List<Crumb> {new Crumb("Events", "events", "events")})
    }
}

<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCPMO2lE7np9cG_zG63JH_pNVmRfoajZjg&libraries=places"></script>
<div class="grid-container-full-width">
    <div class="grid-container grid-100">
        <div class="l-body-section-filled mobile-grid-100 tablet-grid-100 grid-100">
            <section aria-label="" class="grid-100 mobile-grid-100">
                <div class="l-content-container">
                    <div class="grid-100">
                        <h1 tabindex="-1" id="content"> Add your event</h1>

                        @if (ViewBag.SubmissionError != null)
                        {
                            <div id="error-message-anchor"></div>
                            <div class="grid-100 tablet-grid-100 mobile-grid-100 alert alert-error contact-validation-error">
                                <div class="alert-icon">
                                    <i class="fa fa-exclamation fa-3x"></i>
                                </div>
                                <div class="alert-content grid-80 tablet-grid-80 mobile-grid-80">
                                    <h3>There has been a problem: </h3>
                                    <p>@Html.Raw(@ViewBag.SubmissionError)</p>
                                </div>
                            </div>
                        }
                        <noscript>
                            <div id="recaptchaJsError" class="grid-100 tablet-grid-100 mobile-grid-100 alert alert-error contact-validation-error">
                                <div class="alert-icon">
                                    <i class="fa fa-exclamation fa-3x"></i>
                                </div>
                                <div class="alert-content grid-80 tablet-grid-80 mobile-grid-80">
                                    <h3>There has been a problem: </h3>
                                    <p>For security reasons, you can’t use our contact forms with JavaScript turned off. Please enable JavaScript to use the form or alternatively send your enquiry to <EMAIL><br></p>
                                </div>
                            </div>
                        </noscript>

                        <form asp-controller=@controllerType asp-action="AddYourEvent" method="post" role="form" enctype="multipart/form-data">
                            <div class="form">
                                <div class="form-section">
                                    <fieldset>
                                        <label asp-for="@Model.Title"></label>
                                        <input class="grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 form-control" asp-for="@Model.Title" />
                                        <span role="alert" aria-atomic="true" asp-validation-for="@Model.Title" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>

                                        <label asp-for="@Model.Description"></label>
                                        <i class="small">
                                            <ul>
                                                <li>Let people know why they should visit your event</li>
                                                <li>Let people know how to get in touch</li>
                                            </ul>
                                        </i>
                                        <textarea asp-for="@Model.Description" class="grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 form-control-deep" title="Enter a Description"></textarea>
                                        <span role="alert" aria-atomic="true" asp-validation-for="@Model.Description" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>

                                        <label aria-labelledby="Location" asp-for="@Model.Location"></label>
                                        <i>For example: Cheadle Library, 23 Ashfield Rd, Cheadle, Stockport, SK8 1BB</i>
                                        <input type="text" id="location-autocomplete" class="grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 form-control location-search-input location-search-input-autoset" asp-for="@Model.Location" />
                                        <div style="visibility: hidden; position: absolute; top: -100px; left: -100px;">
                                            <input type="text" id="latitude" asp-for="@Model.Latitude" />
                                            <input type="text" id="longitude" asp-for="@Model.Longitude" />
                                        </div>

                                        <span role="alert" aria-atomic="true" asp-validation-for="@Model.Location" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>


                                        <label asp-for="@Model.EventDate"></label>
                                        <input type="date" class="grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 form-control datepicker" asp-for="@Model.EventDate" />
                                        <span role="alert" aria-atomic="true" asp-validation-for="@Model.EventDate" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>

                                        <label asp-for="@Model.StartTime"></label>
                                        <i>Format: hh:mm (24 hour clock)</i>
                                        <div class="clearfix"></div>
                                        <input type="time" class="grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 form-control" asp-for="@Model.StartTime" />
                                        <span role="alert" aria-atomic="true" asp-validation-for="@Model.StartTime" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>
                                        <label asp-for="@Model.EndTime"></label>

                                        <i>Format: hh:mm (24 hour clock)</i>
                                        <div class="clearfix"></div>
                                        <input type="time" class="grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 form-control" asp-for="@Model.EndTime" />
                                        <span role="alert" aria-atomic="true" asp-validation-for="@Model.EndTime" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>
                                        <div class="clearfix"></div>

                                        <div class="recurring-event-yn">
                                            <label>Is this a recurring event?</label>
                                            <ul class="radio-list">
                                                <li>
                                                    <label>
                                                        @Html.RadioButtonFor(_ => _.IsRecurring, false, new {@class = "schedule_multiple_events", @id= "RecurringEventYnNo" }) 
                                                        No
                                                    </label>
                                                </li>
                                                <li>
                                                    <label>
                                                        @Html.RadioButtonFor(_ => _.IsRecurring, true, new { @class = "schedule_multiple_events", @id= "RecurringEventYnYes" })
                                                        Yes
                                                    </label>
                                                </li>
                                            </ul>
                                        </div>

                                        <div class="schedule_multiple_events_inputs">
                                            <label asp-for="@Model.Frequency"></label>
                                            <ul class="radio-list">
                                                @foreach (var item in Model.Frequencylist.Keys)
                                                {
                                                    <li>
                                                        <label><input type="radio" value="@item" asp-for="Frequency"> @item</label>

                                                    </li>
                                                    if (!string.IsNullOrWhiteSpace(@Model.Frequencylist[item]))
                                                    {
                                                        <p>
                                                            <i>@Model.Frequencylist[item]</i>
                                                        </p>
                                                    }
                                                }
                                            </ul>
                                            <span role="alert" aria-atomic="true" asp-validation-for="@Model.Frequency" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>

                                            <label asp-for="@Model.EndDate"></label>
                                            <input type="date" class="grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 form-control datepicker" asp-for="@Model.EndDate" novalidate />
                                            <span role="alert" aria-atomic="true" asp-validation-for="@Model.EndDate" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>
                                        </div>

                                        <label asp-for="@Model.Fee"></label>
                                        <input class="grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 form-control" asp-for="@Model.Fee" />
                                        <span role="alert" aria-atomic="true" asp-validation-for="@Model.Fee" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>
                                        <label>Event categories</label>                                      
                                        <div class="grid-100 grid-parent category-div">
                                            <input type="hidden" asp-for="@Model.CategoriesList" />
                                            @Html.Partial("multiselect", new MultiSelect() { Limit = 3, Label = "Category", ValueControlId = "CategoriesList", AvailableValues = Model.BuildCategoryList() })
                                            <span role="alert" aria-atomic="true" asp-validation-for="@Model.CategoriesList" id="categoryListError" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>
                                        </div>
                                        <label asp-for="@Model.Image"></label>
                                        <i>
                                            Choose an image that captures your event
                                            <br />We recommend using at least 2160x1080px (2:1 ratio) image that's not larger than 5mb
                                            <br />Accepted file types: jpg, jpeg, gif and png
                                        </i><commit_msg><NAME>/Lydia #908 - Added aria labels to Location/Section/Categories<commit_after>﻿@using StockportWebapp.Config
@using StockportWebapp.Models
@using StockportWebapp.ViewModels
@model EventSubmission
@{
    ViewData["Title"] = "Add your event";
    ViewData["og:title"] = "Add your event";
    Layout = "../Shared/_Layout.cshtml";
    var controllerType = "Events";
    if (!string.IsNullOrEmpty(Model.GroupName))
    {
        controllerType = "Groups";
    }
}

@section Breadcrumbs {
    @if (!string.IsNullOrEmpty(Model.GroupName))
    {
        @Html.Partial("Breadcrumb", new List<Crumb> {new Crumb("Stockport Local", "groups", "Group"), new Crumb("Manage your groups", "manage", "groups"), new Crumb(Model.GroupName, "manage/" + Model.GroupSlug, "groups"), new Crumb("Manage your events", "manage/" + Model.GroupSlug + "/events/", "groups")})
    }
    else
    {
        @Html.Partial("Breadcrumb", new List<Crumb> {new Crumb("Events", "events", "events")})
    }
}

<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCPMO2lE7np9cG_zG63JH_pNVmRfoajZjg&libraries=places"></script>
<div class="grid-container-full-width">
    <div class="grid-container grid-100">
        <div class="l-body-section-filled mobile-grid-100 tablet-grid-100 grid-100">
            <section aria-label="Add your event" role="contentinfo" class="grid-100 mobile-grid-100">
                <div class="l-content-container">
                    <div class="grid-100">
                        <h1 tabindex="-1" id="content"> Add your event</h1>

                        @if (ViewBag.SubmissionError != null)
                        {
                            <div id="error-message-anchor"></div>
                            <div class="grid-100 tablet-grid-100 mobile-grid-100 alert alert-error contact-validation-error">
                                <div class="alert-icon">
                                    <i class="fa fa-exclamation fa-3x"></i>
                                </div>
                                <div class="alert-content grid-80 tablet-grid-80 mobile-grid-80">
                                    <h3>There has been a problem: </h3>
                                    <p>@Html.Raw(@ViewBag.SubmissionError)</p>
                                </div>
                            </div>
                        }
                        <noscript>
                            <div id="recaptchaJsError" class="grid-100 tablet-grid-100 mobile-grid-100 alert alert-error contact-validation-error">
                                <div class="alert-icon">
                                    <i class="fa fa-exclamation fa-3x"></i>
                                </div>
                                <div class="alert-content grid-80 tablet-grid-80 mobile-grid-80">
                                    <h3>There has been a problem: </h3>
                                    <p>For security reasons, you can’t use our contact forms with JavaScript turned off. Please enable JavaScript to use the form or alternatively send your enquiry to <EMAIL><br></p>
                                </div>
                            </div>
                        </noscript>

                        <form asp-controller=@controllerType asp-action="AddYourEvent" method="post" role="form" enctype="multipart/form-data">
                            <div class="form">
                                <div class="form-section">
                                    <fieldset>
                                        <label asp-for="@Model.Title"></label>
                                        <input class="grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 form-control" asp-for="@Model.Title" />
                                        <span role="alert" aria-atomic="true" asp-validation-for="@Model.Title" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>

                                        <label asp-for="@Model.Description"></label>
                                        <i class="small">
                                            <ul>
                                                <li>Let people know why they should visit your event</li>
                                                <li>Let people know how to get in touch</li>
                                            </ul>
                                        </i>
                                        <textarea asp-for="@Model.Description" class="grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 form-control-deep" title="Enter a Description"></textarea>
                                        <span role="alert" aria-atomic="true" asp-validation-for="@Model.Description" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>

                                        <label asp-for="@Model.Location"></label>
                                        <i>For example: Cheadle Library, 23 Ashfield Rd, Cheadle, Stockport, SK8 1BB</i>
                                        <input aria-labelledby="Location" type="text" id="location-autocomplete" class="grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 form-control location-search-input location-search-input-autoset" asp-for="@Model.Location" />
                                        <div style="visibility: hidden; position: absolute; top: -100px; left: -100px;">
                                            <input aria-labelledby="latitude" type="text" id="latitude" asp-for="@Model.Latitude" />
                                            <input aria-labelledby="longitude" type="text" id="longitude" asp-for="@Model.Longitude" />
                                        </div>

                                        <span role="alert" aria-atomic="true" asp-validation-for="@Model.Location" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>


                                        <label asp-for="@Model.EventDate"></label>
                                        <input type="date" class="grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 form-control datepicker" asp-for="@Model.EventDate" />
                                        <span role="alert" aria-atomic="true" asp-validation-for="@Model.EventDate" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>

                                        <label asp-for="@Model.StartTime"></label>
                                        <i>Format: hh:mm (24 hour clock)</i>
                                        <div class="clearfix"></div>
                                        <input type="time" class="grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 form-control" asp-for="@Model.StartTime" />
                                        <span role="alert" aria-atomic="true" asp-validation-for="@Model.StartTime" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>
                                        <label asp-for="@Model.EndTime"></label>

                                        <i>Format: hh:mm (24 hour clock)</i>
                                        <div class="clearfix"></div>
                                        <input type="time" class="grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 form-control" asp-for="@Model.EndTime" />
                                        <span role="alert" aria-atomic="true" asp-validation-for="@Model.EndTime" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>
                                        <div class="clearfix"></div>

                                        <div class="recurring-event-yn">
                                            <label>Is this a recurring event?</label>
                                            <ul class="radio-list">
                                                <li>
                                                    <label>
                                                        @Html.RadioButtonFor(_ => _.IsRecurring, false, new {@class = "schedule_multiple_events", @id= "RecurringEventYnNo" }) 
                                                        No
                                                    </label>
                                                </li>
                                                <li>
                                                    <label>
                                                        @Html.RadioButtonFor(_ => _.IsRecurring, true, new { @class = "schedule_multiple_events", @id= "RecurringEventYnYes" })
                                                        Yes
                                                    </label>
                                                </li>
                                            </ul>
                                        </div>

                                        <div class="schedule_multiple_events_inputs">
                                            <label asp-for="@Model.Frequency"></label>
                                            <ul class="radio-list">
                                                @foreach (var item in Model.Frequencylist.Keys)
                                                {
                                                    <li>
                                                        <label><input type="radio" value="@item" asp-for="Frequency"> @item</label>

                                                    </li>
                                                    if (!string.IsNullOrWhiteSpace(@Model.Frequencylist[item]))
                                                    {
                                                        <p>
                                                            <i>@Model.Frequencylist[item]</i>
                                                        </p>
                                                    }
                                                }
                                            </ul>
                                            <span role="alert" aria-atomic="true" asp-validation-for="@Model.Frequency" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>

                                            <label asp-for="@Model.EndDate"></label>
                                            <input type="date" class="grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 form-control datepicker" asp-for="@Model.EndDate" novalidate />
                                            <span role="alert" aria-atomic="true" asp-validation-for="@Model.EndDate" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>
                                        </div>

                                        <label asp-for="@Model.Fee"></label>
                                        <input class="grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 form-control" asp-for="@Model.Fee" />
                                        <span role="alert" aria-atomic="true" asp-validation-for="@Model.Fee" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>
                                        <label>Event categories</label>                                      
                                        <div class="grid-100 grid-parent category-div">
                                            <input aria-labelledby="categories" type="hidden" asp-for="@Model.CategoriesList" />
                                            @Html.Partial("multiselect", new MultiSelect() { Limit = 3, Label = "Category", ValueControlId = "CategoriesList", AvailableValues = Model.BuildCategoryList() })
                                            <span role="alert" aria-atomic="true" asp-validation-for="@Model.CategoriesList" id="categoryListError" class="form-field-validation-error grid-50 tablet-grid-50 suffix-50 tablet-suffix-50 mobile-grid-100 grid-parent"></span>
                                        </div>
                                        <label asp-for="@Model.Image"></label>
                                        <i>
                                            Choose an image that captures your event
                                            <br />We recommend using at least 2160x1080px (2:1 ratio) image that's not larger than 5mb
                                            <br />Accepted file types: jpg, jpeg, gif and png
                                        </i>
{'fraction_non_alphanumeric': 0.11288067122436296, 'fraction_numerical': 0.022801429459291485, 'mean_word_length': 1.1271585557299844, 'pattern_counts': {'":': 0, '<': 314, '<?xml version=': 0, '>': 318, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 298, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5325958', 'n_tokens_mistral': 5941, 'n_tokens_neox': 5374, 'n_words': 1175}