Skip to content

Commit

Permalink
FC-3159 disable editing of built-in nav aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
justincarter committed Oct 30, 2018
1 parent 61052d9 commit 8806c94
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/types/dmNavigation.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,25 @@
<cfreturn stType />
</cffunction>


<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">
<cfargument name="typename" required="true" type="string" hint="The name of the type that this field is part of.">
<cfargument name="stObject" required="true" type="struct" hint="The object of the record that this field is part of.">
<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.">
<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.">

<cfset var html = "" />
<cfset var oField = application.formtools.field.oFactory>

<cfif listFindNoCase("hidden,home,root,rubbish", arguments.stObject.lNavIDAlias)>
<cfset html = oField.display(argumentCollection=arguments)>
<cfelse>
<cfset html = oField.edit(argumentCollection=arguments)>
</cfif>

<cfreturn html>
</cffunction>

<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">
<cfargument name="typename" required="true" type="string" hint="The name of the type that this field is part of.">
<cfargument name="stObject" required="true" type="struct" hint="The object of the record that this field is part of.">
Expand Down

1 comment on commit 8806c94

@modius
Copy link
Member

@modius modius commented on 8806c94 Oct 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huzzah! 🎉

Please sign in to comment.