Skip to content

Commit 8806c94

Browse files
committed
FC-3159 disable editing of built-in nav aliases
1 parent 61052d9 commit 8806c94

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

packages/types/dmNavigation.cfc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,25 @@
395395
<cfreturn stType />
396396
</cffunction>
397397

398+
399+
<cffunction name="ftEditlNavIDAlias" access="public" returntype="string" description="This will return a string of formatted HTML text to enable the editing of the property" output="false">
400+
<cfargument name="typename" required="true" type="string" hint="The name of the type that this field is part of.">
401+
<cfargument name="stObject" required="true" type="struct" hint="The object of the record that this field is part of.">
402+
<cfargument name="stMetadata" required="true" type="struct" hint="This is the metadata that is either setup as part of the type.cfc or overridden when calling ft:object by using the stMetadata argument.">
403+
<cfargument name="fieldname" required="true" type="string" hint="This is the name that will be used for the form field. It includes the prefix that will be used by ft:processform.">
404+
405+
<cfset var html = "" />
406+
<cfset var oField = application.formtools.field.oFactory>
407+
408+
<cfif listFindNoCase("hidden,home,root,rubbish", arguments.stObject.lNavIDAlias)>
409+
<cfset html = oField.display(argumentCollection=arguments)>
410+
<cfelse>
411+
<cfset html = oField.edit(argumentCollection=arguments)>
412+
</cfif>
413+
414+
<cfreturn html>
415+
</cffunction>
416+
398417
<cffunction name="ftEditaObjectIDs" access="public" returntype="string" description="This will return a string of formatted HTML text to enable the editing of the property" output="false">
399418
<cfargument name="typename" required="true" type="string" hint="The name of the type that this field is part of.">
400419
<cfargument name="stObject" required="true" type="struct" hint="The object of the record that this field is part of.">

0 commit comments

Comments
 (0)