Skip to content

Commit

Permalink
LDEV-4815 add formUrlAsStruct to admin scopes page
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Mar 15, 2024
1 parent 0372327 commit 94d6020
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
4 changes: 3 additions & 1 deletion core/src/main/cfml/context/admin/resources/language/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1129,8 +1129,10 @@
"localmodeModern": "Modern",
"localmodeModernDesc": "the local scope is always invoked",
"memory": "memory",
"mergeurlform": "Merge URL and form",
"mergeurlform": "Merge URL and Form",
"mergeurlformdescription": "This setting defines if the scopes URL and Form will be merged together (CFML Default is false). If a key already exists in Form and URL Scopes, the value from the Form Scope is used.",
"formUrlAsStruct": "Structs for URL and Form",
"formUrlAsStructDescription": "By default, URL and Form variables with dot notation are parsed into structures",
"server": "You can define the scope settings that will be used as default for all web contexts here.",
"sessionmanagement": "Session management",
"sessionmanagementdescription": "By default session management can be enabled. This behaviour can be overridden by the tag cfapplication.",
Expand Down
30 changes: 28 additions & 2 deletions core/src/main/cfml/context/admin/server.scope.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ Defaults --->
scopeCascadingType="#form.scopeCascadingType#"
allowImplicidQueryCall="#isDefined("form.allowImplicidQueryCall") and form.allowImplicidQueryCall#"
mergeFormAndUrl="#isDefined("form.mergeFormAndUrl") and form.mergeFormAndUrl#"


formUrlAsStruct="#isDefined("form.formUrlAsStruct") and form.formUrlAsStruct#"

clientTimeout="#CreateTimeSpan(form.client_days,form.client_hours,form.client_minutes,form.client_seconds)#"
sessionTimeout="#CreateTimeSpan(form.session_days,form.session_hours,form.session_minutes,form.session_seconds)#"
Expand All @@ -64,6 +63,7 @@ Defaults --->
scopeCascadingType=""
allowImplicidQueryCall=""
mergeFormAndUrl=""
formUrlAsStruct=""
sessionTimeout=""
applicationTimeout=""
sessionManagement=""
Expand Down Expand Up @@ -148,9 +148,35 @@ Error Output --->
<b>#iif(scope.mergeFormAndUrl,de('Yes'),de('No'))#</b>
</cfif>
<div class="comment">#stText.Scopes.mergeUrlFormDescription#</div>

<cfsavecontent variable="codeSample">
this.mergeFormAndUrl = #scope.mergeFormAndUrl#;
</cfsavecontent>
<cfset renderCodingTip( codeSample )>
</td>
</tr>

<!---
Whether or not to merge form and url variables into structs --->
<tr>
<th scope="row">#stText.Scopes.formUrlAsStruct#</th>
<td>
<cfif hasAccess>
<input type="checkbox" class="checkbox" name="formUrlAsStruct" value="yes"
<cfif scope.formUrlAsStruct>checked</cfif>>
<cfelse>
<b>#iif(scope.formUrlAsStruct,de('Yes'),de('No'))#</b>
</cfif>
<div class="comment">#stText.Scopes.formUrlAsStructDescription#</div>

<cfsavecontent variable="codeSample">
this.formUrlAsStruct = #scope.formUrlAsStruct#;
</cfsavecontent>
<cfset renderCodingTip( codeSample )>
</td>
</tr>


<!--- Session Management --->
<tr>
<th scope="row">#stText.Scopes.SessionManagement#</th>
Expand Down

0 comments on commit 94d6020

Please sign in to comment.