Skip to content

Commit

Permalink
Merge pull request #25 from Scippy/master
Browse files Browse the repository at this point in the history
Added the Max Total MB File Upload Limit.
  • Loading branch information
Scippy authored Oct 25, 2020
2 parents b6525e4 + c1f5330 commit 56c54bb
Show file tree
Hide file tree
Showing 9 changed files with 494 additions and 361 deletions.
13 changes: 11 additions & 2 deletions App_LocalResources/EditLayoutSettings.ascx.resx
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Main.Text" xml:space="preserve">
<value>Main</value>
Expand Down Expand Up @@ -1512,4 +1512,13 @@
<data name="plLayoutTypeTypes.Text" xml:space="preserve">
<value>Layout Type</value>
</data>
<data name="plMaxUploadLimit.Help" xml:space="preserve">
<value>Set the total max space reserved to File Upload Custom Fields (value expressed in MB)</value>
</data>
<data name="plMaxUploadLimit.Text" xml:space="preserve">
<value>Max Total File Upload Limit MB</value>
</data>
<data name="valMaxUploadLimitIsMB.ErrorMessage" xml:space="preserve">
<value>&lt;br&gt;The value is required in MB</value>
</data>
</root>
10 changes: 10 additions & 0 deletions EditLayoutSettings.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -1114,6 +1114,16 @@
<asp:CheckBox ID="chkAgentDropdown" Runat="server" />
</td>
</tr>
<tr>
<td width="25"><img height="1" src='<%= Page.ResolveUrl("~/Images/Spacer.gif") %>' width=25></td>
<td class="SubHead" width="150"><dnn:label id="plMaxUploadLimit" runat="server" controlname="txtMaxUploadLimit" suffix=":"></dnn:label></td>
<td valign="bottom">
<asp:TextBox ID="txtMaxUploadLimit" runat="server" CssClass="NormalTextBox" />
<asp:CompareValidator ID="valMaxUploadLimitIsMB" Runat="server" ControlToValidate="txtMaxUploadLimit"
Display="Dynamic" ResourceKey="valMaxUploadLimitIsMB.ErrorMessage" CssClass="NormalRed" Operator="DataTypeCheck"
Type="Integer" />
</td>
</tr>
</table>
<br>
<dnn:sectionhead id="dshMapSettings" cssclass="Head" runat="server" text="Map Settings" section="tblMap"
Expand Down
30 changes: 30 additions & 0 deletions EditLayoutSettings.ascx.designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions EditLayoutSettings.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@ Namespace Ventrian.PropertyAgent
End If
chkProtectXSS.Checked = Me.PropertySettings.ProtectXSS
chkAgentDropdown.Checked = Me.PropertySettings.AgentDropdownDefault
txtMaxUploadLimit.Text = Me.PropertySettings.MaxUploadLimit

If Not (lstContactdestination.Items.FindByValue(Me.PropertySettings.ContactDestination.ToString()) Is Nothing) Then
lstContactdestination.SelectedValue = Me.PropertySettings.ContactDestination.ToString()
Expand Down Expand Up @@ -1024,6 +1025,7 @@ Namespace Ventrian.PropertyAgent
objModules.UpdateModuleSetting(ModuleId, Constants.UPLOAD_PLACEMENT_SETTING, lstUploadPlacement.SelectedValue)
objModules.UpdateModuleSetting(ModuleId, Constants.PROTECT_XSS_SETTING, chkProtectXSS.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.AGENT_DROPDOWN_SETTING, chkAgentDropdown.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.MAX_UPLOAD_LIMIT_SETTING, txtMaxUploadLimit.Text.ToString())

objModules.UpdateModuleSetting(ModuleId, Constants.MAP_ENABLE_SETTING, chkEnableMaps.Checked.ToString())
objModules.UpdateModuleSetting(ModuleId, Constants.MAP_KEY_SETTING, txtMapKey.Text)
Expand Down
Loading

0 comments on commit 56c54bb

Please sign in to comment.