CINXE.COM

Submit Event

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Submit Event</title> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="expires" content="0" /> <!--TODO Merge all css & JS in a bundle after refacotring is done--> <script src="https://business.deltachamber.ca/ap/CountryRegions.js"></script> <link href="https://business.deltachamber.ca/GZContent/public/PublicLayoutV2?v=C6s6Q48ieAEQyO_VQdxHsooSV1dM7gpRJN_ApllC3Xg1" rel="stylesheet"/> <script src="https://business.deltachamber.ca/Scripts/PublicLayoutV2?v=OQDhEyqKZf9sX1UZ1K8HxzsU_jkLZ6SzWjbdc2ZTG7I1"></script> <!--Payment libs--> <script src="https://business.deltachamber.ca/public/js/paymentwidget/core2?v=2JXpxmFeapq_v8TKS1aJ-iIJVro_AhlGI1NLWWdwFKI1"></script> <script type="text/javascript" src="https://js.authorize.net/v1/Accept.js" charset="utf-8"></script> <!--[if lt IE 9]> <style>.ng-hide { display: none !important }</style> <![endif]--> </head> <link rel="stylesheet" href="/GZContent/MIC/css/mic.less?primary=%23144A8E&amp;secondary=%235B873C" /> <link href="/GZContent/css/public/events-registrations.css" rel="stylesheet" /> <link href="https://business.deltachamber.ca/public/css/mmp/core?v=hIj6QgGYRjwfpitUVZMw8OMzjlL-07w8MYEegl56ouI1" rel="stylesheet"/> <link href="https://business.deltachamber.ca/public/css/rich-text-editor?v=KUUgvDV8iMjR_WQyTuAbNBu9PRMdTGSueoDZx876KZU1" rel="stylesheet"/> <style> .SubmitEvent .panel-footer .footer-submit-button { float: right; display: inline; } .SubmitEvent .panel-footer { border: none; background-color: #fff; width: 100%; display: inline-block; } .SubmitEvent .panel-body > div { margin-bottom: 10px; } .SubmitEvent input[type=checkbox] { box-shadow: none; width: 34px; height: 34px; display: block; margin: 0; } .SubmitEvent .submissionMsg { background-color: lightgray; padding: 10px; margin-bottom: 20px; } .SubmitEvent .errorMsg { background-color: lightgray; padding: 10px; } .SubmitEvent .fa-exclamation-triangle { color: red; padding-right: 10px; } .SubmitEvent .ui-select-multiple span.ui-select-match-item { width: auto; border-color: rgb(170,170,170); background-color: #e4e4e4; } </style> <body id="mn-public-container" ng-app="app"> <input name="__RequestVerificationToken" type="hidden" value="CFfoovmEnU2Ndr0bQduXxQsC-AcirSaeKTGDgKjxZAeoDSlV_u9Oa5Zc8l-Pd_UrcqxVgktgr2lzaQ8c1uhOafQJohw1" /> <div class="container-fluid"> <div class="EventRegistration-top-border"></div> <div class="EventRegistration SubmitEvent"> <form id="form" name="mniForm"> <div class="container"> <div class="row RegistrationHeader"> <div id="page-logo-header" class="col-xs-12 col-sm-4 col-sm-push-8 clearfix tenant-logo"> <img class="img-responsive" style="max-width: 300px;max-height:150px;margin:auto;" title="Delta Chamber of Commerce" src="https://res.cloudinary.com/micronetonline/image/upload/c_crop,h_580,w_1100,x_0,y_0/v1613151886/tenants/48cbf0c7-c508-4e2c-9c60-42e60cccd6ab/9a8c4f9a3d814dbf9f0dbb6b650d601d/Chamber-logo-transparent-no-voice-of-business.png" alt="Delta Chamber of Commerce" /> </div> <div class="col-xs-12 col-sm-8 col-sm-pull-4 page-info "> <h1> <span class="">Events Calendar</span> </h1> <h4>Main Events Calendar</h4> </div> </div> <div ng-controller="SubmitEventCtrl as vm" class="SubmitEvent ng-cloak"> <div class="panel panel-default row"> <div class="panel-heading"> <div class="panel-title"><h3>My Information</h3></div> </div> <div class="panel-body"> <div class="form-group row" style="margin-bottom: 0"> <div class="col-sm-12"> <div class="form-group"> <div class="col-sm-4"> <label for="username">User Name</label> <input type="text" class="form-control" id="username" name="username" ng-model="vm.loginInfo.username"> </div> <div class="col-sm-4"> <label for="password1">Password</label> <input type="password" class="form-control" id="password1" name="password1" ng-model="vm.loginInfo.password" ng-class="{'loading' : vm.status.authInProgress}"> </div> <div class="col-sm-2"> <label class="control-label">&nbsp;</label> <button class="form-control btn-primary" ng-click="vm.login()" ng-disabled="vm.status.inProgress">Log In</button> </div> </div> <div class="form-group"> <div class="col-sm-12"> <p style="color: red" ng-if="vm.loginInfo.errorMessage">{{vm.loginInfo.errorMessage}}</p> </div> </div> <div class="form-group"> <div class="col-sm-12"> <p> <a ng-href="https://business.deltachamber.ca/MIC/Forgot" target="_blank">Forgot your User Name or Password?</a> </p> <p> <a ng-href="https://business.deltachamber.ca/MIC/create" target="_blank">Create an Account</a> </p> </div> </div> </div> </div> </div> </div> <div class="row panel panel-default" ng-show="!vm.status.hideSubmitEvent"> <div class="panel-heading"> <div class="panel-title"> <h3>Submit Event</h3> </div> </div> <div class="panel-body"> <h5 class="submissionMsg" ng-show="vm.model.EventId && !vm.status.showRecaptchaErrorMsg && !vm.status.showDateErrorMsg">Thank you for submitting an event. Your submission will be reviewed and approved in the near future. You may use this form to update your event.</h5> <h5 class="errorMsg" ng-show="vm.status.showRecaptchaErrorMsg"><i class="fas fa-exclamation-triangle"></i>Please verify that you have checked the “I'm not a robot” checkbox.</h5> <h5 class="errorMsg" ng-show="vm.status.showDateErrorMsg"><i class="fas fa-exclamation-triangle"></i>Please enter valid start and end dates.</h5> <div class="col-sm-12"> <label>Event Title</label> <input class="form-control" ng-model="vm.model.Title" name="eventTitle" ng-required="true" maxlength="255"> </div> <div class="col-sm-4"> <label>Start Date</label> <input type="date" class="form-control" ng-model="vm.model.StartDateTime" name="eventStartDate" ng-required="true"> <input type="time" class="form-control" ng-model="vm.model.StartDateTime" name="eventEndDate" ng-required="true"> </div> <div class="col-sm-4"> <label>End Date</label> <input type="date" class="form-control" ng-model="vm.model.EndDateTime" name="eventEndDate" ng-required="true"> <input type="time" class="form-control" ng-model="vm.model.EndDateTime" name="eventEndDate" ng-required="true"> </div> <div class="col-sm-2"> <label>All Day</label> <input type="checkbox" class="form-control" ng-model="vm.model.IsAllDay" name="eventIsAllDay"> </div> <div class="col-sm-12"> <label>Description</label> <div micronet-rich-text-editor id="eventDescription" contenteditable toolbar="Normal" toolbarInline="false" ng-model="vm.model.Description" class="rich-editor" placeholder="" showSignatures="False" showMergeField="False"></div> </div> <div class="col-sm-12"> <label>Location Description</label> <textarea micronet-rich-text-editor id="locationDescription" contenteditable toolbar="Normal" ng-model="vm.model.LocationDescription" class="rich-editor" placeholder="" showSignatures="False" showMergeField="False"></textarea> </div> <div class="col-sm-12"> <label>Date and Time Description</label> <div micronet-rich-text-editor id="hoursDescription" contenteditable toolbar="Normal" ng-model="vm.model.HoursDescription" class="rich-editor" placeholder="" showSignatures="False" showMergeField="False"></div> </div> <div class="col-sm-12"> <label>Fees/Admission</label> <div micronet-rich-text-editor id="pricingDescription" contenteditable toolbar="Normal" ng-model="vm.model.PricingDescription" class="rich-editor" placeholder="" showSignatures="False" showMergeField="False"></div> </div> <div class="col-sm-12"> <label>Contact Information</label> <textarea id="contactDescription" ng-model="vm.model.ContactDescription" class="form-control"></textarea> </div> <div class="col-sm-12"> <label>Contact Email</label> <input type="email" class="form-control" ng-model="vm.model.ContactEmailAddress" name="eventContactEmailAddress" ng-required="true"> </div> <div class="col-sm-12" ng-show="vm.model.CategoryItems.length"> <label>Categories</label> <div ui-select class="form-control category-selector" multiple ng-model="vm.model.SelectedCategoryItems" append-to-body="false"> <div ui-select-match placeholder="-- Select as many options as apply --"><span ng-bind="$item.Name"></span></div> <div ui-select-choices repeat="option as option in vm.model.CategoryItems"> <span ng-bind-html="option.Name"></span> </div> </div> </div> <div class="col-sm-12"> <div style="margin: 0 auto;"> <div vc-recaptcha key="'6LesdAsUAAAAAIJaNba6E4ScuAz4vFg-A7NY2aw8'" ng-model="ReCaptchaResponse" on-success="onReCaptchaResponse(response)" on-create="setWidgetId(widgetId)" on-expire="onReCaptchaExpiration()" captcharequired="true"></div> </div> </div> </div> <div class="panel-footer"> <div class="footer-submit-button"> <button id="submitEvent" type="submit" class="form-control btn-primary" ng-disabled="vm.status.inProgress" ng-click="vm.submitEvent()">Submit for Approval</button> </div> </div> </div> </div> </div> </form> </div> </div> <script> var app = angular .module('app', ['ngResource', 'ngCookies', 'ngSanitize', 'ui.bootstrap', 'vcRecaptcha', 'ui.select', 'typeaheadExtensions', 'selectize', 'micronet.datetime', 'angularMoment', 'angularFileUpload', 'LocalStorageModule', 'micronet.externalDs', 'micronet.imageManager', 'tmh.dynamicLocale']) .constant('currentCultureName', 'en-CA') .constant('angularMomentConfig', { timezone: "America/Vancouver" }) .run(["$rootScope", function($rootScope) { $rootScope.CurrentUserContactId = 0; $rootScope.IsLoggedIn = function() { return $rootScope.CurrentUserContactId > 0; } }]); app.config([ '$httpProvider', function ($httpProvider) { $httpProvider.interceptors.push(function () { return { request: function (data) { if (data.url.match(/\/api\//i)) { var token = Cookies.get("MMP.Auth.AccessToken"); if (token) { data.headers['Authorization'] = 'Bearer ' + token; } } return data; } }; }); } ]); app.config([ 'tmhDynamicLocaleProvider', 'currentCultureName', function (tmhDynamicLocaleProvider, currentCultureName) { tmhDynamicLocaleProvider.localeLocationPattern('/Scripts/angular-1.7.2/i18n/angular-locale_{{locale}}.js'); if (currentCultureName && currentCultureName != '') { tmhDynamicLocaleProvider.defaultLocale(currentCultureName); console.log('Current Angular.JS Culture (locale): ' + currentCultureName); } }]); app.value('imageDefaults', {"1":"/GZContent/images/generic-biz-image.png","2":"/GZContent/images/generic-profile-image.png","20":"/GZContent/images/generic-fam-image.png","4":"/GZContent/images/generic-event-image.png","7":"/GZContent/images/generic-product-image.png","8":"/GZContent/images/generic-membershipt-image.png","11":"/GZContent/images/generic-salesopportunity-image.png","14":"/GZContent/images/generic-category-item-image.png","3":"/GZContent/images/generic-category-item-image.png","15":"/GZContent/images/generic-report-image.png"}); app.value('imageDefaultIcons', {"1":"fa-building","2":"fa-user","20":"fa-users","4":"fa-calendar-alt","7":"fa-tag","8":"fa-tag","11":"fa-rocket","14":"fa-tag","3":"fa-tag","15":"fa-chart-line"}); app.value('imageUsages',[{"Usage":1,"Width":200,"Height":200,"Aspect":1,"Crop":3,"Module":null},{"Usage":2,"Width":100,"Height":100,"Aspect":1,"Crop":4,"Module":null},{"Usage":3,"Width":600,"Height":600,"Aspect":null,"Crop":3,"Module":null},{"Usage":4,"Width":200,"Height":200,"Aspect":null,"Crop":3,"Module":null},{"Usage":5,"Width":50,"Height":50,"Aspect":1,"Crop":2,"Module":null},{"Usage":6,"Width":80,"Height":80,"Aspect":1,"Crop":2,"Module":null},{"Usage":8,"Width":728,"Height":600,"Aspect":1,"Crop":0,"Module":null}]); $.ajaxSetup({ beforeSend: function (xhr, data) { if (data.url.match(/\/api\//i)) { var token = Cookies.get('MMP.Auth.AccessToken'); if (token) { xhr.setRequestHeader('Authorization', 'Bearer ' + token); } } } }); Number.prototype.toPrice = function(decimalPlaces) { if(false) { return this.toFixed(decimalPlaces); } else { return parseFloat(this.toFixed(4)); } }; <!-- en-CA --> </script> <script type="text/javascript"> app.constant('SubmitEvent', {"CalendarId":3497,"CalendarName":"Events Calendar","CalendarDescription":"Main Events Calendar","AllowPublicSubmission":true,"AllowMemberSubmission":true,"Title":null,"StartDate":"0001-01-01T00:00:00","EndDate":"0001-01-01T00:00:00","StartTime":null,"EndTime":null,"StartDateTime":null,"EndDateTime":null,"IsAllDay":false,"Description":null,"LocationDescription":null,"HoursDescription":null,"PricingDescription":null,"ContactDescription":null,"ContactEmailAddress":null,"ContactEmailAddressId":null,"CategoryItems":[{"IsSelected":false,"PreviouslySelected":false,"Id":0,"CategoryItemId":256796,"CategoryListId":17357,"ContactCategoryId":null,"DisplayOrder":0,"Type":"","Name":"12 @ 12","Parent":null},{"IsSelected":false,"PreviouslySelected":false,"Id":0,"CategoryItemId":256797,"CategoryListId":17357,"ContactCategoryId":null,"DisplayOrder":0,"Type":"","Name":"After 5","Parent":null},{"IsSelected":false,"PreviouslySelected":false,"Id":0,"CategoryItemId":256798,"CategoryListId":17357,"ContactCategoryId":null,"DisplayOrder":0,"Type":"","Name":"All candidates","Parent":null},{"IsSelected":false,"PreviouslySelected":false,"Id":0,"CategoryItemId":256799,"CategoryListId":17357,"ContactCategoryId":null,"DisplayOrder":0,"Type":"","Name":"Community","Parent":null},{"IsSelected":false,"PreviouslySelected":false,"Id":0,"CategoryItemId":256800,"CategoryListId":17357,"ContactCategoryId":null,"DisplayOrder":0,"Type":"","Name":"Delta Women","Parent":null},{"IsSelected":false,"PreviouslySelected":false,"Id":0,"CategoryItemId":256801,"CategoryListId":17357,"ContactCategoryId":null,"DisplayOrder":0,"Type":"","Name":"Economic Update","Parent":null},{"IsSelected":false,"PreviouslySelected":false,"Id":0,"CategoryItemId":256802,"CategoryListId":17357,"ContactCategoryId":null,"DisplayOrder":0,"Type":"","Name":"Golf Tournament","Parent":null},{"IsSelected":false,"PreviouslySelected":false,"Id":0,"CategoryItemId":256803,"CategoryListId":17357,"ContactCategoryId":null,"DisplayOrder":0,"Type":"","Name":"Hats Off Gala","Parent":null},{"IsSelected":false,"PreviouslySelected":false,"Id":0,"CategoryItemId":256804,"CategoryListId":17357,"ContactCategoryId":null,"DisplayOrder":0,"Type":"","Name":"Luncheon","Parent":null},{"IsSelected":false,"PreviouslySelected":false,"Id":0,"CategoryItemId":256805,"CategoryListId":17357,"ContactCategoryId":null,"DisplayOrder":0,"Type":"","Name":"Seminar","Parent":null},{"IsSelected":false,"PreviouslySelected":false,"Id":0,"CategoryItemId":256806,"CategoryListId":17357,"ContactCategoryId":null,"DisplayOrder":0,"Type":"","Name":"Simulcast","Parent":null},{"IsSelected":false,"PreviouslySelected":false,"Id":0,"CategoryItemId":256807,"CategoryListId":17357,"ContactCategoryId":null,"DisplayOrder":0,"Type":"","Name":"Teleseminar","Parent":null},{"IsSelected":false,"PreviouslySelected":false,"Id":0,"CategoryItemId":256808,"CategoryListId":17357,"ContactCategoryId":null,"DisplayOrder":0,"Type":"","Name":"Trade Show","Parent":null},{"IsSelected":false,"PreviouslySelected":false,"Id":0,"CategoryItemId":256809,"CategoryListId":17357,"ContactCategoryId":null,"DisplayOrder":0,"Type":"","Name":"Under 40","Parent":null}],"SelectedCategoryItems":null,"EventId":null,"EventDetailId":null,"AccountOptions":{"AccountCreationUrl":"https://business.deltachamber.ca/MIC/create","CanCreateAccount":true,"ForgotUsernameUrl":"https://business.deltachamber.ca/MIC/Forgot","IsSingleSignOnEnabled":false,"IsSAMLEnabled":false,"IsOIDCEnabled":false,"EnablePassiveSignOnForHub":false,"EnablePassiveSignOnForPublic":false,"IsSingleSignOnRequired":false,"SingleSignOnProviderName":"Sign in with Single Sign On","SAMLUrl":"/MIC/SamlLogin?a=0","OpenIdConnectUrl":"","OpenIdConnectLabel":"","SingleSignOnLogoutOverride":null,"SingleCallback":false},"ReCaptchaResponse":null,"DisableReCaptchaCheck":false}); app.constant('mergeFields', ''); app.constant('micronetImageManager', ''); </script> <script src="https://business.deltachamber.ca/public/js/jquery/core?v=yuMp_AiknJx1CClwZg1H_FF6IUxqQeDHAjt3qZKPvCs1"></script> <script> var MMP = MMP || {}; MMP.jQuery = jQuery.noConflict(true); var oauthUrlBuilder = 'https://business.deltachamber.ca:443/oauth/token?tenantKey=48cbf0c7-c508-4e2c-9c60-42e60cccd6ab'; var logoutUrl = '/authorization/Logout'; </script> <script src="https://business.deltachamber.ca/public/js/jqueryui-MMP/core?v=x5YhLxoN3Wis81EURwF-1saaFV8UAjYs1OBH54MjwJ81"></script> <script src="https://business.deltachamber.ca/public/js/rich-text-editor?v=PVlYYnGbGA5bQW3Dkuo9hrSLXvcN3DaEmGWT4dvo5Co1"></script> <script> function SubmitEventCtrl($scope, $http, $resource, SubmitEvent) { var vm = this; // data initialization vm.model = SubmitEvent; vm.model.StartDateTime = vm.model.StartDateTime == null ? null : new Date(vm.model.StartDateTime); vm.model.EndDateTime = vm.model.EndDateTime == null ? null : new Date(vm.model.EndDateTime); vm.loginInfo = { username: "", password: "", isLoggedIn: false, }; vm.status = { inProgress: false, showRecaptchaErrorMsg: false, showDateErrorMsg: false, form: { isOk: true }, hideSubmitEvent: vm.model.AllowMemberSubmission && !vm.model.AllowPublicSubmission && !vm.loginInfo.isLoggedIn, }; vm.submitEvent = function () { vm.status.inProgress = true; vm.status.showRecaptchaErrorMsg = false; vm.status.showDateErrorMsg = false; vm.model.ReCaptchaResponse = vm.recaptcha.response; if (validateForm()) { return $http.post('/api/public/events/submit/3497', vm.model) .then(function (d) { if (d.data.Status == 200) { reloadWithEventData(d.data.Data); } else { console.log(d.data); vm.status.inProgress = false; //display error message } }); } else { vm.status.inProgress = false; window.scrollTo(0, 0); } } $scope.forgeryKey = "__RequestVerificationToken"; vm.login = function () { vm.status.inProgress = true; $scope.crud.login({ grant_type: "password", username: vm.loginInfo.username, password: vm.loginInfo.password, client_id: 1, client_secret: document.getElementsByName($scope.forgeryKey)[0].value }) .$promise .then( function (resp) { Cookies.set('MMP.Auth.AccessToken', resp.access_token); window.location.reload(); }, function errorCallback(response) { vm.loginInfo.errorMessage = response.data.error_description; }) .finally(function () { vm.status.inProgress = false; }); } vm.singleSignOn = function () { window.location.href = '/MIC/SamlLogin?ReturnURL=' + encodeURIComponent(window.location.href); } vm.logout = function () { vm.status.inProgress = true; $scope.crud.logout() .$promise .then(function (response) { Cookies.remove('MMP.Auth.AccessToken'); window.location.reload(); }, function (response) { vm.loginInfo.errorMessage = "Error logging out"; }) .finally(function () { vm.status.inProgress = false; }); } function validateForm() { if (($scope.mniForm.$error.required && $scope.mniForm.$error.required.length > 0) || ($scope.mniForm.$error.email && $scope.mniForm.$error.email.length > 0)) { return false; } else if (vm.model.StartDateTime > vm.model.EndDateTime) { vm.status.showDateErrorMsg = true; return false; } else if (vm.recaptcha.response == null) { vm.status.showRecaptchaErrorMsg = true; return false; } else { return true; } } function reloadWithEventData(data) { window.location = '/ap/Event/Submit/' + data.HashedCalendarId + '/' + data.HashedEventId + '/' + data.HashedEventDetailId; } $scope.crud = $resource('', {}, { login: { url: window.oauthUrlBuilder, method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, transformRequest: function (obj) { var str = []; for (var p in obj) if (obj.hasOwnProperty(p)) str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); return str.join("&"); } }, logout: { url: window.logoutUrl, method: 'GET', transformResponse: function (response) { return { html: response }; } }, } ); //Recaptcha let recaptcha = vm.recaptcha = {}; recaptcha.widgetId = null; recaptcha.updateRequirment = function () { recaptcha.required = true; }; $scope.setWidgetId = function (widgetId) { recaptcha.widgetId = widgetId; }; $scope.onReCaptchaExpiration = function () { recaptcha.response = null; }; $scope.onReCaptchaResponse = function (response) { recaptcha.response = response; }; $scope.vcRecaptchaApiLoaded = function (response) { }; recaptcha.updateRequirment(); } // Parent application is created on the Shared/PublicLayout.cshtml app.controller('SubmitEventCtrl', ['$scope', '$http', '$resource', 'SubmitEvent', SubmitEventCtrl]) .constant('Enums', Enums); </script> </body> </html>