diff --git a/Logic/Swarm/Person.cs b/Logic/Swarm/Person.cs index d806d299..90392b98 100644 --- a/Logic/Swarm/Person.cs +++ b/Logic/Swarm/Person.cs @@ -1128,6 +1128,16 @@ namespace Swarmops.Logic.Swarm return true; } + if (access.Aspect == AccessAspect.Financials && access.Type == AccessType.Read) + { + if (access.Organization.ParticipantFinancialsEnabled) + { + // This organization has decided to open its financial reports to all participants. Reselect the access request to "participant" level. + + access = new Access (access.Organization, AccessAspect.Participant); + } + } + if (access.Aspect == AccessAspect.Participant) { // Check that a membership (or whatever this org calls it) exists, for this org or a parentline org diff --git a/Site5/Pages/v5/Admin/OrgSettings.aspx b/Site5/Pages/v5/Admin/OrgSettings.aspx index b2d4dd5f..aad14564 100644 --- a/Site5/Pages/v5/Admin/OrgSettings.aspx +++ b/Site5/Pages/v5/Admin/OrgSettings.aspx @@ -33,10 +33,19 @@ dataType: "json", success: function(msg) { if (msg.d.Success) { - alertify.log(msg.d.DisplayMessage); + if (msg.d.DisplayMessage.length > 2) { // the 2 is rather arbitrary. Read as "if defined". + alertify.log(msg.d.DisplayMessage); + } if (msg.d.RequireForex && !($('#CheckEnableForex').prop("checked"))) { $("#CheckEnableForex").prop("checked", true).change(); } + if (jsonData.switchName == "Paypal") { + if (jsonData.switchValue) { + $('.paypalAccountField').fadeIn(); + } else { + $('.paypalAccountField').fadeOut(); + } + } } else { alertify.error(msg.d.DisplayMessage); if (msg.d.RequireForex && !($('#CheckEnableForex').prop("checked"))) { @@ -79,7 +88,13 @@ $("#CheckEnablePaypal").prop("checked", orgSettings.AccountPaypal).change(); $("#CheckEnableForex").prop("checked", orgSettings.AccountsForex).change(); $("#CheckEnableVat").prop("checked", orgSettings.AccountsVat).change(); + $("#CheckParticipantFinancials").prop("checked", orgSettings.ParticipantFinancials).change(); + $("#<%=this.TextPaypalAccountAddress.ClientID%>_TextInput").val(orgSettings.PaypalAccountAddress); suppressSwitchResponse = false; + + if (orgSettings.AccountPaypal) { + $('.paypalAccountField').show(); + } } var suppressSwitchResponse = false; @@ -91,6 +106,8 @@ #IconCloseEdit { cursor: pointer; } + .paypalAccountField { display: none; } + .CheckboxContainer { float: right; padding-top: 6px; @@ -109,16 +126,20 @@

​

+


+