cancel
Showing results for 
Search instead for 
Did you mean: 

don't show the 'none' values on the properties in document-details

steve_cx
Champ in-the-making
Champ in-the-making
Hi,

I am trying edit "document-details" view.

How can I don't show the "none" values on the properties?
(I have add some custom properties.)

Thx.
3 REPLIES 3

lementree
Champ on-the-rise
Champ on-the-rise
Hi

You can do this by changing in properties file
Edit <strong>form.get_en.properties</strong> change the following

#form.control.novalue=(None)
form.control.novalue=

steve_cx
Champ in-the-making
Champ in-the-making
Thx for repley.
I want to don't show it but not change the text.

Just like below:
[img]http://s22.postimg.org/unjcvv799/image.jpg[/img]

don't show none value.

steve_cx
Champ in-the-making
Champ in-the-making
Find the solution =.="

Go "\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\form\controls"
Edit the controls.

For example:

If value is textfield, then edit "textfield.ftl"

Like the following.

<div class="form-field">
   <#if form.mode == "view">
      <div class="viewmode-field">
         <#if field.mandatory && !(field.value?is_number) && field.value == "">
            <span class="incomplete-warning"><img src="${url.context}/res/components/form/images/warning-16.png" title="${msg("form.field.incomplete")}" /><span>
         </#if>
      
       <#if field.control.params.activateLinks?? && field.control.params.activateLinks == "true">
            <#assign fieldValue=field.value?html?replace("((http|ftp|https):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-\\.,@?\\^=%&:\\/~\\+#]*[\\w\\-\\@?\\^=%&\\/~\\+#])?)", "<a href=\"$1\" target=\"_blank\">$1</a>", "r")>
         <#else>
            <#if field.value?is_number>
               <#assign fieldValue=field.value?c>
            <#else>
               <#assign fieldValue=field.value?html>
            </#if>
         </#if>
       <#if fieldValue != "">
         <span class="viewmode-label">${field.label?html}:</span>
        
         <span class="viewmode-value"><#if fieldValue == "">${msg("form.control.novalue")}<#else>${fieldValue}</#if></span>
       </#if>
     </div>
   <#else>
      <label for="${fieldHtmlId}">${field.label?html}:<#if field.mandatory><span class="mandatory-indicator">${msg("form.required.fields.marker")}</span></#if></label>
      <input id="${fieldHtmlId}" name="${field.name}" tabindex="0"
             <#if field.control.params.password??>type="password"<#else>type="text"</#if>
             <#if field.control.params.styleClass??>class="${field.control.params.styleClass}"</#if>
             <#if field.control.params.style??>style="${field.control.params.style}"</#if>
             <#if field.value?is_number>value="${field.value?c}"<#else>value="${field.value?html}"</#if>
             <#if field.description??>title="${field.description}"</#if>
             <#if field.control.params.maxLength??>maxlength="${field.control.params.maxLength}"</#if>
             <#if field.control.params.size??>size="${field.control.params.size}"</#if>
             <#if field.disabled && !(field.control.params.forceEditable?? && field.control.params.forceEditable == "true")>disabled="true"</#if> />
      <@formLib.renderFieldHelp field=field />
   </#if>
</div>