RE: Hide/Remove Language flag from Calendar Portlet

thumbnail
Nirav Prajapati, modified 6 Years ago. Regular Member Posts: 133 Join Date: 6/25/15 Recent Posts

Hello Friends,

 

I am using Liferay CE 6.2-GA 6

 

I want to hide/remove language flags from calender portlet.

 

This flag are shows under Title and Description in New Event Page.

 

Please help me.

 

Thanks.

thumbnail
Nagendra Kumar Busam, modified 6 Years ago. Liferay Master Posts: 678 Join Date: 7/7/09 Recent Posts

Find out the relevant jsp & write a simple hook to comment out/replace langauge display related code with proper comments for later reference as customized.

 

https://dev.liferay.com/es/develop/tutorials/-/knowledge_base/6-2/customizing-jsps-by-extending-the-original

thumbnail
Andrew Jardine, modified 6 Years ago. Liferay Legend Posts: 2416 Join Date: 12/22/10 Recent Posts

Be careful with the advice of simply removing the flag by overriding the JSP. The flag you are seeing below the field is because it is a field (likely service builder) that is marked as "localized". Chances are it is being rendered as the result of the <liferay-ui:inpute-localized/> (I can't recall off hand if there is also an attribute on input fields that might drive this, you'd have to check).

Liferay does have qutite a number of small fragments that are reused in more than a few places so you need to be careul in these scenarios that you don't end up getting rid of the flag in more than one place. You should also consider the fact that the backend for localized fields doen't operate the same way as it does for a regular input, so simple making it a text field might actually break the save/update functionality.

I would probably advocate for adding a custom class to the input field in the file where it is used and use that css class to simply HIDE it. To me that is the best option because it is not as invasive as removing something from the product. It has the added benefit of continuing to render the field so using devtools in the browser you will be able to see the item and see the css (hidden flag) applied to it. If someone is expecting to see it, and they don't even see it in the source, it might cause great confusion.

Just my two cents -- you should always try to think of the next guy.

 

thumbnail
Nagendra Kumar Busam, modified 6 Years ago. Liferay Master Posts: 678 Join Date: 7/7/09 Recent Posts