v1.2.8
This commit is contained in:
@@ -177,6 +177,12 @@
|
||||
<data name="caption.contact.method" xml:space="preserve">
|
||||
<value>Contact Method</value>
|
||||
</data>
|
||||
<data name="caption.member.create" xml:space="preserve">
|
||||
<value>Add Member</value>
|
||||
</data>
|
||||
<data name="caption.member.update" xml:space="preserve">
|
||||
<value>Update Member</value>
|
||||
</data>
|
||||
<data name="company.name" xml:space="preserve">
|
||||
<value>Solum Forti</value>
|
||||
</data>
|
||||
@@ -719,12 +725,6 @@ You will then be able to publicise your sporting activities.</value>
|
||||
<data name="organisation.caption.events" xml:space="preserve">
|
||||
<value>Events</value>
|
||||
</data>
|
||||
<data name="organisation.caption.member.create" xml:space="preserve">
|
||||
<value>Add Member</value>
|
||||
</data>
|
||||
<data name="organisation.caption.member.update" xml:space="preserve">
|
||||
<value>Update Member</value>
|
||||
</data>
|
||||
<data name="organisation.caption.opportunities" xml:space="preserve">
|
||||
<value>Organisation Opportunities</value>
|
||||
</data>
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
// NB Only allowed if there isn't a current user session.
|
||||
if (!ValidUserSession && AppConfig.Security.SignIn.KeepLoggedIn.Allowed)
|
||||
{
|
||||
String encryptedParams = GetRequestCookie(CookieName_KeepLoggedIn);
|
||||
String encryptedParams = GetRequestCookie(KeepLoggedIn.CookieName);
|
||||
KeepLoggedInParams keepLoggedInParams = ExtractKeepLoggedInParams(encryptedParams);
|
||||
String logSuffix = keepLoggedInParams.GetValidParams().Concat("", " ", ".");
|
||||
if (SysId.IsValid(keepLoggedInParams.UserAccountId))
|
||||
|
||||
@@ -203,16 +203,16 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
{
|
||||
String keepLoggedInCookieValue = GenerateKeepLoggedInCookieValue();
|
||||
int cookieExpiresDays = Math.Max(Sax.Config.Security.SignIn.KeepLoggedIn.CookieExpiresDays_Min, Math.Min(Sax.Config.Security.SignIn.KeepLoggedIn.CookieExpiresDays_Max, AppConfig.Security.SignIn.KeepLoggedIn.CookieExpiresDays));
|
||||
SetResponseCookie(CookieName_KeepLoggedIn, keepLoggedInCookieValue, DateTime.Now.AddDays(cookieExpiresDays), true);
|
||||
SetResponseCookie(KeepLoggedIn.CookieName, keepLoggedInCookieValue, DateTime.Now.AddDays(cookieExpiresDays), true);
|
||||
SaLogger.Info(this.GetType().Name + ".SetKeepLoggedInCookie 'Keep Logged In' cookie set. Value: " + keepLoggedInCookieValue);
|
||||
}
|
||||
|
||||
/// <summary>Set the 'Keep Logged In' response cookie to expired with no data.</summary>
|
||||
public void ClearKeepLoggedInCookie()
|
||||
{
|
||||
if (StringUtil.IsEmpty(GetRequestCookie(CookieName_KeepLoggedIn))) return;
|
||||
if (StringUtil.IsEmpty(GetRequestCookie(KeepLoggedIn.CookieName))) return;
|
||||
// Clear cookie by setting expiry date in the past.
|
||||
SetResponseCookie(CookieName_KeepLoggedIn, "", DateTime.Today.AddDays(-7), true);
|
||||
SetResponseCookie(KeepLoggedIn.CookieName, "", DateTime.Today.AddDays(-7), true);
|
||||
SaLogger.Info(GetType().Name + ".ClearKeepLoggedInCookie 'Keep Logged In' cookie cleared.");
|
||||
}
|
||||
|
||||
@@ -223,10 +223,13 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
// - Generating IV from same key results in different value each time.
|
||||
// - IV Must be regenerated if key is changed: uncomment 'Generated' variable and copy resulting value to IV variable.
|
||||
// NB - 'Keep Logged In' is termed 'Remember Me' in the Online application.
|
||||
public static String CookieName_KeepLoggedIn = "SAXRM";
|
||||
public static String Base64Key_KeepLoggedIn = SacsEncryptionHelper.EncodePlainKey("<=Saxonite^OnlIne{R$Member-m3}~>", SacsEncryptionHelper.KeyLength);
|
||||
//public static String Base64IV_KeepLoggedIn_Generated = SacsEncryptionHelper.InitSymmetricEncryptionIV(Base64Key_KeepLoggedIn);
|
||||
public static String Base64IV_KeepLoggedIn = "zZiDncOwG4H+PpChrd4DvA==";
|
||||
public static class KeepLoggedIn
|
||||
{
|
||||
public static String CookieName = "SAXRM";
|
||||
public static String Base64Key = SacsEncryptionHelper.EncodePlainKey("<=Saxonite^OnlIne{R$Member-m3}~>", SacsEncryptionHelper.KeyLength);
|
||||
//private static String Base64IV_Generated = SacsEncryptionHelper.InitSymmetricEncryptionIV(KeepLoggedIn.Base64Key);
|
||||
public static String Base64IV = "zZiDncOwG4H+PpChrd4DvA==";
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Keep-logged-in cookie value.
|
||||
@@ -235,7 +238,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
{
|
||||
NameValueCollection keepLoggedInParams = new NameValueCollection();
|
||||
keepLoggedInParams.Add(ParamName_KeepLoggedIn_UserAccountId, SysId.ToString(SessionData_Online.User.UserAccountId));
|
||||
return EncryptParameters(keepLoggedInParams, Base64IV_KeepLoggedIn, Base64Key_KeepLoggedIn);
|
||||
return EncryptParameters(keepLoggedInParams, KeepLoggedIn.Base64IV, KeepLoggedIn.Base64Key);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -256,7 +259,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
KeepLoggedInParams keepLoggedInParams = new KeepLoggedInParams();
|
||||
if (!StringUtil.IsEmpty(encryptedParams))
|
||||
{
|
||||
NameValueCollection linkParams = DecryptParameters(encryptedParams, Base64IV_KeepLoggedIn, Base64Key_KeepLoggedIn);
|
||||
NameValueCollection linkParams = DecryptParameters(encryptedParams, KeepLoggedIn.Base64IV, KeepLoggedIn.Base64Key);
|
||||
keepLoggedInParams.UserAccountId = new SysId(StringUtil.ToInt(linkParams.Get(ParamName_KeepLoggedIn_UserAccountId)));
|
||||
}
|
||||
if (DebugMode) SaLogger.Info(GetType().Name + ".ExtractKeepLoggedInParams UserAccountId: " + SysId.ToString(keepLoggedInParams.UserAccountId));
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
return Json(responseData);
|
||||
|
||||
// Resend the cookie to extend the expiry date if it is currently populated.
|
||||
if (!StringUtil.IsEmpty(GetRequestCookie(CookieName_KeepLoggedIn)))
|
||||
if (!StringUtil.IsEmpty(GetRequestCookie(KeepLoggedIn.CookieName)))
|
||||
SetKeepLoggedInCookie();
|
||||
|
||||
// Construct response.
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
<div class="col-sm">
|
||||
<div class="sax-control row">
|
||||
<input type="hidden" name="Organisation.SportId" class="OrganisationSportId" />
|
||||
<div class="col"><input type="text" class="OrganisationSportCaption sax-input" readonly="readonly" /> </div>
|
||||
<div class="fixed"><button class="SelectSport sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px">@Localiser["label.select"]</button></div>
|
||||
<div class="col"><input type="text" class="OrganisationSportName sax-input" readonly="readonly" /> </div>
|
||||
<div class="fixed"><button class="SelectOrganisationSport sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
}
|
||||
|
||||
<script type="text/javascript">
|
||||
sax.dlg.title.createMember = '@Localiser.GetJavascriptText("organisation.caption.member.create")';
|
||||
sax.dlg.title.updateMember = '@Localiser.GetJavascriptText("organisation.caption.member.update")';
|
||||
sax.dlg.title.createMember = '@Localiser.GetJavascriptText("caption.member.create")';
|
||||
sax.dlg.title.updateMember = '@Localiser.GetJavascriptText("caption.member.update")';
|
||||
sax.dlg.title.selectRegion = '@Localiser.GetJavascriptText("reference.caption.region.select")';
|
||||
sax.dlg.title.selectSport = '@Localiser.GetJavascriptText("reference.caption.sport.select")';
|
||||
sax.data.userRoleCodeDelim = '@Model.MemberRoleCodeDelim';
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
{
|
||||
or.fn.init();
|
||||
$('input[type="text"],textarea,select,.OrganisationSportId,.OrganisationRegionIdCountry', or.$frm).val('');
|
||||
$('.OrganisationRegionIdCountry', or.$frm).val(sax.data.regionIdCountryDefault);
|
||||
$('.OrganisationRegionCaptionCountry', or.$frm).val(sax.data.regionNameCountryDefault);
|
||||
$('.OrganisationRegionIdPrimary', or.$frm).val(sax.data.regionIdCountryDefault);
|
||||
$('.OrganisationRegionNamePrimary', or.$frm).val(sax.data.regionNameCountryDefault);
|
||||
sax.clearControlErrors(or.$frm);
|
||||
sax.openDialog(or.$dlg, 640, 760);
|
||||
}
|
||||
@@ -45,19 +45,19 @@
|
||||
or.onSelectOrgSport = function (sport)
|
||||
{
|
||||
sax.clearControlError($('.OrganisationSportId', or.$frm).val(sport.id));
|
||||
$('.OrganisationSportCaption', or.$frm).val(sport ? sport.name : '');
|
||||
$('.OrganisationSportName', or.$frm).val(sport ? sport.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
or.selectOrgRegionCountry = function ()
|
||||
or.selectOrgRegionPrimary = function ()
|
||||
{
|
||||
//sax.debug($('.OrganisationRegionIdCountry', or.$frm).val());
|
||||
sax.mdl.selectRegion.fn.selectRegion({ caption: sax.dlg.title.selectRegion, regionId: $('.OrganisationRegionIdCountry', or.$frm).val(), typesInc: [30], fnCallback: or.onSelectOrgRegionCountry })
|
||||
sax.mdl.selectRegion.fn.selectRegion({ caption: sax.dlg.title.selectRegion, regionId: $('.OrganisationRegionIdCountry', or.$frm).val(), typesInc: [30], fnCallback: or.onSelectOrgRegionPrimary })
|
||||
}
|
||||
or.onSelectOrgRegionCountry = function (region)
|
||||
or.onSelectOrgRegionPrimary = function (region)
|
||||
{
|
||||
sax.clearControlError($('.OrganisationRegionIdCountry', or.$frm).val(region.id));
|
||||
$('.OrganisationRegionCaptionCountry', or.$frm).val(region ? region.name : '');
|
||||
sax.clearControlError($('.OrganisationRegionIdPrimary', or.$frm).val(region.id));
|
||||
$('.OrganisationRegionNamePrimary', or.$frm).val(region ? region.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
@@ -70,8 +70,8 @@
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); or.fn.cleanUp(); };
|
||||
or.$dlg = $('#dlgOrganisationRequest').dialog(opt);
|
||||
or.$frm = $('#frmOrganisationRequest', or.$dlg);
|
||||
or.$frm.on('dblclick', 'input.OrganisationSportCaption', or.selectOrgSport).on('click', 'button.SelectSport', or.selectOrgSport);
|
||||
or.$frm.on('dblclick', 'input.OrganisationRegionCaptionCountry', or.selectOrgRegionCountry).on('click', 'button.SelectRegionCountry', or.selectOrgRegionCountry);
|
||||
or.$frm.on('dblclick', 'input.OrganisationSportName', or.selectOrgSport).on('click', 'button.SelectOrganisationSport', or.selectOrgSport);
|
||||
or.$frm.on('dblclick', 'input.OrganisationRegionNamePrimary', or.selectOrgRegionPrimary).on('click', 'button.SelectOrganisationRegionPrimary', or.selectOrgRegionPrimary);
|
||||
$('.sax-input, .sax-textarea', or.$frm).on('input', function () { sax.clearControlError(this); });
|
||||
$('.sax-select', or.$frm).on('change', function () { sax.clearControlError(this); });
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
if (response.types) sax.populateSelectCodeDesc($('.sax-select.OrganisationType', $frm.org), response.types);
|
||||
$('.OrganisationType', $frm.org).val(item.typeCode);
|
||||
$('.OrganisationSportId', $frm.org).val(item.sportId);
|
||||
$('.OrganisationSportCaption', $frm.org).val(item.sportName);
|
||||
$('.OrganisationSportName', $frm.org).val(item.sportName);
|
||||
$('.OrganisationRegionIdPrimary', $frm.org).val(item.regionPrimary.id);
|
||||
$('.OrganisationRegionNamePrimary', $frm.org).val(item.regionPrimary.name);
|
||||
$('.OrganisationAbout', $frm.org).val(item.about);
|
||||
@@ -164,13 +164,13 @@
|
||||
po.onSelectOrgSport = function (sport)
|
||||
{
|
||||
sax.clearControlError($('.OrganisationSportId', $frm.org).val(sport.id));
|
||||
$('.OrganisationSportCaption', $frm.org).val(sport ? sport.name : '');
|
||||
$('.OrganisationSportName', $frm.org).val(sport ? sport.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
po.selectOrgRegionPrimary = function ()
|
||||
{
|
||||
sax.mdl.selectRegion.fn.selectRegion({ caption: sax.dlg.title.selectRegion, regionId: $('.OrganisationRegionIdCountry', $frm.org).val(), typesInc: [30], fnCallback: po.onSelectOrgRegionPrimary })
|
||||
sax.mdl.selectRegion.fn.selectRegion({ caption: sax.dlg.title.selectRegion, regionId: $('.OrganisationRegionIdPrimary', $frm.org).val(), typesInc: [30], fnCallback: po.onSelectOrgRegionPrimary })
|
||||
}
|
||||
po.onSelectOrgRegionPrimary = function (region)
|
||||
{
|
||||
@@ -242,8 +242,8 @@
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
$dlg.org = $('#dlgProfileOrganisation').dialog(opt);
|
||||
$frm.org = $('#frmProfileOrganisation', $dlg.org);
|
||||
$frm.org.on('dblclick', 'input.OrganisationSportCaption', po.selectOrgSport).on('click', 'button.SelectSport', po.selectOrgSport);
|
||||
$frm.org.on('dblclick', 'input.OrganisationRegionNameCountry', po.selectOrgRegionPrimary).on('click', 'button.SelectOrganisationRegionPrimary', po.selectOrgRegionPrimary);
|
||||
$frm.org.on('dblclick', 'input.OrganisationSportName', po.selectOrgSport).on('click', 'button.SelectSport', po.selectOrgSport);
|
||||
$frm.org.on('dblclick', 'input.OrganisationRegionNamePrimary', po.selectOrgRegionPrimary).on('click', 'button.SelectOrganisationRegionPrimary', po.selectOrgRegionPrimary);
|
||||
$frm.org.on('click', '.OrganisationContactMethods .sax-action.sax-add', po.addConMth);
|
||||
$pnl.conMths = $('.OrganisationContactMethods', $frm.org);
|
||||
$pnl.tblconMths = $('table.sax-data', $pnl.conMths);
|
||||
|
||||
Reference in New Issue
Block a user