v1.1.8
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
// Paging.
|
||||
Model_Organisation model = new Model_Organisation(Localiser);
|
||||
model.Paging.PageNo = 1;
|
||||
model.Paging.PageLength = 6;
|
||||
model.Paging.PageLength = 8;
|
||||
|
||||
// Default status.
|
||||
if (sta.StartsWithCI("Awa"))
|
||||
|
||||
@@ -109,8 +109,10 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
|
||||
// Item filter.
|
||||
SaxUserAccount.Params prmUserAccount = new SaxUserAccount.Params();
|
||||
prmUserAccount.UserAccountFilter = model.Filter.User;
|
||||
prmUserAccount.StatusCat = SaxUserAccount.StatusCat.NotDeleted;
|
||||
prmUserAccount.UserFilterPartial = model.Filter.User;
|
||||
prmUserAccount.SportIdsIncluded.AddId(model.Filter.UserSportId.ToSysId());
|
||||
prmUserAccount.RegionIdsIncluded.AddId(model.Filter.UserRegionId.ToSysId());
|
||||
prmUserAccount.StatusCat = model.Filter.UserStatusCategoryCode != null ? model.FilterUserStatusCategory : SaxUserAccount.StatusCat.NotDeleted;
|
||||
model.Paging.ItemTotal = (ulong)AccountMgr.GetUserAccountCount(prmUserAccount);
|
||||
model.PopulatePagingTo(prmUserAccount.ResultsPaging);
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using Saxonite.Net.Core.Web.Admin.Models;
|
||||
using Saxonite.Net.Core.Web.Base.App;
|
||||
using Saxonite.Net.Core.Web.Base.Controllers;
|
||||
using Saxonite.Net.Standard.Base.Bus;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@@ -23,7 +25,7 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
[HttpGet]
|
||||
public IActionResult Index()
|
||||
public IActionResult Index(String sta)
|
||||
{
|
||||
// Validate session.
|
||||
if (!ValidUserSession)
|
||||
@@ -34,6 +36,10 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
model.Paging.PageNo = 1;
|
||||
model.Paging.PageLength = 12;
|
||||
|
||||
// Default status.
|
||||
if (sta.StartsWithCI("Awa"))
|
||||
model.Filter.UserStatusCategoryCode = nameof(SaxUserAccount.StatusCat.AwaitingOnly);
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Saxonite.Net.Core.Web.Admin.Models
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// List configuration.
|
||||
// Organisation filter properties.
|
||||
public class FilterData
|
||||
{
|
||||
public String Organisation { get; set; }
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Sarand.Net.Standard.Base.App;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Sarand.Net.Standard.Base.App;
|
||||
using Sarand.Net.Standard.Base.Bus;
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.Helpers;
|
||||
@@ -29,12 +30,34 @@ namespace Saxonite.Net.Core.Web.Admin.Models
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// User list configuration.
|
||||
// User filter properties.
|
||||
public class FilterData
|
||||
{
|
||||
public String User { get; set; }
|
||||
public String UserSportId { get; set; }
|
||||
public String UserRegionId { get; set; }
|
||||
public String UserStatusCategoryCode { get; set; }
|
||||
}
|
||||
public FilterData Filter { get; } = new FilterData();
|
||||
public SaxUserAccount.StatusCat FilterUserStatusCategory
|
||||
{
|
||||
get { return EnumUtil.ParseEnum(Filter.UserStatusCategoryCode, SaxUserAccount.StatusCat.Any); }
|
||||
}
|
||||
/// <summary>User Status Categories for filter.</summary>
|
||||
public IEnumerable<SelectListItem> UserFilterStatusCategoriesForSelect
|
||||
{
|
||||
get
|
||||
{
|
||||
List<CodeDesc> statusCategories = new List<CodeDesc>();
|
||||
statusCategories.Add(SaxUserAccount.StatusCat.Any.ToString(), Localiser["label.any"]);
|
||||
statusCategories.Add(SaxUserAccount.StatusCat.AwaitingOnly.ToString(), "Awaiting");
|
||||
statusCategories.Add(SaxUserAccount.StatusCat.ActiveOnly.ToString(), "Active");
|
||||
statusCategories.Add(SaxUserAccount.StatusCat.InactiveOnly.ToString(), "Inactive");
|
||||
statusCategories.Add(SaxUserAccount.StatusCat.NotDeleted.ToString(), "Not deleted");
|
||||
statusCategories.Add(SaxUserAccount.StatusCat.DeletedOnly.ToString(), "Deleted");
|
||||
return new SelectList(statusCategories, "Code", "Desc", SaxUserAccount.StatusCat.Any.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// User properties.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
ViewData["Title"] = "Organisations";
|
||||
}
|
||||
|
||||
<div class="sax-page-organisations">
|
||||
<div class="sax-panel Organisations">
|
||||
|
||||
<script type="text/javascript">
|
||||
sax.lbl.edit = '@(Localiser.GetJavascriptText("label.edit"))';
|
||||
@@ -36,59 +36,59 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
@* Organisation filter - name etc. *@
|
||||
<div class="row pb4">
|
||||
<div class="col-sm-5 sax-label text-left text-sm-right">@Localiser["label.search"]</div>
|
||||
<div class="col-sm-7">
|
||||
@Html.TextBoxFor(model => model.Filter.Organisation, new { @id = "", @class = "FilterOrganisation", @maxlength = "32" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
@* Organisation filter - name etc. *@
|
||||
<div class="row pb4">
|
||||
<div class="col-sm-5 sax-label text-left text-sm-right">@Localiser["label.search"]</div>
|
||||
<div class="col-sm-7">
|
||||
@Html.TextBoxFor(model => model.Filter.Organisation, new { @id = "", @class = "FilterOrganisation", @maxlength = "32" })
|
||||
</div>
|
||||
@* Organisation Category *@
|
||||
<div class="row pb4">
|
||||
<div class="col-sm-5 sax-label text-left text-sm-right">@Localiser["label.category"]</div>
|
||||
<div class="col-sm-7">
|
||||
@Html.DropDownListFor(model => model.Filter.OrganisationCategoryCode, Model.OrganisationCategoriesForSelect, Localiser["label.any"], new { @id = "", @class = "FilterOrganisationCategory sax-select" })
|
||||
</div>
|
||||
@* Organisation Category *@
|
||||
<div class="row pb4">
|
||||
<div class="col-sm-5 sax-label text-left text-sm-right">@Localiser["label.category"]</div>
|
||||
<div class="col-sm-7">
|
||||
@Html.DropDownListFor(model => model.Filter.OrganisationCategoryCode, Model.OrganisationCategoriesForSelect, Localiser["label.any"], new { @id = "", @class = "FilterOrganisationCategory sax-select" })
|
||||
</div>
|
||||
</div>
|
||||
@* Organisation sport *@
|
||||
<div class="row pb4">
|
||||
<div class="col-sm-5 sax-label text-left text-sm-right">@Localiser["label.sport"]</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="row">
|
||||
@Html.HiddenFor(model => model.Filter.OrganisationSportId, new { @id = "", @class = "FilterOrganisationSportId" })
|
||||
<div class="col"><input type="text" class="FilterOrganisationSportCaption sax-input" readonly="readonly" ondblclick="sax.selectFilterSport()" /> </div>
|
||||
<div class="fixed row">
|
||||
<div class="sax-action" onclick="sax.selectFilterSport();"><img src="~/img/action/search24.png" alt="@(Localiser["label.search"])" title="@(Localiser["label.search"])" /></div>
|
||||
<div class="sax-action" onclick="sax.clearFilterSport();"><img src="~/img/action/delete24.png" alt="@(Localiser["label.clear"])" title="@(Localiser["label.clear"])" /></div>
|
||||
</div>
|
||||
</div>
|
||||
@* Organisation sport *@
|
||||
<div class="row pb4">
|
||||
<div class="col-sm-5 sax-label text-left text-sm-right">@Localiser["label.sport"]</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="row">
|
||||
@Html.HiddenFor(model => model.Filter.OrganisationSportId, new { @id = "", @class = "FilterOrganisationSportId" })
|
||||
<div class="col"><input type="text" class="FilterOrganisationSportCaption sax-input" readonly="readonly" /> </div>
|
||||
<div class="fixed row">
|
||||
<div class="sax-action FilterSportSelect"><img src="~/img/action/search24.png" alt="@(Localiser["label.search"])" title="@(Localiser["label.search"])" /></div>
|
||||
<div class="sax-action FilterSportClear"><img src="~/img/action/delete24.png" alt="@(Localiser["label.clear"])" title="@(Localiser["label.clear"])" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@* Organisation region *@
|
||||
<div class="row pb4">
|
||||
<div class="col-sm-5 sax-label text-left text-sm-right">@Localiser["label.region"]</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="row">
|
||||
@Html.HiddenFor(model => model.Filter.OrganisationRegionId, new { @id = "", @class = "FilterOrganisationRegionId" })
|
||||
<div class="col"><input type="text" class="FilterOrganisationRegionCaption sax-input" readonly="readonly" ondblclick="sax.selectFilterRegion()" /> </div>
|
||||
<div class="fixed row">
|
||||
<div class="sax-action" onclick="sax.selectFilterRegion();"><img src="~/img/action/search24.png" alt="@(Localiser["label.search"])" title="@(Localiser["label.search"])" /></div>
|
||||
<div class="sax-action" onclick="sax.clearFilterRegion();"><img src="~/img/action/delete24.png" alt="@(Localiser["label.clear"])" title="@(Localiser["label.clear"])" /></div>
|
||||
</div>
|
||||
</div>
|
||||
@* Organisation region *@
|
||||
<div class="row pb4">
|
||||
<div class="col-sm-5 sax-label text-left text-sm-right">@Localiser["label.region"]</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="row">
|
||||
@Html.HiddenFor(model => model.Filter.OrganisationRegionId, new { @id = "", @class = "FilterOrganisationRegionId" })
|
||||
<div class="col"><input type="text" class="FilterOrganisationRegionCaption sax-input" readonly="readonly" /> </div>
|
||||
<div class="fixed row">
|
||||
<div class="sax-action FilterRegionSelect"><img src="~/img/action/search24.png" alt="@(Localiser["label.search"])" title="@(Localiser["label.search"])" /></div>
|
||||
<div class="sax-action FilterRegionClear"><img src="~/img/action/delete24.png" alt="@(Localiser["label.clear"])" title="@(Localiser["label.clear"])" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@* Organisation Status *@
|
||||
<div class="row pb4">
|
||||
<div class="col-sm-5 sax-label text-left text-sm-right">@Localiser["label.status"]</div>
|
||||
<div class="col-sm-7">
|
||||
@Html.DropDownListFor(model => model.Filter.OrganisationStatusCategoryCode, Model.OrganisationFilterStatusCategoriesForSelect, new { @id = "", @class = "FilterOrganisationStatusCategory sax-select" })
|
||||
</div>
|
||||
</div>
|
||||
@* Organisation Status *@
|
||||
<div class="row pb4">
|
||||
<div class="col-sm-5 sax-label text-left text-sm-right">@Localiser["label.status"]</div>
|
||||
<div class="col-sm-7">
|
||||
@Html.DropDownListFor(model => model.Filter.OrganisationStatusCategoryCode, Model.OrganisationFilterStatusCategoriesForSelect, new { @id = "", @class = "FilterOrganisationStatusCategory sax-select" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-7">
|
||||
<div class="col-md">
|
||||
|
||||
@* Results Panel *@
|
||||
<div class="sax-panel-results">
|
||||
@@ -149,3 +149,5 @@
|
||||
</div>
|
||||
|
||||
<partial name="Panel-OrganisationDialog.cshtml" />
|
||||
<partial name="~/Views/Common/SelectItem.cshtml" />
|
||||
<partial name="Panel-ActivationDialog.cshtml" />
|
||||
|
||||
@@ -85,6 +85,4 @@
|
||||
|
||||
}
|
||||
|
||||
<partial name="~/Views/Common/SelectItem.cshtml" />
|
||||
|
||||
</div>
|
||||
|
||||
@@ -16,29 +16,37 @@
|
||||
}
|
||||
<div id="dlgOrganisation" class="sax-dialog" title="">
|
||||
|
||||
<div class="spacer"></div>
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmOrganisation", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
@Html.HiddenFor(model => model.OrganisationId, new { @id = "", @class = "OrganisationId" })
|
||||
|
||||
@* Organisation name *@
|
||||
<div class="sax-form-control OrganisationName">
|
||||
<div class="sax-label">
|
||||
<label for="ifOrganisationName"><span><span class="required">*</span> @Localiser["label.name"]</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="sax-label">
|
||||
<label for="ifOrganisationName"><span>@Localiser["label.name"]</span> <span class="required">*</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.OrganisationName, new { @id = "ifOrganisationName", @class = "OrganisationName sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Organisation_Name) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.OrganisationName, new { @id = "ifOrganisationName", @class = "OrganisationName sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Organisation_Name) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4"></div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="col-sm">
|
||||
|
||||
@* Organisation category *@
|
||||
<div class="sax-form-control OrganisationCategory pr4">
|
||||
<div class="sax-label">
|
||||
<label for="cbOrganisationCategory"><span><span class="required">*</span> @Localiser["label.category"]</span></label>
|
||||
<label for="cbOrganisationCategory"><span>@Localiser["label.category"]</span> <span class="required">*</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.DropDownListFor(model => model.OrganisationCategoryValue, Model.OrganisationCategoriesForSelect, Localiser["label.select"], new { @id = "cbOrganisationCategory", @class = "OrganisationCategory sax-select" })
|
||||
@@ -53,7 +61,7 @@
|
||||
@* Organisation type *@
|
||||
<div class="sax-form-control OrganisationType">
|
||||
<div class="sax-label">
|
||||
<label for="cbOrganisationType"><span><span class="required">*</span> @Localiser["label.type"]</span></label>
|
||||
<label for="cbOrganisationType"><span>@Localiser["label.type"]</span> <span class="required">*</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.DropDownListFor(model => model.OrganisationTypeValue, Model.OrganisationTypesForSelect, Localiser["label.select"], new { @id = "cbOrganisationType", @class = "OrganisationType sax-select" })
|
||||
@@ -67,44 +75,61 @@
|
||||
|
||||
@* Organisation sport *@
|
||||
<div class="sax-form-control OrganisationSportId">
|
||||
<div class="sax-label">
|
||||
<label for="ifOrganisationSportCaption"><span><span class="required">*</span> @Localiser["label.sport"]</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="sax-label">
|
||||
<label for="ifOrganisationSportCaption"><span>@Localiser["label.sport"]</span> <span class="required">*</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.OrganisationSportId, new { @id = "ifOrganisationSportId", @class = "OrganisationSportId" })
|
||||
<div class="col"><input type="text" id="ifOrganisationSportCaption" class="OrganisationSportCaption sax-input" readonly="readonly" ondblclick="sax.selectSport()" /> </div>
|
||||
<div class="fixed"><button id="pbSelectSport" class="sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectSport()">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.OrganisationSportId, new { @id = "ifOrganisationSportId", @class = "OrganisationSportId" })
|
||||
<div class="col"><input type="text" id="ifOrganisationSportCaption" class="OrganisationSportCaption sax-input" readonly="readonly" ondblclick="sax.selectSport()" /> </div>
|
||||
<div class="fixed"><button id="pbSelectSport" class="sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectSport()">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* Organisation region *@
|
||||
<div class="sax-form-control OrganisationRegionIdCountry">
|
||||
<div class="sax-label">
|
||||
<label for="ifOrganisationRegionCaptionCountry"><span><span class="required">*</span> @Localiser["label.country"]</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="sax-label">
|
||||
<label for="ifOrganisationRegionCaptionCountry"><span>@Localiser["label.country"]</span> <span class="required">*</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.OrganisationRegionIdCountry, new { @id = "ifOrganisationRegionIdCountry", @class = "OrganisationRegionIdCountry" })
|
||||
<div class="col"><input type="text" id="ifOrganisationRegionCaptionCountry" class="OrganisationRegionCaptionCountry sax-input" readonly="readonly" ondblclick="sax.selectRegion()" /> </div>
|
||||
<div class="fixed"><button id="pbSelectRegion" class="sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectRegion()">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.OrganisationRegionIdCountry, new { @id = "ifOrganisationRegionIdCountry", @class = "OrganisationRegionIdCountry" })
|
||||
<div class="col"><input type="text" id="ifOrganisationRegionCaptionCountry" class="OrganisationRegionCaptionCountry sax-input" readonly="readonly" ondblclick="sax.selectRegion()" /> </div>
|
||||
<div class="fixed"><button id="pbSelectRegion" class="sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectRegion()">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* Organisation status *@
|
||||
<div class="sax-form-control OrganisationStatus">
|
||||
<div class="sax-label">
|
||||
<label for="cbOrganisationStatus"><span><span class="required">*</span> @Localiser["label.status"]</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="sax-label">
|
||||
<label for="cbOrganisationStatus"><span>@Localiser["label.status"]</span> <span class="required">*</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
<select id="cbOrganisationStatus" class="sax-select OrganisationStatus" name="OrganisationStatusCode"></select>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
<select id="cbOrganisationStatus" class="sax-select OrganisationStatus" name="OrganisationStatusCode"></select>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
<partial name="~/Views/Common/SelectItem.cshtml" />
|
||||
<partial name="Panel-ActivationDialog.cshtml" />
|
||||
<div class="spacer"></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
@* Scripts *@
|
||||
<script>
|
||||
var sax = sax || { page: {}, url: {}, links: {}, form: {}, data: {}, ajax: {}, msg: {}, lbl: {}, dlg: { title: {}, btn: {} }, $frm: {}, $dlg: {}, $pnl: {} };
|
||||
var sax = sax || { page: {}, mdl: {}, url: {}, links: {}, form: {}, data: {}, ajax: {}, msg: {}, lbl: {}, dlg: { title: {}, btn: {} }, $frm: {}, $dlg: {}, $pnl: {} };
|
||||
sax.url.base = '@Model.RedirectLocation.Base';
|
||||
sax.url.home = '@Model.RedirectLocation.Home';
|
||||
sax.url.sessionExpired = '@Model.RedirectLocation.Home_SessionExpired';
|
||||
|
||||
@@ -14,95 +14,145 @@
|
||||
sax.lbl.emails= '@(Localiser.GetJavascriptText("label.emails"))';
|
||||
</script>
|
||||
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmUserFilter", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-5 row">
|
||||
|
||||
<div class="col">
|
||||
|
||||
@* Filter Panel *@
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmUserFilter", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
|
||||
<div class="sax-panel-filter">
|
||||
@* Header - Page caption, paging controls, actions. *@
|
||||
<div class="sax-header row">
|
||||
<div class="col"><div class="sax-caption">@Localiser["user.caption.users"]</div></div>
|
||||
<div class="fixed row">
|
||||
<div class="col">
|
||||
<partial name="~/Views/Common/ResultsPaging.cshtml" />
|
||||
</div>
|
||||
<div class="fixed">
|
||||
@* Burger menu *@
|
||||
<ul class="nav navbar-nav navbar-dark navbar-right sax-burger">
|
||||
<li class="dropdown-toggle caret-off">
|
||||
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="navbar-toggler-icon"></span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right sax-dropdown-menu">@* Menu items will be inserted here. *@</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
@* User filter - email, name etc. *@
|
||||
<div class="row pb4">
|
||||
<div class="col-sm-5 sax-label text-left text-sm-right">@Localiser["user.caption.user"]</div>
|
||||
<div class="col-sm-7">@Html.TextBoxFor(model => model.Filter.User, new { @id = "ifFilterUser", @class = "FilterUser", @maxlength = "32" })</div>
|
||||
</div>
|
||||
@* User sport *@
|
||||
<div class="row pb4">
|
||||
<div class="col-sm-5 sax-label text-left text-sm-right">@Localiser["label.sport"]</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="row">
|
||||
@Html.HiddenFor(model => model.Filter.UserSportId, new { @id = "", @class = "FilterUserSportId" })
|
||||
<div class="col"><input type="text" class="FilterUserSportCaption sax-input" readonly="readonly" ondblclick="sax.selectFilterSport()" /> </div>
|
||||
<div class="fixed row">
|
||||
<div class="sax-action" onclick="sax.selectFilterSport();"><img src="~/img/action/search24.png" alt="@(Localiser["label.search"])" title="@(Localiser["label.search"])" /></div>
|
||||
<div class="sax-action" onclick="sax.clearFilterSport();"><img src="~/img/action/delete24.png" alt="@(Localiser["label.clear"])" title="@(Localiser["label.clear"])" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@* User region *@
|
||||
<div class="row pb4">
|
||||
<div class="col-sm-5 sax-label text-left text-sm-right">@Localiser["label.region"]</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="row">
|
||||
@Html.HiddenFor(model => model.Filter.UserRegionId, new { @id = "", @class = "FilterUserRegionId" })
|
||||
<div class="col"><input type="text" class="FilterUserRegionCaption sax-input" readonly="readonly" ondblclick="sax.selectFilterRegion()" /> </div>
|
||||
<div class="fixed row">
|
||||
<div class="sax-action" onclick="sax.selectFilterRegion();"><img src="~/img/action/search24.png" alt="@(Localiser["label.search"])" title="@(Localiser["label.search"])" /></div>
|
||||
<div class="sax-action" onclick="sax.clearFilterRegion();"><img src="~/img/action/delete24.png" alt="@(Localiser["label.clear"])" title="@(Localiser["label.clear"])" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@* Organisation Status *@
|
||||
<div class="row pb4">
|
||||
<div class="col-sm-5 sax-label text-left text-sm-right">@Localiser["label.status"]</div>
|
||||
<div class="col-sm-7">
|
||||
@Html.DropDownListFor(model => model.Filter.UserStatusCategoryCode, Model.UserFilterStatusCategoriesForSelect, new { @id = "", @class = "FilterUserStatusCategory sax-select" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Filter element templates *@
|
||||
<div class="sax-panel-item-template">
|
||||
@* Burger dropdown item template - ul is ignored *@
|
||||
<ul class="sax-dropdown-menu UserFilter">
|
||||
<li class="sax-dropdown-item sax-action"><div class="sax-label">XXX</div></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@* Filter Panel *@
|
||||
<div class="sax-panel-filter">
|
||||
@* Header - Page caption, paging controls, actions. *@
|
||||
<div class="sax-header row">
|
||||
<div class="col"><div class="sax-caption">@Localiser["user.caption.users"]</div></div>
|
||||
<div class="fixed row">
|
||||
<div class="col">
|
||||
<partial name="~/Views/Common/ResultsPaging.cshtml" />
|
||||
</div>
|
||||
<div class="fixed">
|
||||
@* Burger menu *@
|
||||
<ul class="nav navbar-nav navbar-dark navbar-right sax-burger">
|
||||
<li class="dropdown-toggle caret-off">
|
||||
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="navbar-toggler-icon"></span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right sax-dropdown-menu">@* Menu items will be inserted here. *@</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
<div class="row">
|
||||
@* User filter - email, name etc. *@
|
||||
<div class="col-sm-5 sax-label text-left text-sm-right">@Localiser["user.caption.user"]</div>
|
||||
<div class="col-sm-7">@Html.TextBoxFor(model => model.Filter.User, new { @id = "ifFilterUser", @class = "FilterUser", @maxlength = "32" })</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
@* Filter element templates *@
|
||||
<div class="sax-panel-item-template">
|
||||
@* Burger dropdown item template - ul is ignored *@
|
||||
<ul class="sax-dropdown-menu UserFilter">
|
||||
<li class="sax-dropdown-item sax-action"><div class="sax-label">XXX</div></li>
|
||||
</ul>
|
||||
</div>
|
||||
@* Separate filter from results when alondside each other. *@
|
||||
<div class="fixed"><div class="d-none d-md-block" style="width:8px;"></div></div>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
@* Results Panel *@
|
||||
<div class="sax-panel-results">
|
||||
<div class="sax-panel-messages"></div>
|
||||
<div class="sax-panel-item-list"></div>
|
||||
<div class="col-md">
|
||||
|
||||
@* Element templates *@
|
||||
<div class="sax-panel-item-template">
|
||||
@* Results Panel *@
|
||||
<div class="sax-panel-results">
|
||||
<div class="sax-panel-messages"></div>
|
||||
<div class="sax-panel-item-list"></div>
|
||||
|
||||
@* User item template *@
|
||||
<div class="sax-panel-item User">
|
||||
<div class="sax-header row">
|
||||
<div class="col">
|
||||
@* User email *@
|
||||
<div class="sax-caption"><div class="sax-action sax-item-update UserEmailAddress"></div></div>
|
||||
</div>
|
||||
<div class="fixed sax-actions">
|
||||
@* Burger menu *@
|
||||
<ul class="nav navbar-nav navbar-light navbar-right sax-burger">
|
||||
<li class="dropdown-toggle caret-off">
|
||||
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="navbar-toggler-icon"></span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right sax-dropdown-menu">@* Menu items will be inserted here. *@</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4"><span class="UserDisplayName"></span></div>
|
||||
<div class="col-sm-4"><div>Roles: <span class="UserRoleCount"></span></div></div>
|
||||
<div class="col-sm-4 right"><div class="StatusDesc"></div></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-4"><div class=""></div></div>
|
||||
@* Element templates *@
|
||||
<div class="sax-panel-item-template">
|
||||
|
||||
@* User item template *@
|
||||
<div class="sax-panel-item User">
|
||||
<div class="sax-header row">
|
||||
<div class="col">
|
||||
@* User email *@
|
||||
<div class="sax-caption"><div class="sax-action sax-item-update UserEmailAddress"></div></div>
|
||||
</div>
|
||||
<div class="fixed sax-actions">
|
||||
@* Burger menu *@
|
||||
<ul class="nav navbar-nav navbar-light navbar-right sax-burger">
|
||||
<li class="dropdown-toggle caret-off">
|
||||
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="navbar-toggler-icon"></span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right sax-dropdown-menu">@* Menu items will be inserted here. *@</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4"><span class="UserDisplayName"></span></div>
|
||||
<div class="col-sm-4"><div>Roles: <span class="UserRoleCount"></span></div></div>
|
||||
<div class="col-sm-4 right"><div class="StatusDesc"></div></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-4"><div class=""></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Burger dropdown item template - ul is ignored *@
|
||||
<ul class="sax-dropdown-menu User">
|
||||
<li class="sax-dropdown-item sax-action"><div class="sax-label">XXX</div></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Burger dropdown item template - ul is ignored *@
|
||||
<ul class="sax-dropdown-menu User">
|
||||
<li class="sax-dropdown-item sax-action"><div class="sax-label">XXX</div></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<partial name="Panel-UserDialog.cshtml" />
|
||||
|
||||
</div>
|
||||
|
||||
<partial name="Panel-UserDialog.cshtml" />
|
||||
<partial name="~/Views/Common/SelectItem.cshtml" />
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
@Html.HiddenFor(model => model.UserAccountId, new { @class = "UserAccountId" })
|
||||
}
|
||||
<div id="dlgUser" class="sax-dialog" title="">
|
||||
<div class="spacer"></div>
|
||||
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmUser", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
@@ -23,125 +24,183 @@
|
||||
|
||||
@* User email *@
|
||||
<div class="sax-form-control UserEmailAddress">
|
||||
<div class="sax-label">
|
||||
<label for="ifUserEmailAddress"><span><span class="required">*</span> @Localiser["label.email.address"]</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="sax-label">
|
||||
<label for="ifUserEmailAddress"><span>@Localiser["label.email.address"]</span> <span class="required">*</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.UserEmailAddress, new { @id = "ifUserEmailAddress", @class = "UserEmailAddress sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_EmailAddress) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.UserEmailAddress, new { @id = "ifUserEmailAddress", @class = "UserEmailAddress sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_EmailAddress) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
/* Title */
|
||||
<div class="sax-form-control UserTitle">
|
||||
<div class="sax-label">
|
||||
<label for="cbUserTitle"><span><span class="required"></span> @Localiser["label.title"]</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="sax-label">
|
||||
<label for="cbUserTitle"><span><span class="required"></span> @Localiser["label.title"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
@Html.DropDownListFor(model => model.UserTitle, Model.TitlesForSelect, Localiser["label.not.specified"], new { @id = "cbUserTitle", @class = "UserTitle sax-select" })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.DropDownListFor(model => model.UserTitle, Model.TitlesForSelect, Localiser["label.not.specified"], new { @id = "cbUserTitle", @class = "UserTitle sax-select" })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* User first name *@
|
||||
<div class="sax-form-control UserFirstName">
|
||||
<div class="sax-label">
|
||||
<label for="ifUserFirstName"><span><span class="required">*</span> @Localiser["label.first.name"]</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="sax-label">
|
||||
<label for="ifUserFirstName"><span>@Localiser["label.first.name"]</span> <span class="required">*</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.UserFirstName, new { @id = "ifUserFirstName", @class = "UserFirstName sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_FirstName) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.UserFirstName, new { @id = "ifUserFirstName", @class = "UserFirstName sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_FirstName) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* User last name *@
|
||||
<div class="sax-form-control UserLastName">
|
||||
<div class="sax-label">
|
||||
<label for="ifUserLastName"><span><span class="required">*</span> @Localiser["label.last.name"]</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="sax-label">
|
||||
<label for="ifUserLastName"><span>@Localiser["label.last.name"]</span> <span class="required">*</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.UserLastName, new { @id = "ifUserLastName", @class = "UserLastName sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_LastName) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.UserLastName, new { @id = "ifUserLastName", @class = "UserLastName sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_LastName) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* User roles *@
|
||||
<div class="sax-form-control UserRoles">
|
||||
<div class="sax-label">
|
||||
<label for="lbUserRoles"><span>@Localiser["label.user.roles"]</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="sax-label">
|
||||
<label for="lbUserRoles"><span>@Localiser["label.user.roles"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.UserRoleCodes, new { @id = "ifUserRoleCodes", @class = "UserRoleCodes sax-input" })
|
||||
<div class="col"><textarea id="ifUserRoles" class="UserRoles sax-input" style="" rows="3" readonly="readonly" onDblClick="sax.selectUserRoles()"></textarea></div>
|
||||
<div class="fixed"><button id="" class="sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectUserRoles()">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.UserRoleCodes, new { @id = "ifUserRoleCodes", @class = "UserRoleCodes sax-input" })
|
||||
<div class="col"><textarea id="ifUserRoles" class="UserRoles sax-input" style="" rows="3" readonly="readonly" onDblClick="sax.selectUserRoles()"></textarea></div>
|
||||
<div class="fixed"><button id="" class="sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectUserRoles()">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* User status *@
|
||||
<div class="sax-form-control UserStatus">
|
||||
<div class="sax-label">
|
||||
<label for="cbUserStatus"><span><span class="required">*</span> @Localiser["label.status"]</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="sax-label">
|
||||
<label for="cbUserStatus"><span>@Localiser["label.status"]</span> <span class="required">*</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
<select id="cbUserStatus" class="sax-select UserStatus" name="UserStatusCode"></select>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
<select id="cbUserStatus" class="sax-select UserStatus" name="UserStatusCode"></select>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
<div class="spacer"></div>
|
||||
</div>
|
||||
|
||||
<partial name="~/Views/Common/SelectCode.cshtml" />
|
||||
|
||||
<div id="dlgUserEmails" class="sax-dialog" title="">
|
||||
<div class="spacer"></div>
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmUserEmails", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
@Html.HiddenFor(model => model.UserAccountId, new { @class = "UserAccountId" })
|
||||
|
||||
<div class="sax-para">@Localiser["user.emails.intro"]</div>
|
||||
<div class="spacer2"></div>
|
||||
|
||||
@* User email *@
|
||||
<div class="sax-form-control UserEmailAddress">
|
||||
<div class="sax-label">
|
||||
<label><span>@Localiser["label.email.address"]</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="sax-label">
|
||||
<label><span>@Localiser["label.email.address"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
<input type="text" class="UserEmailAddress sax-input" readonly="readonly" />
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
<input type="text" class="UserEmailAddress sax-input" readonly="readonly" />
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* User display name *@
|
||||
<div class="sax-form-control UserDisplayName">
|
||||
<div class="sax-label">
|
||||
<label ><span>@Localiser["label.name"]</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="sax-label">
|
||||
<label><span>@Localiser["label.name"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
<input type="text" class="UserDisplayName sax-input" readonly="readonly" />
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
<input type="text" class="UserDisplayName sax-input" readonly="readonly" />
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* User emails *@
|
||||
<div class="sax-form-control UserEmailTypes">
|
||||
<div class="sax-label">
|
||||
<label for="chkUserEmailRequestPasswordAdmin"><span>@Localiser["label.email.types"]</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
<div class="AcountActivationOnlineOption">
|
||||
<input type="checkbox" id="chkUserEmailAcountActivationOnline" class="UserEmailAcountActivationOnline" name="UserEmailAcountActivationOnline" value="1" /> <span onclick="$('#chkUserEmailAcountActivationOnline').click()">@Localiser["user.email.account.activation.online"]</span>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="sax-label">
|
||||
<label for="chkUserEmailRequestPasswordAdmin"><span>@Localiser["label.email.types"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="RequestPasswordOnlineOption">
|
||||
<input type="checkbox" id="chkUserEmailRequestPasswordOnline" class="UserEmailRequestPasswordOnline" name="UserEmailRequestPasswordOnline" value="1" /> <span onclick="$('#chkUserEmailRequestPasswordOnline').click()">@Localiser["user.email.request.password.online"]</span>
|
||||
</div>
|
||||
<div class="RequestPasswordAdminOption">
|
||||
<input type="checkbox" id="chkUserEmailRequestPasswordAdmin" class="UserEmailRequestPasswordAdmin" name="UserEmailRequestPasswordAdmin" value="1" /> <span onclick="$('#chkUserEmailRequestPasswordAdmin').click()">@Localiser["user.email.request.password.admin"]</span>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
<div class="AcountActivationOnlineOption">
|
||||
<input type="checkbox" id="chkUserEmailAcountActivationOnline" class="UserEmailAcountActivationOnline" name="UserEmailAcountActivationOnline" value="1" /> <span onclick="$('#chkUserEmailAcountActivationOnline').click()">@Localiser["user.email.account.activation.online"]</span>
|
||||
</div>
|
||||
<div class="RequestPasswordOnlineOption">
|
||||
<input type="checkbox" id="chkUserEmailRequestPasswordOnline" class="UserEmailRequestPasswordOnline" name="UserEmailRequestPasswordOnline" value="1" /> <span onclick="$('#chkUserEmailRequestPasswordOnline').click()">@Localiser["user.email.request.password.online"]</span>
|
||||
</div>
|
||||
<div class="RequestPasswordAdminOption">
|
||||
<input type="checkbox" id="chkUserEmailRequestPasswordAdmin" class="UserEmailRequestPasswordAdmin" name="UserEmailRequestPasswordAdmin" value="1" /> <span onclick="$('#chkUserEmailRequestPasswordAdmin').click()">@Localiser["user.email.request.password.admin"]</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
}
|
||||
<div class="spacer"></div>
|
||||
</div>
|
||||
|
||||
@@ -5,37 +5,38 @@
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let op = sax.mdl.organisations = sax.mdl.organisations || { data: {}, ajax: {} };
|
||||
let $pnl = sax.$pnl, $frm = sax.$frm, $dlg = sax.$dlg;
|
||||
sax.itemIdPrefix = 'Itm_';
|
||||
var $results;
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.refreshResults = function (delay)
|
||||
{
|
||||
if (!sax.awaitingRefreshResponse)
|
||||
if (!op.awaitingRefreshResponse)
|
||||
{
|
||||
var $items = $('.sax-panel-item-list', $results).fadeOut(200).empty();
|
||||
var $msgs = $('.sax-panel-messages', $results).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
var $items = $('.sax-panel-item-list', $pnl.results).fadeOut(200).empty();
|
||||
var $msgs = $('.sax-panel-messages', $pnl.results).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
}
|
||||
sax.ajax.refreshResults = sax.ajax.refreshResults || { url: sax.url.base + 'Organisation/Ajax/GetList', formId: 'frmOrganisationFilter', callbackFn: sax.doRefreshResults };
|
||||
sax.doAjaxRequest(sax.ajax.refreshResults, delay || 50);
|
||||
sax.awaitingRefreshResponse = true;
|
||||
op.ajax.refreshResults = op.ajax.refreshResults || { url: sax.url.base + 'Organisation/Ajax/GetList', formId: 'frmOrganisationFilter', callbackFn: op.doRefreshResults };
|
||||
sax.doAjaxRequest(op.ajax.refreshResults, delay || 50);
|
||||
op.awaitingRefreshResponse = true;
|
||||
}
|
||||
sax.getItemTemplate = function ()
|
||||
op.getItemTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-panel-item.Organisation', $results);
|
||||
return $('.sax-panel-item-template .sax-panel-item.Organisation', $pnl.results);
|
||||
}
|
||||
sax.getDropdownItemTemplate = function ()
|
||||
op.getDropdownItemTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.Organisation li.sax-dropdown-item', $results);
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.Organisation li.sax-dropdown-item', $pnl.results);
|
||||
}
|
||||
sax.doRefreshResults = function (response)
|
||||
op.doRefreshResults = function (response)
|
||||
{
|
||||
//sax.debug('doRefreshResults', response);
|
||||
delete sax.awaitingRefreshResponse;
|
||||
delete op.awaitingRefreshResponse;
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
var $msgs = $('.sax-panel-messages', $results).hide().empty();
|
||||
var $items = $('.sax-panel-item-list', $results).hide().empty();
|
||||
var $tmpl = sax.getItemTemplate();
|
||||
var $msgs = $('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
var $items = $('.sax-panel-item-list', $pnl.results).hide().empty();
|
||||
var $tmpl = op.getItemTemplate();
|
||||
sax.refreshPaging(response, '#frmOrganisationFilter', sax.refreshResults);
|
||||
if (!response.success) return;
|
||||
// Reference data - Statuses.
|
||||
@@ -50,12 +51,12 @@
|
||||
{
|
||||
let item = items[itemIdx];
|
||||
let $item = $tmpl.clone();
|
||||
sax.populateItem($item, item);
|
||||
op.populateItem($item, item);
|
||||
$items.append($item);
|
||||
}
|
||||
$items.fadeIn(50);
|
||||
}
|
||||
sax.populateItem = function ($item, item)
|
||||
op.populateItem = function ($item, item)
|
||||
{
|
||||
if (!item) return;
|
||||
$item.prop('id', sax.itemIdPrefix + item.id);
|
||||
@@ -70,233 +71,210 @@
|
||||
if (!item.deleted)
|
||||
{
|
||||
let $mnu = $('ul.sax-dropdown-menu', $item);
|
||||
$mnu.append(sax.getDropdownItemTemplate().clone().find('div.sax-label').text(sax.lbl.edit).end().on('click', function () { sax.updateItem(item.id) }));
|
||||
$mnu.append(op.getDropdownItemTemplate().clone().find('div.sax-label').text(sax.lbl.edit).end().on('click', function () { sax.updateItem(item.id) }));
|
||||
if (item.awaiting)
|
||||
$mnu.append(sax.getDropdownItemTemplate().clone().find('div.sax-label').text(sax.lbl.activate).end().on('click', function () { sax.activateItem(item.id) }));
|
||||
$mnu.append(op.getDropdownItemTemplate().clone().find('div.sax-label').text(sax.lbl.activate).end().on('click', function () { sax.activateItem(item.id) }));
|
||||
$('.sax-header .sax-action.sax-item-update', $item).off('click').on('click', function () { sax.updateItem(item.id) });
|
||||
$item.off('dblclick').on('dblclick', function () { sax.updateItem(item.id) });
|
||||
}
|
||||
$('.sax-burger', $item).toggle(!!$('.sax-burger .sax-dropdown-menu .sax-dropdown-item', $item).length);
|
||||
$('.sax-panel-messages', $results).hide().empty();
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
return $item;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
op.selectFilterSport = function ()
|
||||
{
|
||||
if (!op.data.sports)
|
||||
op.populateSports(op.showSelectFilterSport);
|
||||
else op.showSelectFilterSport();
|
||||
}
|
||||
op.showSelectFilterSport = function ()
|
||||
{
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectSport, items: op.data.sports, fnCallback: op.onFilterSportSelected });
|
||||
}
|
||||
op.onFilterSportSelected = function (spt)
|
||||
{
|
||||
let frm = $frm.filter;
|
||||
$('.FilterOrganisationSportId', frm).val(spt.id);
|
||||
$('.FilterOrganisationSportCaption', frm).val(spt.name);
|
||||
sax.refreshResults();
|
||||
}
|
||||
op.clearFilterSport = function ()
|
||||
{
|
||||
$('.FilterOrganisationSportId,.FilterOrganisationSportCaption', $frm.filter).val('');
|
||||
sax.refreshResults();
|
||||
}
|
||||
op.populateSports = function (nextFn)
|
||||
{
|
||||
let handleResponse = function (response)
|
||||
{
|
||||
if (response && response.success && response.sports)
|
||||
op.data.sports = response.sports;
|
||||
if (nextFn) nextFn();
|
||||
}
|
||||
op.ajax.sports = op.ajax.sports || { url: sax.url.base + 'Sport/Ajax/GetList', formId: 'frmNavigate', callbackFn: handleResponse };
|
||||
sax.doAjaxRequest(op.ajax.sports, 50);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.selectSport = function ()
|
||||
{
|
||||
if (!sax.data.sports)
|
||||
{
|
||||
let handleSportsResponse = function (response)
|
||||
{
|
||||
if (response && response.success && response.sports)
|
||||
sax.data.sports = response.sports;
|
||||
sax.showSelectSport();
|
||||
}
|
||||
sax.ajax.sports = sax.ajax.sports || { url: sax.url.base + 'Sport/Ajax/GetList', formId: 'frmNavigate', callbackFn: handleSportsResponse };
|
||||
sax.doAjaxRequest(sax.ajax.sports, 50);
|
||||
}
|
||||
if (!op.data.sports)
|
||||
op.populateSports(sax.showSelectSport);
|
||||
else sax.showSelectSport();
|
||||
}
|
||||
sax.showSelectSport = function ()
|
||||
{
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectSport, items: sax.data.sports, fnCallback: sax.onSportSelected });
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectSport, items: op.data.sports, fnCallback: sax.onSportSelected });
|
||||
}
|
||||
sax.onSportSelected = function (spt)
|
||||
{
|
||||
let $frm = sax.$frm.organisation;
|
||||
$('.OrganisationSportId', $frm).val(spt.id);
|
||||
$('.OrganisationSportCaption', $frm).val(spt.name);
|
||||
sax.clearControlError($('.OrganisationSportCaption', $frm));
|
||||
let frm = $frm.org;
|
||||
$('.OrganisationSportId', frm).val(spt.id);
|
||||
$('.OrganisationSportCaption', frm).val(spt.name);
|
||||
sax.clearControlError($('.OrganisationSportCaption', frm));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.selectFilterSport = function ()
|
||||
op.selectFilterRegion = function ()
|
||||
{
|
||||
if (!sax.data.sports)
|
||||
if (!op.data.regions)
|
||||
op.populateRegions(op.showSelectFilterRegion);
|
||||
else op.showSelectFilterRegion();
|
||||
}
|
||||
op.showSelectFilterRegion = function ()
|
||||
{
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectFilterRegion, items: op.data.regions, fnCallback: op.onFilterRegionSelected });
|
||||
}
|
||||
op.onFilterRegionSelected = function (rgn)
|
||||
{
|
||||
//sax.debug('onFilterRegionSelected', rgn);
|
||||
let frm = $frm.filter;
|
||||
$('.FilterOrganisationRegionId', frm).val(rgn.id);
|
||||
$('.FilterOrganisationRegionCaption', frm).val(rgn.name);
|
||||
sax.refreshResults();
|
||||
}
|
||||
op.clearFilterRegion = function ()
|
||||
{
|
||||
$('.FilterOrganisationRegionId,.FilterOrganisationRegionCaption', $frm.filter).val('');
|
||||
sax.refreshResults();
|
||||
}
|
||||
op.populateRegions = function (nextFn)
|
||||
{
|
||||
let handleResponse = function (response)
|
||||
{
|
||||
let handleFilterSportsResponse = function (response)
|
||||
{
|
||||
if (response && response.success && response.sports)
|
||||
sax.data.sports = response.sports;
|
||||
sax.showSelectFilterSport();
|
||||
}
|
||||
sax.ajax.filterSports = sax.ajax.filterSports || { url: sax.url.base + 'Sport/Ajax/GetList', formId: 'frmNavigate', callbackFn: handleFilterSportsResponse };
|
||||
sax.doAjaxRequest(sax.ajax.filterSports, 50);
|
||||
if (response && response.success && response.regions)
|
||||
op.data.regions = response.regions;
|
||||
if (nextFn) nextFn();
|
||||
}
|
||||
else sax.showSelectFilterSport();
|
||||
}
|
||||
sax.showSelectFilterSport = function ()
|
||||
{
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectSport, items: sax.data.sports, fnCallback: sax.onFilterSportSelected });
|
||||
}
|
||||
sax.onFilterSportSelected = function (spt)
|
||||
{
|
||||
//sax.debug('onFilterSportSelected', sax.$frm.filter)
|
||||
let $frm = sax.$frm.filter;
|
||||
$('.FilterOrganisationSportId', $frm).val(spt.id);
|
||||
$('.FilterOrganisationSportCaption', $frm).val(spt.name);
|
||||
sax.refreshResults();
|
||||
}
|
||||
sax.clearFilterSport = function ()
|
||||
{
|
||||
$('.FilterOrganisationSportId,.FilterOrganisationSportCaption', sax.$frm.filter).val('');
|
||||
sax.refreshResults();
|
||||
op.ajax.regions = op.ajax.regions || { url: sax.url.base + 'Region/Ajax/GetList', formId: 'frmNavigate', callbackFn: handleResponse };
|
||||
sax.doAjaxRequest(op.ajax.regions, 50);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.selectRegion = function ()
|
||||
{
|
||||
if (!sax.data.regions)
|
||||
{
|
||||
let handleRegionsResponse = function (response)
|
||||
{
|
||||
if (response && response.success && response.regions)
|
||||
sax.data.regions = response.regions;
|
||||
sax.showSelectRegion();
|
||||
}
|
||||
sax.ajax.regions = sax.ajax.regions || { url: sax.url.base + 'Region/Ajax/GetList', formId: 'frmNavigate', callbackFn: handleRegionsResponse };
|
||||
sax.doAjaxRequest(sax.ajax.regions, 50);
|
||||
}
|
||||
if (!op.data.regions)
|
||||
op.populateRegions(sax.showSelectRegion);
|
||||
else sax.showSelectRegion();
|
||||
}
|
||||
sax.showSelectRegion = function ()
|
||||
{
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectRegion, items: sax.data.regions, fnCallback: sax.onRegionSelected });
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectRegion, items: op.data.regions, fnCallback: sax.onRegionSelected });
|
||||
}
|
||||
sax.onRegionSelected = function (rgn)
|
||||
{
|
||||
//sax.debug('onRegionSelected', rgn);
|
||||
let $frm = sax.$frm.organisation;
|
||||
$('.OrganisationRegionIdCountry', $frm).val(rgn.id);
|
||||
$('.OrganisationRegionCaptionCountry', $frm).val(rgn.name);
|
||||
sax.clearControlError($('.OrganisationRegionCaptionCountry', $frm));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.selectFilterRegion = function ()
|
||||
{
|
||||
if (!sax.data.regions)
|
||||
{
|
||||
let handleFilterRegionsResponse = function (response)
|
||||
{
|
||||
if (response && response.success && response.regions)
|
||||
sax.data.regions = response.regions;
|
||||
sax.showSelectFilterRegion();
|
||||
}
|
||||
sax.ajax.regions = sax.ajax.regions || { url: sax.url.base + 'Region/Ajax/GetList', formId: 'frmNavigate', callbackFn: handleFilterRegionsResponse };
|
||||
sax.doAjaxRequest(sax.ajax.regions, 50);
|
||||
}
|
||||
else sax.showSelectFilterRegion();
|
||||
}
|
||||
sax.showSelectFilterRegion = function ()
|
||||
{
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectFilterRegion, items: sax.data.regions, fnCallback: sax.onFilterRegionSelected });
|
||||
}
|
||||
sax.onFilterRegionSelected = function (rgn)
|
||||
{
|
||||
//sax.debug('onFilterRegionSelected', rgn);
|
||||
let $frm = sax.$frm.filter;
|
||||
$('.FilterOrganisationRegionId', $frm).val(rgn.id);
|
||||
$('.FilterOrganisationRegionCaption', $frm).val(rgn.name);
|
||||
sax.refreshResults();
|
||||
}
|
||||
sax.clearFilterRegion = function ()
|
||||
{
|
||||
$('.FilterOrganisationRegionId,.FilterOrganisationRegionCaption', sax.$frm.filter).val('');
|
||||
sax.refreshResults();
|
||||
let frm = $frm.org;
|
||||
$('.OrganisationRegionIdCountry', frm).val(rgn.id);
|
||||
$('.OrganisationRegionCaptionCountry', frm).val(rgn.name);
|
||||
sax.clearControlError($('.OrganisationRegionCaptionCountry', frm));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.createItem = function ()
|
||||
{
|
||||
let $frm = sax.$frm.organisation;
|
||||
$('.OrganisationId,.OrganisationSportId,.OrganisationRegionIdCountry,input[type="text"],textarea,select', $frm).val('');
|
||||
$('.OrganisationStatus', $frm).val(sax.data.defaultStatusCode);
|
||||
let frm = $frm.org;
|
||||
$('.OrganisationId,.OrganisationSportId,.OrganisationRegionIdCountry,input[type="text"],textarea,select', frm).val('');
|
||||
$('.OrganisationStatus', frm).val(sax.data.defaultStatusCode);
|
||||
sax.clearControlErrors();
|
||||
sax.$dlg.organisation.dialog('option', 'title', sax.dlg.title.createOrganisation);
|
||||
sax.openDialog(sax.$dlg.organisation, 600, 600);
|
||||
}
|
||||
sax.doCreateItem = function ()
|
||||
{
|
||||
sax.storeItem();
|
||||
$dlg.organisation.dialog('option', 'title', sax.dlg.title.createOrganisation);
|
||||
sax.openDialog($dlg.organisation, 600, 600);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.updateItem = function (id)
|
||||
{
|
||||
$('.OrganisationId', sax.$frm.organisationId).val(id);
|
||||
sax.ajax.updateItem = sax.ajax.updateItem || { url: sax.url.base + 'Organisation/Ajax/GetItem', formId: 'frmOrganisationId', callbackFn: sax.onUpdateItem };
|
||||
sax.doAjaxRequest(sax.ajax.updateItem, 50);
|
||||
$('.OrganisationId', $frm.orgId).val(id);
|
||||
op.ajax.updateItem = op.ajax.updateItem || { url: sax.url.base + 'Organisation/Ajax/GetItem', formId: 'frmOrganisationId', callbackFn: sax.onUpdateItem };
|
||||
sax.doAjaxRequest(op.ajax.updateItem, 50);
|
||||
}
|
||||
sax.onUpdateItem = function (response)
|
||||
{
|
||||
//sax.debug('onUpdateItem', response);
|
||||
let $frm = sax.$frm.organisation;
|
||||
$('.OrganisationId,input[type="text"],textarea,select', $frm).val('');
|
||||
let frm = $frm.org;
|
||||
$('.OrganisationId,input[type="text"],textarea,select', frm).val('');
|
||||
if (!response.success) return;
|
||||
let item = response.organisation;
|
||||
$('.OrganisationId', $frm).val(item.id);
|
||||
$('.OrganisationName', $frm).val(item.name);
|
||||
$('.OrganisationType', $frm).val(item.typeCode);
|
||||
$('.OrganisationCategory', $frm).val(item.categoryCode);
|
||||
$('.OrganisationSportId', $frm).val(item.sportId);
|
||||
$('.OrganisationSportCaption', $frm).val(item.sportName);
|
||||
$('.OrganisationRegionIdCountry', $frm).val(item.regionIdCountry);
|
||||
$('.OrganisationRegionCaptionCountry', $frm).val(item.regionNameCountry);
|
||||
$('.OrganisationStatus', $frm).val(item.statusCode);
|
||||
$('.OrganisationId', frm).val(item.id);
|
||||
$('.OrganisationName', frm).val(item.name);
|
||||
$('.OrganisationType', frm).val(item.typeCode);
|
||||
$('.OrganisationCategory', frm).val(item.categoryCode);
|
||||
$('.OrganisationSportId', frm).val(item.sportId);
|
||||
$('.OrganisationSportCaption', frm).val(item.sportName);
|
||||
$('.OrganisationRegionIdCountry', frm).val(item.regionIdCountry);
|
||||
$('.OrganisationRegionCaptionCountry', frm).val(item.regionNameCountry);
|
||||
$('.OrganisationStatus', frm).val(item.statusCode);
|
||||
sax.clearControlErrors();
|
||||
sax.$dlg.organisation.dialog('option', 'title', sax.dlg.title.updateOrganisation);
|
||||
sax.openDialog(sax.$dlg.organisation, 600, 600);
|
||||
}
|
||||
sax.doUpdateItem = function ()
|
||||
{
|
||||
sax.storeItem();
|
||||
$dlg.organisation.dialog('option', 'title', sax.dlg.title.updateOrganisation);
|
||||
sax.openDialog($dlg.organisation, 600, 600);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.storeItem = function ()
|
||||
{
|
||||
sax.ajax.storeItem = sax.ajax.storeItem || { url: sax.url.base + 'Organisation/Ajax/StoreItem', formId: 'frmOrganisation', callbackFn: sax.onStoreItem };
|
||||
sax.doAjaxRequest(sax.ajax.storeItem, 50);
|
||||
op.ajax.storeItem = op.ajax.storeItem || { url: sax.url.base + 'Organisation/Ajax/StoreItem', formId: 'frmOrganisation', callbackFn: sax.onStoreItem };
|
||||
sax.doAjaxRequest(op.ajax.storeItem, 50);
|
||||
}
|
||||
sax.onStoreItem = function (response)
|
||||
{
|
||||
//sax.debug('onStoreItem', response);
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
if (!response.success) return;
|
||||
sax.$dlg.organisation.dialog('close');
|
||||
$dlg.organisation.dialog('close');
|
||||
sax.refreshItem(response.organisation);
|
||||
}
|
||||
sax.refreshItem=function(item)
|
||||
sax.refreshItem = function (item)
|
||||
{
|
||||
var $item = $('#' + sax.itemIdPrefix + item.id);
|
||||
if (!$item.length)
|
||||
{
|
||||
$item = $('.sax-panel-item-template .sax-panel-item.Organisation', $results).clone();
|
||||
$('.sax-panel-item-list', $results).prepend($item).show();
|
||||
$item = $('.sax-panel-item-template .sax-panel-item.Organisation', $pnl.results).clone();
|
||||
$('.sax-panel-item-list', $pnl.results).prepend($item).show();
|
||||
}
|
||||
$item.replaceWith(sax.populateItem(sax.getItemTemplate(), item));
|
||||
$item.replaceWith(op.populateItem(op.getItemTemplate(), item));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.activateItem = function (id)
|
||||
{
|
||||
//sax.debug('activateItem(' + id + ')')
|
||||
$('.OrganisationId', sax.$frm.organisationId).val(id);
|
||||
sax.ajax.getActivationInfo = sax.ajax.getActivationInfo || { url: sax.url.base + 'Organisation/Ajax/GetActivationInfo', formId: 'frmOrganisationId', callbackFn: sax.showActivationInfo };
|
||||
sax.doAjaxRequest(sax.ajax.getActivationInfo, 50);
|
||||
$('.OrganisationId', $frm.orgId).val(id);
|
||||
op.ajax.getActivationInfo = op.ajax.getActivationInfo || { url: sax.url.base + 'Organisation/Ajax/GetActivationInfo', formId: 'frmOrganisationId', callbackFn: sax.showActivationInfo };
|
||||
sax.doAjaxRequest(op.ajax.getActivationInfo, 50);
|
||||
}
|
||||
sax.showActivationInfo = function (response)
|
||||
{
|
||||
sax.debug('showActivationInfo', response);
|
||||
if (!response.success || !response.organisation) return;
|
||||
let item = response.organisation;
|
||||
let $dlg = sax.$dlg.activate;
|
||||
let $frm = $('#frmOrganisationActivation');
|
||||
$('.OrganisationId', $frm).val($('.OrganisationId', sax.$frm.organisationId).val());
|
||||
let $dlg = $dlg.activate;
|
||||
let frm = $('#frmOrganisationActivation');
|
||||
$('.OrganisationId', frm).val($('.OrganisationId', $frm.orgId).val());
|
||||
let popItemValue = function (sel, val)
|
||||
{
|
||||
$(sel, $frm).toggle(!!val).find('.sax-value').text(val);
|
||||
$(sel, frm).toggle(!!val).find('.sax-value').text(val);
|
||||
}
|
||||
popItemValue('.OrganisationName', item.name);
|
||||
popItemValue('.OrganisationSport', item.sportName);
|
||||
@@ -311,7 +289,7 @@
|
||||
let item = response.members[idx];
|
||||
let $item = $mbrTmpl.clone();
|
||||
$('.MemberId', $item).val(item.id);
|
||||
$('.MemberActivate', $item).prop('name','MemberActivate_' + item.id)
|
||||
$('.MemberActivate', $item).prop('name', 'MemberActivate_' + item.id)
|
||||
$('.MemberEmail', $item).text(item.emailAddress);
|
||||
$('.MemberName', $item).text(item.displayName);
|
||||
$orgMbrs.append($item);
|
||||
@@ -321,15 +299,15 @@
|
||||
}
|
||||
sax.activateOrganisation = function ()
|
||||
{
|
||||
let $frm = $('#frmOrganisationActivation');
|
||||
sax.ajax.activateOrganisation = sax.ajax.activateOrganisation || { url: sax.url.base + 'Organisation/Ajax/Activate', formId: $frm.prop('id'), callbackFn: sax.handleAtivateResponse };
|
||||
sax.doAjaxRequest(sax.ajax.activateOrganisation, 50);
|
||||
let frm = $('#frmOrganisationActivation');
|
||||
op.ajax.activateOrganisation = op.ajax.activateOrganisation || { url: sax.url.base + 'Organisation/Ajax/Activate', formId: frm.prop('id'), callbackFn: sax.handleAtivateResponse };
|
||||
sax.doAjaxRequest(op.ajax.activateOrganisation, 50);
|
||||
}
|
||||
sax.handleAtivateResponse = function (response)
|
||||
{
|
||||
sax.debug('handleAtivateResponse', response);
|
||||
if (!response.success) return;
|
||||
sax.$dlg.activate.dialog('close');
|
||||
$dlg.activate.dialog('close');
|
||||
sax.refreshItem(response.organisation);
|
||||
}
|
||||
|
||||
@@ -338,35 +316,40 @@
|
||||
{
|
||||
if (!(id * 1)) return;
|
||||
sax.doPleaseWait();
|
||||
let $frm = $('#frmOrganisationId');
|
||||
$('.OrganisationId', $frm).val(id);
|
||||
$frm.prop('action', sax.url.base + 'Organisation/Members').submit();
|
||||
let frm = $('#frmOrganisationId');
|
||||
$('.OrganisationId', frm).val(id);
|
||||
frm.prop('action', sax.url.base + 'Organisation/Members').submit();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
$('.sax-panel-filter .sax-action.sax-item-create').on('click', function () { sax.createItem(); });
|
||||
$('.sax-panel-filter .sax-action.sax-results-refresh').on('click', function () { sax.refreshResults(); });
|
||||
$('.sax-input, .sax-textarea').on('input', function () { sax.clearControlError(this); });
|
||||
$('.sax-select').on('change', function () { sax.clearControlError(this); });
|
||||
$pnl.orgs = $('.sax-panel.Organisations');
|
||||
$pnl.filter = $('.sax-panel-filter', $pnl.orgs);
|
||||
$pnl.results = $('.sax-panel-results', $pnl.orgs);
|
||||
|
||||
sax.$frm.filter = $('#frmOrganisationFilter');
|
||||
$('.FilterOrganisation', sax.$frm.filter).on('input', function () { sax.refreshResults(250); });
|
||||
$('.FilterOrganisationCategory,.FilterOrganisationStatusCategory', sax.$frm.filter).on('change', function () { sax.refreshResults(50); });
|
||||
sax.$frm.organisationId = $('#frmOrganisationId');
|
||||
sax.$frm.organisation = $('#frmOrganisation');
|
||||
$results = $('.sax-panel-results');
|
||||
$('.sax-action.sax-item-create', $pnl.filter).on('click', function () { sax.createItem(); });
|
||||
$('.sax-action.sax-results-refresh', $pnl.filter).on('click', function () { sax.refreshResults(); });
|
||||
|
||||
$frm.filter = $('#frmOrganisationFilter');
|
||||
$('.FilterOrganisation', $frm.filter).on('input', function () { sax.refreshResults(250); });
|
||||
$('.FilterOrganisationCategory,.FilterOrganisationStatusCategory', $frm.filter).on('change', function () { sax.refreshResults(50); });
|
||||
$frm.filter.on('dblclick', '.FilterOrganisationSportCaption', op.selectFilterSport).on('click', '.FilterSportSelect', op.selectFilterSport).on('click', '.FilterSportClear', op.clearFilterSport);
|
||||
$frm.filter.on('dblclick', '.FilterOrganisationRegionCaption', op.selectFilterRegion).on('click', '.FilterRegionSelect', op.selectFilterRegion).on('click', '.FilterRegionClear', op.clearFilterRegion);
|
||||
$frm.orgId = $('#frmOrganisationId');
|
||||
$frm.org = $('#frmOrganisation');
|
||||
$('.sax-input, .sax-textarea', $frm.org).on('input', function () { sax.clearControlError(this); });
|
||||
$('.sax-select', $frm.org).on('change', function () { sax.clearControlError(this); });
|
||||
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sax.doCreateItem(); };
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sax.storeItem(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
sax.$dlg.organisation = $('#dlgOrganisation').dialog(opt);
|
||||
$dlg.organisation = $('#dlgOrganisation').dialog(opt);
|
||||
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sax.activateOrganisation(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
sax.$dlg.activate = $('#dlgOrganisationActivation').dialog(opt);
|
||||
$dlg.activate = $('#dlgOrganisationActivation').dialog(opt);
|
||||
|
||||
setTimeout(sax.refreshResults, 250);
|
||||
});
|
||||
|
||||
@@ -103,6 +103,74 @@
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.selectFilterSport = function ()
|
||||
{
|
||||
if (!sax.data.sports)
|
||||
{
|
||||
let handleFilterSportsResponse = function (response)
|
||||
{
|
||||
if (response && response.success && response.sports)
|
||||
sax.data.sports = response.sports;
|
||||
sax.showSelectFilterSport();
|
||||
}
|
||||
sax.ajax.filterSports = sax.ajax.filterSports || { url: sax.url.base + 'Sport/Ajax/GetList', formId: 'frmNavigate', callbackFn: handleFilterSportsResponse };
|
||||
sax.doAjaxRequest(sax.ajax.filterSports, 50);
|
||||
}
|
||||
else sax.showSelectFilterSport();
|
||||
}
|
||||
sax.showSelectFilterSport = function ()
|
||||
{
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectSport, items: sax.data.sports, fnCallback: sax.onFilterSportSelected });
|
||||
}
|
||||
sax.onFilterSportSelected = function (spt)
|
||||
{
|
||||
//sax.debug('onFilterSportSelected', sax.$frm.filter)
|
||||
let $frm = sax.$frm.filter;
|
||||
$('.FilterUserSportId', $frm).val(spt.id);
|
||||
$('.FilterUserSportCaption', $frm).val(spt.name);
|
||||
sax.refreshResults();
|
||||
}
|
||||
sax.clearFilterSport = function ()
|
||||
{
|
||||
$('.FilterUserSportId,.FilterUserSportCaption', sax.$frm.filter).val('');
|
||||
sax.refreshResults();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.selectFilterRegion = function ()
|
||||
{
|
||||
if (!sax.data.regions)
|
||||
{
|
||||
let handleFilterRegionsResponse = function (response)
|
||||
{
|
||||
if (response && response.success && response.regions)
|
||||
sax.data.regions = response.regions;
|
||||
sax.showSelectFilterRegion();
|
||||
}
|
||||
sax.ajax.regions = sax.ajax.regions || { url: sax.url.base + 'Region/Ajax/GetList', formId: 'frmNavigate', callbackFn: handleFilterRegionsResponse };
|
||||
sax.doAjaxRequest(sax.ajax.regions, 50);
|
||||
}
|
||||
else sax.showSelectFilterRegion();
|
||||
}
|
||||
sax.showSelectFilterRegion = function ()
|
||||
{
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectFilterRegion, items: sax.data.regions, fnCallback: sax.onFilterRegionSelected });
|
||||
}
|
||||
sax.onFilterRegionSelected = function (rgn)
|
||||
{
|
||||
//sax.debug('onFilterRegionSelected', rgn);
|
||||
let $frm = sax.$frm.filter;
|
||||
$('.FilterUserRegionId', $frm).val(rgn.id);
|
||||
$('.FilterUserRegionCaption', $frm).val(rgn.name);
|
||||
sax.refreshResults();
|
||||
}
|
||||
sax.clearFilterRegion = function ()
|
||||
{
|
||||
$('.FilterUserRegionId,.FilterUserRegionCaption', sax.$frm.filter).val('');
|
||||
sax.refreshResults();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// User Roles.
|
||||
sax.selectUserRoles = function ()
|
||||
@@ -228,6 +296,7 @@
|
||||
|
||||
$frm.filter = $('#frmUserFilter');
|
||||
$('.FilterUser', $frm.filter).on('input', function () { sax.refreshResults(250); });
|
||||
$('.FilterUserStatusCategory', $frm.filter).on('change', function () { sax.refreshResults(50); });
|
||||
$frm.userId = $('#frmUserId');
|
||||
$frm.user = $('#frmUser');
|
||||
$('.sax-input, .sax-textarea', $frm.user).on('input', function () { sax.clearControlError(this); });
|
||||
|
||||
Reference in New Issue
Block a user