From 61af3ef40b9b3e41c30c9393040e0fe021979382 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 12 Dec 2022 14:20:49 +0000 Subject: [PATCH] v1.2.10.1 --- SaxoniteCoreWeb/Base/App/SaxLocaliser.cs | 16 +- .../Base/Controllers/SaxController_Base.cs | 3 +- SaxoniteCoreWeb/Base/Models/SaxModel_Base.cs | 25 +- .../OrganisationController-Ajax-Activation.cs | 2 +- .../OrganisationController-Ajax-Members.cs | 6 +- .../SystemController-Ajax-Database.cs | 14 +- .../Admin/Models/Model_System.cs | 1 + .../Localisation/SaxAdminProperties.resx | 3 + SaxoniteCoreWebAdmin/Views/Home/Index.cshtml | 37 +- SaxoniteCoreWebAdmin/wwwroot/js/sax-home.js | 35 +- SaxoniteCoreWebAdmin/wwwroot/js/sax-main.js | 4 + .../wwwroot/js/sax-org-ass.js | 4 +- .../Localisation/SaxOnlineProperties.resx | 16 +- .../AccountController-Ajax-Organisations.cs | 2 +- .../AccountController-Ajax-Sports.cs | 79 ++- .../Controllers/ApplicationController.cs | 81 +++ .../Controllers/SaxController_Online.cs | 8 +- .../Online/Models/Model_Account.cs | 14 +- .../Online/Models/Model_Application.cs | 25 + .../Online/Models/Model_UserSportContact.cs | 102 +++ .../Online/Models/SaxModel_Online.cs | 2 + .../Views/Account/Profile-Contact.cshtml | 4 +- .../Views/Account/Profile-Sports.cshtml | 30 +- .../Views/Application/Feedback.cshtml | 10 + .../Views/Application/Versions.cshtml | 10 + .../Views/Common/ContactMethods.cshtml | 1 - .../Views/Common/Sport-Contacts.cshtml | 119 ++-- .../Views/Shared/_Layout.cshtml | 16 +- .../wwwroot/css/sax-appl.css | 5 + SaxoniteCoreWebOnline/wwwroot/js/sax-appl.js | 14 + SaxoniteCoreWebOnline/wwwroot/js/sax-art.js | 4 +- SaxoniteCoreWebOnline/wwwroot/js/sax-main.js | 4 + .../wwwroot/js/sax-pro-elg.js | 4 +- .../wwwroot/js/sax-pro-spt.js | 34 +- .../wwwroot/js/sax-spt-cnt.js | 74 ++- SaxoniteStandardBase/Base/App/Sax-Version.cs | 3 +- SaxoniteStandardBase/Base/App/Sax.cs | 19 +- .../Base/App/SaxDbDfn_Core.cs | 10 +- .../Base/App/SaxDbDfn_Support.cs | 68 +- SaxoniteStandardBase/Base/App/SaxInternals.cs | 3 +- .../Base/App/SaxSystem-CodeTypes.cs | 33 +- SaxoniteStandardBase/Base/Bus/SaxUserSport.cs | 40 +- .../Base/Mgr/SaxAccountMgr-UserSport.cs | 25 +- SaxoniteStandardBase/Base/Mgr/SaxItemMgr.cs | 3 +- .../Data/Application/VersionHistory.json | 14 +- .../Dbas/Internal/Core/ActivityFeedback_Db.cs | 2 +- .../Dbas/Internal/Core/ActivityIndex_Db.cs | 2 +- .../Dbas/Internal/Core/Article_Db.cs | 2 +- .../Dbas/Internal/Core/ItemAddress_Db.cs | 2 +- .../Dbas/Internal/Core/ItemAssociation_Db.cs | 2 +- .../Dbas/Internal/Core/ItemImage_Db.cs | 2 +- .../Dbas/Internal/Core/ItemSport_Db.cs | 2 +- .../Internal/Core/OrganisationEvent_Db.cs | 2 +- .../Core/OrganisationOpportunity_Db.cs | 2 +- .../Dbas/Internal/Core/Organisation_Db.cs | 2 +- .../Dbas/Internal/Core/Region_Db.cs | 2 +- .../Dbas/Internal/Core/Sport_Db.cs | 2 +- .../Dbas/Internal/Core/UserAccount_Db.cs | 2 +- .../Dbas/Internal/Core/UserActivity_Db.cs | 2 +- .../Dbas/Internal/Core/UserConfig_Db.cs | 2 +- .../Dbas/Internal/Core/UserEligibility_Db.cs | 2 +- .../Dbas/Internal/Core/UserOnline_Db.cs | 2 +- .../Dbas/Internal/Core/UserOrganisation_Db.cs | 2 +- .../Dbas/Internal/Core/UserRole_Db.cs | 2 +- .../Dbas/Internal/Core/UserSession_Db.cs | 2 +- .../Internal/Core/UserSportExperience_Db.cs | 2 +- .../Dbas/Internal/Core/UserSport_Db.cs | 20 +- .../Internal/Support/UserReportComment_Db.cs | 224 +++++++ .../Dbas/Internal/Support/UserReport_Db.cs | 230 +++++++ .../Dbas/Mgr/SaxAccountMgr_Dbas-UserSport.cs | 37 +- .../Resources/Database/SaxDbDfn_Core.xml | 45 +- .../Resources/Database/SaxDbDfn_Support.xml | 599 +++++++++++++++++- 72 files changed, 2002 insertions(+), 221 deletions(-) create mode 100644 SaxoniteCoreWebOnline/Online/Controllers/ApplicationController.cs create mode 100644 SaxoniteCoreWebOnline/Online/Models/Model_Application.cs create mode 100644 SaxoniteCoreWebOnline/Online/Models/Model_UserSportContact.cs create mode 100644 SaxoniteCoreWebOnline/Views/Application/Feedback.cshtml create mode 100644 SaxoniteCoreWebOnline/Views/Application/Versions.cshtml create mode 100644 SaxoniteCoreWebOnline/wwwroot/css/sax-appl.css create mode 100644 SaxoniteCoreWebOnline/wwwroot/js/sax-appl.js create mode 100644 SaxoniteStandardDbas/Dbas/Internal/Support/UserReportComment_Db.cs create mode 100644 SaxoniteStandardDbas/Dbas/Internal/Support/UserReport_Db.cs diff --git a/SaxoniteCoreWeb/Base/App/SaxLocaliser.cs b/SaxoniteCoreWeb/Base/App/SaxLocaliser.cs index 392f340..2f34a6a 100644 --- a/SaxoniteCoreWeb/Base/App/SaxLocaliser.cs +++ b/SaxoniteCoreWeb/Base/App/SaxLocaliser.cs @@ -225,16 +225,22 @@ namespace Saxonite.Net.Core.Web.Base.App return GetCodeTypeCaption(Sax.CodeType.SportContactType, sportContactType); } - // Sport Participation. - public String GetSportParticipationCaption(Sax.SportParticipation participation) + // Sport Participating. + public String GetSportParticipatingCaption(Sax.SportParticipating participating) { - return GetCodeTypeCaption(Sax.CodeType.SportParticipation, participation); + return GetCodeTypeCaption(Sax.CodeType.SportParticipating, participating); + } + + // Sport Preparing. + public String GetSportPreparingCaption(Sax.SportPreparing preparing) + { + return GetCodeTypeCaption(Sax.CodeType.SportPreparing, preparing); } // Sport Officiating. - public String GetSportOfficiatingCaption(Sax.SportOfficiating participation) + public String GetSportOfficiatingCaption(Sax.SportOfficiating officiating) { - return GetCodeTypeCaption(Sax.CodeType.SportOfficiating, participation); + return GetCodeTypeCaption(Sax.CodeType.SportOfficiating, officiating); } // Region type. diff --git a/SaxoniteCoreWeb/Base/Controllers/SaxController_Base.cs b/SaxoniteCoreWeb/Base/Controllers/SaxController_Base.cs index 82b38bd..8e321e4 100644 --- a/SaxoniteCoreWeb/Base/Controllers/SaxController_Base.cs +++ b/SaxoniteCoreWeb/Base/Controllers/SaxController_Base.cs @@ -115,7 +115,8 @@ namespace Saxonite.Net.Core.Web.Base.Controllers public List DataItemTypeCodes { get { return Internals.DataItemTypeCodes; } } public List SportSpecialityLabelCodes { get { return Internals.SportSpecialityLabelCodes; } } public List SportContactTypeCodes { get { return Internals.SportContactTypeCodes; } } - public List SportParticipationCodes { get { return Internals.SportParticipationCodes; } } + public List SportParticipatingCodes { get { return Internals.SportParticipatingCodes; } } + public List SportPreparingCodes { get { return Internals.SportPreparingCodes; } } public List SportOfficiatingCodes { get { return Internals.SportOfficiatingCodes; } } public List RegionTypeCodes { get { return Internals.RegionTypeCodes; } } public List EligibilityTypeCodes { get { return Internals.EligibilityTypeCodes; } } diff --git a/SaxoniteCoreWeb/Base/Models/SaxModel_Base.cs b/SaxoniteCoreWeb/Base/Models/SaxModel_Base.cs index c1e64b1..ef94589 100644 --- a/SaxoniteCoreWeb/Base/Models/SaxModel_Base.cs +++ b/SaxoniteCoreWeb/Base/Models/SaxModel_Base.cs @@ -92,7 +92,8 @@ namespace Saxonite.Net.Core.Web.Base.Models public List YesNoCodes { get { return Internals.YesNoCodes; } } public List SportSpecialityLabelCodes { get { return Internals.SportSpecialityLabelCodes; } } public List SportContactTypeCodes { get { return Internals.SportContactTypeCodes; } } - public List SportParticipationCodes { get { return Internals.SportParticipationCodes; } } + public List SportParticipatingCodes { get { return Internals.SportParticipatingCodes; } } + public List SportPreparingCodes { get { return Internals.SportPreparingCodes; } } public List SportOfficiatingCodes { get { return Internals.SportOfficiatingCodes; } } public List RegionTypeCodes { get { return Internals.RegionTypeCodes; } } public List EligibilityTypeCodes { get { return Internals.EligibilityTypeCodes; } } @@ -345,7 +346,7 @@ namespace Saxonite.Net.Core.Web.Base.Models } } - /// List of Sport Participation options for dropdown. + /// List of Sport Speciality Labels for dropdown. public IEnumerable SportSpecialityLabelCodesForSelect { get @@ -358,14 +359,26 @@ namespace Saxonite.Net.Core.Web.Base.Models } } - /// List of Sport Participation options for dropdown. - public IEnumerable SportParticipationCodesForSelect + /// List of Sport Participating options for dropdown. + public IEnumerable SportParticipatingCodesForSelect { get { List values = new List(); - foreach (TypeCodeDesc sportParticipation in SportParticipationCodes) - values.Add(new SelectListItem(Localiser.GetSportParticipationCaption((Sax.SportParticipation)sportParticipation.Type), sportParticipation.Code)); + foreach (TypeCodeDesc sportParticipating in SportParticipatingCodes) + values.Add(new SelectListItem(Localiser.GetSportParticipatingCaption((Sax.SportParticipating)sportParticipating.Type), sportParticipating.Code)); + return values; + } + } + + /// List of Sport Preparing options for dropdown. + public IEnumerable SportPreparingCodesForSelect + { + get + { + List values = new List(); + foreach (TypeCodeDesc sportPreparing in SportPreparingCodes) + values.Add(new SelectListItem(Localiser.GetSportPreparingCaption((Sax.SportPreparing)sportPreparing.Type), sportPreparing.Code)); return values; } } diff --git a/SaxoniteCoreWebAdmin/Admin/Controllers/OrganisationController-Ajax-Activation.cs b/SaxoniteCoreWebAdmin/Admin/Controllers/OrganisationController-Ajax-Activation.cs index c3ac648..8048a63 100644 --- a/SaxoniteCoreWebAdmin/Admin/Controllers/OrganisationController-Ajax-Activation.cs +++ b/SaxoniteCoreWebAdmin/Admin/Controllers/OrganisationController-Ajax-Activation.cs @@ -75,7 +75,7 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers // Construct response. PopulateOrganisationResponseItemData(organisation, address, responseData.organisation); - GetOrganisationMembers(model, organisationId, responseData.Members); + GetOrganisationMembers(model, organisationId, responseData.Members, true); } // Complete response. diff --git a/SaxoniteCoreWebAdmin/Admin/Controllers/OrganisationController-Ajax-Members.cs b/SaxoniteCoreWebAdmin/Admin/Controllers/OrganisationController-Ajax-Members.cs index cf3ba8b..6d20c21 100644 --- a/SaxoniteCoreWebAdmin/Admin/Controllers/OrganisationController-Ajax-Members.cs +++ b/SaxoniteCoreWebAdmin/Admin/Controllers/OrganisationController-Ajax-Members.cs @@ -118,7 +118,7 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers responseData.DefaultStatusCode = SacsSystem.GetStatusCode(SaxUserOrganisation.DefaultStatus); // Get organisation members. - GetOrganisationMembers(model, organisationId, responseData.Members); + GetOrganisationMembers(model, organisationId, responseData.Members, false); if (model.Paging.IsPaged) model.Paging.ItemCount = (ushort)responseData.Members.Count; @@ -128,13 +128,13 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers responseData.Success = true; return Json(responseData); } - private void GetOrganisationMembers(SaxModel_Admin model, SysId organisationId, List members) + private void GetOrganisationMembers(SaxModel_Admin model, SysId organisationId, List members, bool inactiveOnly) { // Item filter. SaxUserOrganisation.Params prmUserOrganisation = new SaxUserOrganisation.Params(); prmUserOrganisation.OrganisationIdsIncluded.Add(organisationId); prmUserOrganisation.OrganisationMembersOnly = true; - prmUserOrganisation.UserAccountStatusCat = SaxUserAccount.StatusCat.NotDeleted; + prmUserOrganisation.UserAccountStatusCat = inactiveOnly ? SaxUserAccount.StatusCat.InactiveOnly : SaxUserAccount.StatusCat.NotDeleted; prmUserOrganisation.StatusCat = SaxUserOrganisation.StatusCat.NotDeleted; model.Paging.ItemTotal = (ulong)AccountMgr.GetUserOrganisationCount(prmUserOrganisation); model.PopulatePagingTo(prmUserOrganisation.ResultsPaging); diff --git a/SaxoniteCoreWebAdmin/Admin/Controllers/SystemController-Ajax-Database.cs b/SaxoniteCoreWebAdmin/Admin/Controllers/SystemController-Ajax-Database.cs index 44d6196..cf0a5c9 100644 --- a/SaxoniteCoreWebAdmin/Admin/Controllers/SystemController-Ajax-Database.cs +++ b/SaxoniteCoreWebAdmin/Admin/Controllers/SystemController-Ajax-Database.cs @@ -126,6 +126,8 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers { // Construction. public AjaxResponse_ValidateDatabaseSchema(SaxModel_Admin model) : base(model) { } + // Database instance. + public String Instance { get; set; } // Schema validation list. public List Items { get; } = new List(); } @@ -146,12 +148,20 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers using (DisposableCollection disposableItems = new DisposableCollection()) { + // Database instance. + Sax.Database databaseInstance = EnumUtil.ParseEnum(StringUtil.EmptyOnNull(model.DatabaseInstance), Sax.Database.Unknown); + if (databaseInstance <= 0) + return Json(responseData.SetMessage(messageTitle, "Database instance must be specified")); + responseData.Instance = databaseInstance.ToString(); + // Core Database connection. - ISacsDatabase db = Internals.CoreDatabase; + ISacsDatabase db = App.GetDatabase(SessionContext, databaseInstance); + if (db == null) + return Json(responseData.SetMessage(messageTitle, "Unrecognised database instance specified: " + model.DatabaseInstance)); // Retrieve XML database schema definition. var assembly = typeof(SaxSystem_Dbas).GetTypeInfo().Assembly; - String xmlSchema = SacsResourceHelper.GetManifestResourceAsText(assembly, "", "SaxDbDfn_Core.xml"); + String xmlSchema = SacsResourceHelper.GetManifestResourceAsText(assembly, "", "SaxDbDfn_" + databaseInstance.ToString() + ".xml"); if (StringUtil.IsEmpty(xmlSchema)) return Json(responseData.SetMessage(messageTitle, "Failed to extract XML schema definition.")); diff --git a/SaxoniteCoreWebAdmin/Admin/Models/Model_System.cs b/SaxoniteCoreWebAdmin/Admin/Models/Model_System.cs index 15c9d0c..843358c 100644 --- a/SaxoniteCoreWebAdmin/Admin/Models/Model_System.cs +++ b/SaxoniteCoreWebAdmin/Admin/Models/Model_System.cs @@ -19,6 +19,7 @@ namespace Saxonite.Net.Core.Web.Admin.Models //------------------------------------------------------------------- // Properties. + public String DatabaseInstance { get; set; } //------------------------------------------------------------------- // Database page properties. diff --git a/SaxoniteCoreWebAdmin/Localisation/SaxAdminProperties.resx b/SaxoniteCoreWebAdmin/Localisation/SaxAdminProperties.resx index b844789..6167029 100644 --- a/SaxoniteCoreWebAdmin/Localisation/SaxAdminProperties.resx +++ b/SaxoniteCoreWebAdmin/Localisation/SaxAdminProperties.resx @@ -699,6 +699,9 @@ System - Logs + + Support Database Schema + Database schema is valid. diff --git a/SaxoniteCoreWebAdmin/Views/Home/Index.cshtml b/SaxoniteCoreWebAdmin/Views/Home/Index.cshtml index 490060e..0cb94d0 100644 --- a/SaxoniteCoreWebAdmin/Views/Home/Index.cshtml +++ b/SaxoniteCoreWebAdmin/Views/Home/Index.cshtml @@ -51,8 +51,15 @@ -@* Database Schema *@ -
+ +@* Database Schema form. *@ +@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmDatabaseSchema" })) +{ + +} + +@* Database Schema - Core *@ +
@Localiser["system.caption.core.database.schema"]
@@ -77,3 +84,29 @@
+@* Database Schema - Support *@ +
+ +
+
@Localiser["system.caption.support.database.schema"]
+
+
+
+
+
+ @* Db Schema templates *@ +
+
+
@(Localiser["label.table"]):
+
+
+
@(Localiser["label.index"]):
+
@(Localiser["label.column"]):
+
+
+
+
+
+ +
+ diff --git a/SaxoniteCoreWebAdmin/wwwroot/js/sax-home.js b/SaxoniteCoreWebAdmin/wwwroot/js/sax-home.js index f7aa9db..7f462c8 100644 --- a/SaxoniteCoreWebAdmin/wwwroot/js/sax-home.js +++ b/SaxoniteCoreWebAdmin/wwwroot/js/sax-home.js @@ -35,7 +35,7 @@ // Users. let user = response.stats.user; let $user = sax.getAppStatItemTemplate(); - $('.sax-header .sax-caption', $user).text(user.caption||'Users'); + $('.sax-header .sax-caption', $user).text(user.caption || 'Users'); ah.populateAppStat($user, user.awaiting.label, user.awaiting.value, user.awaitingLink) for (let item of user.onlineStats) ah.populateAppStat($user, item.label, item.value, user.onlineLink) @@ -43,7 +43,7 @@ // Organisations. let org = response.stats.organisation; let $org = sax.getAppStatItemTemplate(); - $('.sax-header .sax-caption', $org).text(org.caption||'Organisations'); + $('.sax-header .sax-caption', $org).text(org.caption || 'Organisations'); ah.populateAppStat($org, org.awaiting.label, org.awaiting.value, org.awaitingLink) $items.append($org); $items.slideDown(750); @@ -67,35 +67,39 @@ } //-------------------------------------------------------------- - sax.refreshDbSchema = function (delay) + ah.refreshDbSchema = function (instance, delay) { if (sax.awaitingLogin) return; if (!ah.awaitingSchemaResponse) { - var $items = $('.sax-panel-item-list', $pnl.dbSchema).fadeOut(200).empty(); - var $msgs = $('.sax-panel-messages', $pnl.dbSchema).hide().empty().append($('
' + sax.msg.dataQuerying + '
')).fadeIn(200); + let $pnlSchema = $('.sax-panel-results.DbSchema.' + instance); + var $items = $('.sax-panel-item-list', $pnlSchema).fadeOut(200).empty(); + var $msgs = $('.sax-panel-messages', $pnlSchema).hide().empty().append($('
' + sax.msg.dataQuerying + '
')).fadeIn(200); } - sax.ajax.dbSchema = sax.ajax.dbSchema || { url: sax.url.base + 'System/Ajax/ValidateDatabaseSchema', formId: 'frmNavigate', callbackFn: sax.handleDbSchemaResponse, noWaitIcon: true }; + $('.DatabaseInstance', $frm.dbSchema).val(instance); + sax.ajax.dbSchema = sax.ajax.dbSchema || { url: sax.url.base + 'System/Ajax/ValidateDatabaseSchema', formId: $frm.dbSchema.prop('id'), callbackFn: ah.handleDbSchemaResponse, noWaitIcon: true }; sax.doAjaxRequest(sax.ajax.dbSchema, delay || 50); ah.awaitingSchemaResponse = true; } - sax.handleDbSchemaResponse = function (response) + ah.handleDbSchemaResponse = function (response) { //sax.debug('handleDbSchemaResponse', response); delete ah.awaitingSchemaResponse; - var $msgs = $('.sax-panel-messages', $pnl.dbSchema).hide().empty(); - var $items = $('.sax-panel-item-list', $pnl.dbSchema).hide().empty(); - var $tmpl = $('.sax-panel-item-template .sax-panel-item.DbSchemaItem', $pnl.dbSchema); + let $pnlSchema = $('.sax-panel-results.DbSchema.' + response.instance) ; + var $msgs = $('.sax-panel-messages', $pnlSchema).hide().empty(); + var $items = $('.sax-panel-item-list', $pnlSchema).hide().empty(); + var $tmpl = $('.sax-panel-item-template .sax-panel-item.DbSchemaItem', $pnlSchema); if (!response.success) return; + if (response.instance == 'Core') ah.toSchema = setTimeout(function () { ah.refreshDbSchema('Support'); }, 250); // Items. var items = response.items; if (!items.length) return $msgs.append($('
' + sax.msg.dbSchemaValid + '
')).fadeIn(500); for (let itemIdx = 0; itemIdx < items.length; itemIdx++) - $items.append(sax.populateDbSchemaItem($tmpl.clone(), items[itemIdx])); + $items.append(ah.populateDbSchemaItem($tmpl.clone(), items[itemIdx])); $items.slideDown(750); } - sax.populateDbSchemaItem = function ($item, item) + ah.populateDbSchemaItem = function ($item, item) { if (!item) return; $item.prop('id', sax.itemIdPrefix + item.id); @@ -112,10 +116,13 @@ $(function () { $pnl.appStats = $('.sax-panel-results.ApplicationStats'); - $pnl.dbSchema = $('.sax-panel-results.DbSchema'); + $frm.dbSchema = $('#frmDatabaseSchema'); + $pnl.dbSchemaCore = $('.sax-panel-results.DbSchema.Core'); + $pnl.dbSchemaSupport = $('.sax-panel-results.DbSchema.Support'); ah.toStats = setTimeout(ah.refreshApplicationStats, 400); - ah.toSchema = setTimeout(sax.refreshDbSchema, 600); + ah.toSchema = setTimeout(function () { ah.refreshDbSchema('Core'); }, 600); + // NB Can only request one of the database schemas at a time as they share the same ajax config. }); //-------------------------------------------------------------- diff --git a/SaxoniteCoreWebAdmin/wwwroot/js/sax-main.js b/SaxoniteCoreWebAdmin/wwwroot/js/sax-main.js index aacb0e2..8d4c2fd 100644 --- a/SaxoniteCoreWebAdmin/wwwroot/js/sax-main.js +++ b/SaxoniteCoreWebAdmin/wwwroot/js/sax-main.js @@ -411,6 +411,10 @@ //-------------------------------------------------------------- // Data entry. + sax.hasControlErrors = function (context) + { + return $('.sax-form-control', $(context || doc.body)).hasClass('sax-error'); + } sax.clearControlErrors = function (context) { var $ctrls = $('.sax-form-control', $(context || doc.body)).removeClass('sax-error'); diff --git a/SaxoniteCoreWebAdmin/wwwroot/js/sax-org-ass.js b/SaxoniteCoreWebAdmin/wwwroot/js/sax-org-ass.js index 11eb3f7..9143d53 100644 --- a/SaxoniteCoreWebAdmin/wwwroot/js/sax-org-ass.js +++ b/SaxoniteCoreWebAdmin/wwwroot/js/sax-org-ass.js @@ -23,7 +23,7 @@ } oa.doRefreshResults = function (response) { - sax.debug('doRefreshResults', response); + //sax.debug('doRefreshResults', response); delete oa.awaitingRefreshResponse; sax.refreshControlValues(response.controlValues); var $msgs = $('.sax-panel-messages', $pnl.results).hide().empty(); @@ -156,7 +156,7 @@ } oa.onUpdateItem = function (response) { - sax.debug('onUpdateItemAssociation', response); + //sax.debug('onUpdateItemAssociation', response); if (!response.success) return; oa.clearItem(); // Association. diff --git a/SaxoniteCoreWebOnline/Localisation/SaxOnlineProperties.resx b/SaxoniteCoreWebOnline/Localisation/SaxOnlineProperties.resx index 81a61ee..fa2a015 100644 --- a/SaxoniteCoreWebOnline/Localisation/SaxOnlineProperties.resx +++ b/SaxoniteCoreWebOnline/Localisation/SaxOnlineProperties.resx @@ -189,6 +189,9 @@ Contact Method + + Feedback + Add Member @@ -204,6 +207,9 @@ User Configuration + + Version History + Solum Forti @@ -279,6 +285,9 @@ Any + + Application + Article @@ -525,8 +534,8 @@ Page {0} of {1} - - Participation + + Participating Password @@ -549,6 +558,9 @@ Postal code + + Preparing + Previous diff --git a/SaxoniteCoreWebOnline/Online/Controllers/AccountController-Ajax-Organisations.cs b/SaxoniteCoreWebOnline/Online/Controllers/AccountController-Ajax-Organisations.cs index fef0b9e..6172e87 100644 --- a/SaxoniteCoreWebOnline/Online/Controllers/AccountController-Ajax-Organisations.cs +++ b/SaxoniteCoreWebOnline/Online/Controllers/AccountController-Ajax-Organisations.cs @@ -132,7 +132,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers // Construction. public AjaxResponse_ProfileOrganisationList(SaxModel_Online model) : base(model) { } // Reference data. - public List ContactMethods { get; } = new List(); + public List ContactMethods { get; } = new List(); // Organisation list. public List Organisations { get; } = new List(); } diff --git a/SaxoniteCoreWebOnline/Online/Controllers/AccountController-Ajax-Sports.cs b/SaxoniteCoreWebOnline/Online/Controllers/AccountController-Ajax-Sports.cs index 97dd1e8..cc48714 100644 --- a/SaxoniteCoreWebOnline/Online/Controllers/AccountController-Ajax-Sports.cs +++ b/SaxoniteCoreWebOnline/Online/Controllers/AccountController-Ajax-Sports.cs @@ -30,13 +30,15 @@ namespace Saxonite.Net.Core.Web.Online.Controllers public String SportId { get; set; } public String SportName { get; set; } public String SportSpecialityLabel { get; set; } - public String SportParticipation { get; set; } + public String SportParticipating { get; set; } + public String SportPreparing { get; set; } public String SportOfficiating { get; set; } } private class ProfileSportResponseItemData : ProfileSportResponseListData { public String SportAbout { get; set; } - public String SportParticipationCode { get; set; } + public String SportParticipatingCode { get; set; } + public String SportPreparingCode { get; set; } public String SportOfficiatingCode { get; set; } } private void PopulateProfileSportResponseListData(Model_Account model, SaxUserSport userSport, SaxSport sport, ProfileSportResponseListData data) @@ -45,14 +47,16 @@ namespace Saxonite.Net.Core.Web.Online.Controllers data.SportId = model.GetEncryptedSportId(userSport.SportId); data.SportName = sport.Name; data.SportSpecialityLabel = model.GetSportSpecialityLabel(userSport.SportId); - data.SportParticipation = Localiser.GetSportParticipationCaption(userSport.Participation); + data.SportParticipating = Localiser.GetSportParticipatingCaption(userSport.Participating); + data.SportPreparing = Localiser.GetSportPreparingCaption(userSport.Preparing); data.SportOfficiating = Localiser.GetSportOfficiatingCaption(userSport.Officiating); } private void PopulateProfileSportResponseItemData(Model_Account model, SaxUserSport userSport, SaxSport sport, ProfileSportResponseItemData data) { PopulateProfileSportResponseListData(model, userSport, sport, data); data.SportAbout = userSport.About; - data.SportParticipationCode = SportParticipationCodes.GetCodeForType(userSport.Participation); + data.SportParticipatingCode = SportParticipatingCodes.GetCodeForType(userSport.Participating); + data.SportPreparingCode = SportPreparingCodes.GetCodeForType(userSport.Preparing); data.SportOfficiatingCode = SportOfficiatingCodes.GetCodeForType(userSport.Officiating); data.CreatedOnFmt = model.FormatDateForDisplay(userSport.CreateStamp.On); data.StatusCode = userSport.StatusCode; @@ -66,6 +70,9 @@ namespace Saxonite.Net.Core.Web.Online.Controllers { // Construction. public AjaxResponse_ProfileSportsData(SaxModel_Online model) : base(model) { } + // Reference data. + public List ContactTypes { get; } = new List(); + public List Titles { get; } = new List(); // Sport list. public List Sports { get; } = new List(); } @@ -83,6 +90,18 @@ namespace Saxonite.Net.Core.Web.Online.Controllers if (!ValidUserSession) return GetAjaxResult_InvalidSession(responseData); RefreshModel(model); + // Reference data - Contact types. + List validContactTypes = new List(EnumUtil.GetValues()); + foreach (TypeCodeDesc contactType in SportContactTypeCodes) + { + if (!validContactTypes.Contains((Sax.SportContactType)contactType.Type)) continue; + responseData.ContactTypes.Add(new AjaxResponse_Data.ItemCodeDesc() { Code = contactType.Code, Desc = Localiser.GetSportContactTypeCaption((Sax.SportContactType)contactType.Type) }); + } + + // Reference data - Titles. + foreach (var title in model.TitlesForSelect) + responseData.Titles.Add(new AjaxResponse_Data.ItemCodeDesc() { Code = title.Value, Desc = title.Text }); + // Item filter. SaxUserSport.Params prmUserSport = new SaxUserSport.Params(); prmUserSport.UserAccountIdsIncluded.Add(SessionUserAccountId); @@ -94,14 +113,15 @@ namespace Saxonite.Net.Core.Web.Online.Controllers ColumnDfn colId = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.Id); ColumnDfn colSportId = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportId); ColumnDfn colSportName = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.Sport_Name); - ColumnDfn colParticipation = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportParticipation); + ColumnDfn colParticipating = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportParticipating); + ColumnDfn colPreparing = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportPreparing); ColumnDfn colOfficiating = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportOfficiating); ColumnDfn colStatus = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.Status); List columns = new List() { colId, colSportId, colSportName, - colParticipation, colOfficiating, + colParticipating, colPreparing, colOfficiating, colStatus, }; @@ -121,7 +141,8 @@ namespace Saxonite.Net.Core.Web.Online.Controllers SportId = model.GetEncryptedSportId(sportId), SportName = values.GetString(colSportName.DataName), SportSpecialityLabel = model.GetSportSpecialityLabel(sportId), - SportParticipation = Localiser.GetSportParticipationCaption((Sax.SportParticipation)values.GetLong(colParticipation.DataName)), + SportParticipating = Localiser.GetSportParticipatingCaption((Sax.SportParticipating)values.GetLong(colParticipating.DataName)), + SportPreparing = Localiser.GetSportPreparingCaption((Sax.SportPreparing)values.GetLong(colPreparing.DataName)), SportOfficiating = Localiser.GetSportOfficiatingCaption((Sax.SportOfficiating)values.GetLong(colOfficiating.DataName)), StatusCode = values.GetString(colStatus.DataName), StatusDesc = SacsSystem.GetStatusDescForCode(values.GetString(colStatus.DataName)) @@ -197,7 +218,43 @@ namespace Saxonite.Net.Core.Web.Online.Controllers } //------------------------------------------------------------------- - // Store ProfileSport ajax request. + // Validate Profile Sport Contact ajax request. + //------------------------------------------------------------------- + private class AjaxResponse_ProfileSportContact : AjaxResponse_Data + { + // Construction. + public AjaxResponse_ProfileSportContact(SaxModel_Online model) : base(model) { } + } + [HttpPost] + [Route("Account/Ajax/ValidateProfileSportContact")] + public IActionResult Ajax_ValidateProfileSportContact(Model_UserSportContact model) + { + String fn = GetType().Name + ".Ajax_ValidateProfileSportContact"; + String messageTitle = Localiser["account.caption.profile.sport.contact"]; + AjaxResponse_ProfileSportContact responseData = new AjaxResponse_ProfileSportContact(model); + + // Validate session and referrer. + if (!ValidReferer) return Forbid(); + if (!ValidUserSession) return GetAjaxResult_InvalidSession(responseData); + RefreshModel(model); + + // Record disposable items as they are created so all can be disposed when needed. + using (DisposableCollection disposableItems = new DisposableCollection()) + { + + // Validate item properties. + model.ValidateUserSportContactData(responseData); + if (responseData.HasControlErrors()) + return Json(responseData); + + // Construct response. + responseData.Success = true; + } + return Json(responseData); + } + + //------------------------------------------------------------------- + // Store Profile Sport ajax request. //------------------------------------------------------------------- [HttpPost] [Route("Account/Ajax/StoreProfileSport")] @@ -295,8 +352,10 @@ namespace Saxonite.Net.Core.Web.Online.Controllers // Populate item properties. if (model.ProfileSportAbout != null) userSport.About = model.ProfileSportAbout; - if (model.ProfileSportParticipationCode != null) - userSport.Participation = model.ProfileSportParticipation; + if (model.ProfileSportParticipatingCode != null) + userSport.Participating = model.ProfileSportParticipating; + if (model.ProfileSportPreparingCode != null) + userSport.Preparing = model.ProfileSportPreparing; if (model.ProfileSportOfficiatingCode != null) userSport.Officiating = model.ProfileSportOfficiating; diff --git a/SaxoniteCoreWebOnline/Online/Controllers/ApplicationController.cs b/SaxoniteCoreWebOnline/Online/Controllers/ApplicationController.cs new file mode 100644 index 0000000..f37c9c2 --- /dev/null +++ b/SaxoniteCoreWebOnline/Online/Controllers/ApplicationController.cs @@ -0,0 +1,81 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; +using Sarand.Net.Standard.Base.Bus; +using Sarand.Net.Standard.Base.Core; +using Sarand.Net.Standard.Base.Dbas; +using Sarand.Net.Standard.Base.Utils; +using Saxonite.Net.Core.Web.Base.App; +using Saxonite.Net.Core.Web.Online.Models; +using Saxonite.Net.Standard.Base.App; +using Saxonite.Net.Standard.Base.Bus; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Saxonite.Net.Core.Web.Online.Controllers +{ + //======================================================================= + // Online Application Controller. + //======================================================================= + public partial class ApplicationController : SaxController_Online + { + //------------------------------------------------------------------- + // Construction. + public ApplicationController(SaxLocaliser localiser, ILogger logger) : + base(localiser, logger) + { + } + + //------------------------------------------------------------------- + [HttpGet] + public IActionResult Index() + { + // Validate session. + if (!ValidUserSession) + return RedirectToAction("", ""); + + // No Application index page. + return RedirectToAction("", ""); + } + + //------------------------------------------------------------------- + [HttpGet,HttpPost] + public IActionResult Feedback() + { + // Validate session. + if (!ValidUserSession) + return RedirectToAction("", ""); + + // User must be a member of the 'Reviewers' role. + if (!SessionData_Online.User.Roles.Exists(item => item.Role == Sax.UserRole.SystemReviewer)) + return RedirectToAction("", ""); + + // Applincation index page. + Model_Application model = new Model_Application(Localiser); + model.ProhibitCache = false; + return View(model); + } + + //------------------------------------------------------------------- + [HttpGet, HttpPost] + public IActionResult Versions() + { + // Validate session. + if (!ValidUserSession) + return RedirectToAction("", ""); + + // User must be a member of the 'Reviewers' role. + if (!SessionData_Online.User.Roles.Exists(item => item.Role == Sax.UserRole.SystemReviewer)) + return RedirectToAction("", ""); + + // Applincation index page. + Model_Application model = new Model_Application(Localiser); + model.ProhibitCache = false; + return View(model); + } + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaxoniteCoreWebOnline/Online/Controllers/SaxController_Online.cs b/SaxoniteCoreWebOnline/Online/Controllers/SaxController_Online.cs index 510b515..bbf1e64 100644 --- a/SaxoniteCoreWebOnline/Online/Controllers/SaxController_Online.cs +++ b/SaxoniteCoreWebOnline/Online/Controllers/SaxController_Online.cs @@ -138,21 +138,23 @@ namespace Saxonite.Net.Core.Web.Online.Controllers // Read discrete values to avoid loading the entire UserSport records which can be substantial. ColumnDfn colSportId = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportId); ColumnDfn colSportName = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.Sport_Name); - ColumnDfn colParticipation = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportParticipation); + ColumnDfn colParticipating = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportParticipating); + ColumnDfn colPreparing = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportPreparing); ColumnDfn colOfficiating = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.SportOfficiating); ColumnDfn colStatus = AccountMgr.GetUserSportColumnDfn(SaxUserSport.Column.Status); SaxUserSport.Params prmUserSport = new SaxUserSport.Params(); prmUserSport.UserAccountIdsIncluded.Add(userAccountId); prmUserSport.StatusCat = SaxUserSport.StatusCat.ActiveOnly; - using (DbResultSet resultSet = AccountMgr.ExecuteUserSportQuery(new List() { colSportId, colSportName, colParticipation, colOfficiating, colStatus }, prmUserSport)) + using (DbResultSet resultSet = AccountMgr.ExecuteUserSportQuery(new List() { colSportId, colSportName, colParticipating, colOfficiating, colStatus }, prmUserSport)) { while (resultSet != null && resultSet.NextRecord()) { NamedValue.Map values = resultSet.GetRecordValues(); SysId sportId = new SysId(values.GetLong(colSportId.DataName)); String sportName = values.GetString(colSportName.DataName); - Sax.SportParticipation participation = (Sax.SportParticipation)values.GetLong(colParticipation.DataName); + Sax.SportParticipating participating = (Sax.SportParticipating)values.GetLong(colParticipating.DataName); + Sax.SportPreparing preparing = (Sax.SportPreparing)values.GetLong(colPreparing.DataName); Sax.SportOfficiating officiating = (Sax.SportOfficiating)values.GetLong(colOfficiating.DataName); SaStatus status = SacsSystem.GetStatusForCode(values.GetString(colStatus.DataName)); sessionData.Profile.AddSport(sportId, status); diff --git a/SaxoniteCoreWebOnline/Online/Models/Model_Account.cs b/SaxoniteCoreWebOnline/Online/Models/Model_Account.cs index 899895a..7e78cc4 100644 --- a/SaxoniteCoreWebOnline/Online/Models/Model_Account.cs +++ b/SaxoniteCoreWebOnline/Online/Models/Model_Account.cs @@ -61,11 +61,17 @@ namespace Saxonite.Net.Core.Web.Online.Models public String UserSportId { get; set; } public String ProfileSportId { get; set; } public String ProfileSportExists { get; set; } - public String ProfileSportParticipationCode { get; set; } - public Sax.SportParticipation ProfileSportParticipation + public String ProfileSportParticipatingCode { get; set; } + public Sax.SportParticipating ProfileSportParticipating { - get { return (Sax.SportParticipation)SportParticipationCodes.GetTypeForCode(ProfileSportParticipationCode); } - set { ProfileSportParticipationCode = SportParticipationCodes.GetCodeForType(value); } + get { return (Sax.SportParticipating)SportParticipatingCodes.GetTypeForCode(ProfileSportParticipatingCode); } + set { ProfileSportParticipatingCode = SportParticipatingCodes.GetCodeForType(value); } + } + public String ProfileSportPreparingCode { get; set; } + public Sax.SportPreparing ProfileSportPreparing + { + get { return (Sax.SportPreparing)SportPreparingCodes.GetTypeForCode(ProfileSportPreparingCode); } + set { ProfileSportPreparingCode = SportPreparingCodes.GetCodeForType(value); } } public String ProfileSportOfficiatingCode { get; set; } public Sax.SportOfficiating ProfileSportOfficiating diff --git a/SaxoniteCoreWebOnline/Online/Models/Model_Application.cs b/SaxoniteCoreWebOnline/Online/Models/Model_Application.cs new file mode 100644 index 0000000..91f783f --- /dev/null +++ b/SaxoniteCoreWebOnline/Online/Models/Model_Application.cs @@ -0,0 +1,25 @@ +using Saxonite.Net.Core.Web.Base.App; +using Saxonite.Net.Core.Web.Base.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Saxonite.Net.Core.Web.Online.Models +{ + //======================================================================= + public class Model_Application : SaxModel_Online + { + //------------------------------------------------------------------- + // Construction. + public Model_Application(SaxLocaliser localiser) : + base(localiser) + { + AdditionalFiles_CSS.Add("css/sax-appl.css"); + AdditionalFiles_JS.Add("js/sax-appl.js"); + } + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaxoniteCoreWebOnline/Online/Models/Model_UserSportContact.cs b/SaxoniteCoreWebOnline/Online/Models/Model_UserSportContact.cs new file mode 100644 index 0000000..c2c9bdc --- /dev/null +++ b/SaxoniteCoreWebOnline/Online/Models/Model_UserSportContact.cs @@ -0,0 +1,102 @@ +using Microsoft.AspNetCore.Http; +using Sarand.Net.Standard.Base.Bus; +using Sarand.Net.Standard.Base.Core; +using Sarand.Net.Standard.Base.Utils; +using Saxonite.Base.App; +using Saxonite.Net.Core.Web.Base.App; +using Saxonite.Net.Core.Web.Base.Controllers; +using Saxonite.Net.Core.Web.Base.Models; +using Saxonite.Net.Standard.Base.App; +using Saxonite.Net.Standard.Base.Bus; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Saxonite.Net.Core.Web.Online.Models +{ + //======================================================================= + public class Model_UserSportContact: SaxModel_Online + { + //------------------------------------------------------------------- + // Construction. + public Model_UserSportContact(SaxLocaliser localiser) : + base(localiser) + { + } + + //------------------------------------------------------------------- + // User Sports Contact properties. + public class SportContactData + { + public String Type { get; set; } + public String EmailAddress { get; set; } + public String Title { get; set; } + public String FirstName { get; set; } + public String LastName { get; set; } + } + public SportContactData SportContact { get; } = new SportContactData(); + + //------------------------------------------------------------------- + // Validate User Sport Contact data. + public bool ValidateUserSportContactData(SaxController_Base.AjaxResponse_Data responseData) + { + // Contact Type. + String controlName = "ContactType"; + if (SportContact.Type != null) + { + // Contact Type is mandatory. + if (StringUtil.IsBlank(SportContact.Type)) + responseData.SetControlError(controlName, Localiser["msg.validation.invalid.value"]); + } + + // Email. + controlName = "ContactEmailAddress"; + if (SportContact.EmailAddress != null) + { + responseData.SetControlValue(controlName, SportContact.EmailAddress); + // Email is optional. + if (StringUtil.GetLength(SportContact.EmailAddress) > GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_EmailAddress)) + responseData.SetControlError(controlName, Localiser["msg.validation.maximum.length", GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_EmailAddress)]); + } + + // Title. + controlName = "ContactTitle"; + if (SportContact.Title != null) + { + // Title is selected from dropdown so no validation should be required. + if (StringUtil.GetLength(SportContact.Title) > GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_Title)) + responseData.SetControlError(controlName, Localiser["msg.validation.maximum.length", GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_Title)]); + } + + // First Name. + controlName = "ContactFirstName"; + if (SportContact.FirstName != null) + { + responseData.SetControlValue(controlName, SportContact.FirstName); + // First name is mandatory. + if (StringUtil.IsBlank(SportContact.FirstName)) + responseData.SetControlError(controlName, Localiser["msg.validation.invalid.value"]); + else if (StringUtil.GetLength(SportContact.FirstName) > GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_FirstName)) + responseData.SetControlError(controlName, Localiser["msg.validation.maximum.length", GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_FirstName)]); + } + + // Last Name. + controlName = "ContactLastName"; + if (SportContact.LastName != null) + { + responseData.SetControlValue(controlName, SportContact.LastName); + // Last name is mandatory. + if (StringUtil.IsBlank(SportContact.LastName)) + responseData.SetControlError(controlName, Localiser["msg.validation.invalid.value"]); + else if (StringUtil.GetLength(SportContact.LastName) > GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_LastName)) + responseData.SetControlError(controlName, Localiser["msg.validation.maximum.length", GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_LastName)]); + } + + return !responseData.HasControlErrors(); + } + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaxoniteCoreWebOnline/Online/Models/SaxModel_Online.cs b/SaxoniteCoreWebOnline/Online/Models/SaxModel_Online.cs index d6e2477..71f7b96 100644 --- a/SaxoniteCoreWebOnline/Online/Models/SaxModel_Online.cs +++ b/SaxoniteCoreWebOnline/Online/Models/SaxModel_Online.cs @@ -50,6 +50,8 @@ namespace Saxonite.Net.Core.Web.Online.Models public bool ArticlesAllowed { get { return UserIsJournalist || UserCanManageOrganisationArticles; } } public bool OrganisationOpportunitiesAllowed { get { return UserCanManageOrganisationOpportunities; } } public bool OrganisationEventsAllowed { get { return UserCanManageOrganisationSchedule; } } + // Application menu is for admin reviewers only. + public bool ApplicationMenuAllowed { get { return SessionData_Online?.User.Roles.Exists(item => item.Role == Sax.UserRole.SystemReviewer) ?? false; } } //------------------------------------------------------------------- // Security profile. diff --git a/SaxoniteCoreWebOnline/Views/Account/Profile-Contact.cshtml b/SaxoniteCoreWebOnline/Views/Account/Profile-Contact.cshtml index 6902f97..286d6ba 100644 --- a/SaxoniteCoreWebOnline/Views/Account/Profile-Contact.cshtml +++ b/SaxoniteCoreWebOnline/Views/Account/Profile-Contact.cshtml @@ -110,14 +110,14 @@
- +
- @* User first Title *@ + @* User Title *@
diff --git a/SaxoniteCoreWebOnline/Views/Account/Profile-Sports.cshtml b/SaxoniteCoreWebOnline/Views/Account/Profile-Sports.cshtml index a5b6d38..8b498b9 100644 --- a/SaxoniteCoreWebOnline/Views/Account/Profile-Sports.cshtml +++ b/SaxoniteCoreWebOnline/Views/Account/Profile-Sports.cshtml @@ -61,8 +61,9 @@
-
@Localiser["label.participation"]: 
-
@Localiser["label.officiating"]: 
+
@Localiser["label.participating"]: 
+
@Localiser["label.preparing"]: 
+
@Localiser["label.officiating"]: 
@@ -128,17 +129,34 @@ @* Contact controls *@ - @* Sport Participation *@ -
+ @* Sport Participating *@ +
- +
- @Html.DropDownListFor(model => model.ProfileSportParticipationCode, Model.SportParticipationCodesForSelect, "", new { @id = "cbProfileSportParticipation", @class = "ProfileSportParticipation sax-select" }) + @Html.DropDownListFor(model => model.ProfileSportParticipatingCode, Model.SportParticipatingCodesForSelect, "", new { @id = "cbProfileSportParticipating", @class = "ProfileSportParticipating sax-select" }) +
+
+
+
+
+ + @* Sport Preparing *@ +
+
+
+
+ +
+
+
+
+ @Html.DropDownListFor(model => model.ProfileSportPreparingCode, Model.SportPreparingCodesForSelect, "", new { @id = "cbProfileSportPreparing", @class = "ProfileSportPreparing sax-select" })
diff --git a/SaxoniteCoreWebOnline/Views/Application/Feedback.cshtml b/SaxoniteCoreWebOnline/Views/Application/Feedback.cshtml new file mode 100644 index 0000000..680ff47 --- /dev/null +++ b/SaxoniteCoreWebOnline/Views/Application/Feedback.cshtml @@ -0,0 +1,10 @@ +@model Model_Application +@inject SaxLocaliser Localiser +@{ + // Online - Application - Index. + ViewData["Title"] = "Application"; +} + +
+ Application Feedback - page under construction, delivery imminent. +
diff --git a/SaxoniteCoreWebOnline/Views/Application/Versions.cshtml b/SaxoniteCoreWebOnline/Views/Application/Versions.cshtml new file mode 100644 index 0000000..8e3b9b7 --- /dev/null +++ b/SaxoniteCoreWebOnline/Views/Application/Versions.cshtml @@ -0,0 +1,10 @@ +@model Model_Application +@inject SaxLocaliser Localiser +@{ + // Online - Application - Index. + ViewData["Title"] = "Application"; +} + +
+ Application Versions - page under construction, delivery imminent. +
diff --git a/SaxoniteCoreWebOnline/Views/Common/ContactMethods.cshtml b/SaxoniteCoreWebOnline/Views/Common/ContactMethods.cshtml index 4cfc921..06d3f07 100644 --- a/SaxoniteCoreWebOnline/Views/Common/ContactMethods.cshtml +++ b/SaxoniteCoreWebOnline/Views/Common/ContactMethods.cshtml @@ -7,7 +7,6 @@ // Scripts. Model.AdditionalFiles_JS.Add("js/sax-cnt-mth.js"); } -
diff --git a/SaxoniteCoreWebOnline/Views/Common/Sport-Contacts.cshtml b/SaxoniteCoreWebOnline/Views/Common/Sport-Contacts.cshtml index e8a26b8..81d86ea 100644 --- a/SaxoniteCoreWebOnline/Views/Common/Sport-Contacts.cshtml +++ b/SaxoniteCoreWebOnline/Views/Common/Sport-Contacts.cshtml @@ -1,59 +1,106 @@ @model SaxModel_Online @inject SaxLocaliser Localiser @{ - /* Sport Contacts */ + // Sport Contacts. // Ensure view is only included once in page. if (!Model.RegisterView("Views/Common/Sport-Contacts")) return; // Scripts. Model.AdditionalFiles_JS.Add("js/sax-spt-cnt.js"); } - -
- - @* Filter *@ -
- -
- - @* Available codes *@ -
- -
- -
- - @* Code selection *@ -
+
+
+ @using (Html.BeginForm(FormMethod.Post, new { @id = "frmProfileSportContact", @class = "sax-form", @onSubmit = "return false;" })) + { + @* Contact type *@ +
- -
- +
+
+ +
- -
- +
+
+ +
+
-
-
+
- @* Selected codes *@ -
- -
- + @* User email *@ +
+
+
+
+ +
+
+
+
+ +
+
+
-
+ @* Contact Name *@ +
-
-
-
+
+
+ +
+
+ +
+ +
+ @* Contact Title *@ +
+
+ +
+
+ +
+
+
+
+ +
+ @* Contact first name *@ +
+
+ +
+
+ +
+
+
+
+ +
+ @* Contact last name *@ +
+
+ +
+
+ +
+
+
+
+ +
-
+ } +
diff --git a/SaxoniteCoreWebOnline/Views/Shared/_Layout.cshtml b/SaxoniteCoreWebOnline/Views/Shared/_Layout.cshtml index e9c98e9..5bcb1ca 100644 --- a/SaxoniteCoreWebOnline/Views/Shared/_Layout.cshtml +++ b/SaxoniteCoreWebOnline/Views/Shared/_Layout.cshtml @@ -85,7 +85,9 @@ sax.msg.dataRefreshing = '@Localiser.GetJavascriptText("msg.data.refreshing")'; sax.msg.dataQuerying = '@Localiser.GetJavascriptText("msg.data.querying")'; sax.msg.dataNoneFound = '@Localiser.GetJavascriptText("msg.data.noneFound")'; - sax.maxProfileImageSize = 2*10**6; + sax.msg.mandatoryValue = '@Localiser.GetJavascriptText("msg.validation.mandatory.value")'; + sax.msg.invalidValue = '@Localiser.GetJavascriptText("msg.validation.invalid.value")'; + sax.maxProfileImageSize = 2 * 10 ** 6; sax.session.cookieName = '@Model.SessionCookieName'; sax.awaitingLogin = @awaitingLogin; sax.kli.active = @keepLoggedIn; @@ -158,6 +160,18 @@
+ @if (Model.ApplicationMenuAllowed) + { + + }