This commit is contained in:
Andy Howard
2024-11-26 11:33:22 +00:00
parent 8b872cc8f3
commit c8b5df5909
56 changed files with 1122 additions and 860 deletions
@@ -83,7 +83,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Account
[Route("Account/UserAccount/Ajax/GetUserList")]
public IActionResult Ajax_GetUserList(Model_UserAccount model)
{
String fn = GetType().Name + ".Ajax_GetUserList";
String messageTitle = Localiser["label.users"];
AjaxResponse_UserList responseData = new AjaxResponse_UserList(model);
@@ -173,7 +172,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Account
[Route("Account/UserAccount/Ajax/GetUser")]
public IActionResult Ajax_GetUser(Model_UserAccount model)
{
String fn = GetType().Name + ".Ajax_GetUser";
String messageTitle = Localiser["label.user"];
AjaxResponse_User responseData = new AjaxResponse_User(model);
@@ -214,7 +212,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Account
[Route("Account/UserAccount/Ajax/GetUserByEmail")]
public IActionResult Ajax_GetUserByEmail(Model_UserAccount model)
{
String fn = GetType().Name + ".Ajax_GetUserByEmail";
String messageTitle = Localiser["label.user"];
AjaxResponse_User responseData = new AjaxResponse_User(model);
StoreSessionData = false;
@@ -259,7 +256,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Account
[Route("Account/UserAccount/Ajax/StoreUser")]
public IActionResult Ajax_StoreUser(Model_UserAccount model)
{
String fn = GetType().Name + ".Ajax_StoreUser";
String messageTitle = Localiser["label.user"];
AjaxResponse_User responseData = new AjaxResponse_User(model);
@@ -357,7 +353,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Account
[Route("Account/UserAccount/Ajax/SendEmails")]
public IActionResult Ajax_SendEmails(Model_UserAccount model)
{
String fn = GetType().Name + ".Ajax_SendEmails";
String messageTitle = Localiser["label.emails"];
AjaxResponse_User responseData = new AjaxResponse_User(model);
@@ -70,7 +70,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
[Route("Instance/Owner/Ajax/GetOwnerList")]
public IActionResult Ajax_GetOwnerList(Model_Owner model)
{
String fn = GetType().Name + ".Ajax_GetOwnerList";
String messageTitle = Localiser["label.owners"];
AjaxResponse_OwnerList responseData = new AjaxResponse_OwnerList(model);
@@ -157,7 +156,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
[Route("Instance/Owner/Ajax/GetOwner")]
public IActionResult Ajax_GetOwner(Model_Owner model)
{
String fn = GetType().Name + ".Ajax_GetOwner";
String messageTitle = Localiser["label.owner"];
AjaxResponse_Owner responseData = new AjaxResponse_Owner(model);
@@ -199,7 +197,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
[Route("Instance/Owner/Ajax/StoreOwner")]
public IActionResult Ajax_StoreOwner(Model_Owner model)
{
String fn = GetType().Name + ".Ajax_StoreOwner";
String messageTitle = Localiser["label.owner"];
AjaxResponse_Owner responseData = new AjaxResponse_Owner(model);
@@ -72,7 +72,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
[Route("Instance/Repository/Ajax/GetRepositoryList")]
public IActionResult Ajax_GetRepositoryList(Model_Repository model)
{
String fn = GetType().Name + ".Ajax_GetRepositoryList";
String messageTitle = Localiser["label.repositories"];
AjaxResponse_RepositoryList responseData = new AjaxResponse_RepositoryList(model);
@@ -156,7 +155,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
[Route("Instance/Repository/Ajax/GetRepository")]
public IActionResult Ajax_GetRepository(Model_Repository model)
{
String fn = GetType().Name + ".Ajax_GetRepository";
String messageTitle = Localiser["label.repository"];
AjaxResponse_Repository responseData = new AjaxResponse_Repository(model);
@@ -207,7 +205,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
[Route("Instance/Repository/Ajax/StoreRepository")]
public IActionResult Ajax_StoreRepository(Model_Repository model)
{
String fn = GetType().Name + ".Ajax_StoreRepository";
String messageTitle = Localiser["label.repository"];
AjaxResponse_Repository responseData = new AjaxResponse_Repository(model);
@@ -56,7 +56,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers
[HttpGet, HttpPost]
public IActionResult ChangePassword(Model_Security model)
{
String fn = GetType().Name + ".ChangePassword";
bool validSessionRequired = true;
if (Request.Method.EqualsCI(HttpMethods.Get))
@@ -79,19 +78,19 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers
model.rpe = encryptedParams;
validSessionRequired = false;
}
else SaLogger.Warn(fn + " 'Request Password' parameters supplied but invalid. " + logSuffix);
else SaLogger.Warn($"{SysUtil.Fn} 'Request Password' parameters supplied but invalid. {logSuffix}");
}
else SaLogger.Warn(fn + " 'Request Password' parameters supplied but account is not active. " + logSuffix);
else SaLogger.Warn($"{SysUtil.Fn} 'Request Password' parameters supplied but account is not active. {logSuffix}");
}
else
{
// User Account not found - redirect to Portal application.
String redirectParamName = ParamName_RequestPasswordEncrypted + "2";
SaLogger.Warn(fn + " 'Request Password' parameters supplied but account is not 'Admin'. " + logSuffix);
SaLogger.Warn($"{SysUtil.Fn} 'Request Password' parameters supplied but account is not 'Admin'. {logSuffix}");
if (!Request.Query.Keys.Contains(redirectParamName) && !StringUtil.IsEmpty(AppConfig.URL.Portal.Root))
{
UriBuilder uri = new UriBuilder(Regex.Replace(AppConfig.URL.Portal.Root, "/$", "") + "/Security/ChangePassword");
uri.Query = ParamName_RequestPasswordEncrypted + "=" + Uri.EscapeDataString(encryptedParams) + "&" + redirectParamName;
uri.Query = $"{ParamName_RequestPasswordEncrypted}={Uri.EscapeDataString(encryptedParams)}&{redirectParamName}";
return Redirect(uri.Uri.OriginalString);
}
}
@@ -109,12 +109,12 @@ table.sbmc-striped
table.sbmc-striped tr.sbmc-odd
{
background-color:#fff;
background-color: #fff;
}
table.sbmc-striped tr.sbmc-even
{
background-color:#f8f8f8;
background-color: #f8f8f8;
}
th, td
@@ -215,7 +215,32 @@ td.action
text-align: center;
}
.fullwidth
.width5pc
{
width: 5%;
}
.width10pc
{
width: 10%;
}
.width20pc
{
width: 20%;
}
.width25pc
{
width: 25%;
}
.width50pc
{
width: 50%;
}
.fullwidth, .width100pc
{
width: 100%;
}
@@ -409,9 +434,9 @@ td.action
z-index: 99;
}
.hidden
.hidden, .sbm-hidden
{
display: none;
display: none !important;
}
.shadow
@@ -13,10 +13,6 @@
--color-primary: #4b0082;
--color-light: #9b71b9;
--color-pale: #ebe2f1;
/* Tetrad/Square colors */
--color-alt1: #820a00;
--color-alt2: #378200;
--color-alt3: #007882;
/* Data panels */
--color-panel-data: var(--color-Purple);
--color-panel-data-background: var(--color-Purple);
@@ -391,7 +387,7 @@ a:focus
.ui-dialog.no-close .ui-dialog-titlebar-close
{
/*display: none;*/
display: none;
}
.ui-dialog .ui-dialog-buttonpane
@@ -219,7 +219,7 @@
sbc.$dlg.alert = $('<div id="dlgAlert"><div id="dlgAlertMsg"></div></div>').dialog(opt);
}
$('#dlgAlertMsg', sbc.$dlg.alert).html(msg.replace(/\\n/g, '<br>'));
let btns = [];
let btns = {};
btns[sbc.lbl.ok] = function () { $(this).dialog('close'); if (onOk) onOk(); };
sbc.$dlg.alert.dialog('option', { title: title || sbc.dlg.title.alert, buttons: btns });
sbc.openDialog(sbc.$dlg.alert);
@@ -236,7 +236,7 @@
var opt = sbc.dlgOpts();
sbc.$dlg.confirm = $('<div id="dlgConfirm"><div class="spacer2"></div><div id="dlgConfirmMsg"></div></div>').dialog(opt);
}
var btns = [];
let btns = {};
btns[sbc.lbl.yes] = function () { $(this).dialog('close'); if (onOk) onOk(); };
btns[sbc.lbl.no] = function () { $(this).dialog('close'); if (onCancel) onCancel(); };
sbc.$dlg.confirm.dialog('option', { title: title || sbc.dlg.title.confirm, buttons: btns });