Autocomplete field shows twice in the translation form
Posted: Mon Mar 12, 2012 10:55 pm
I noticed a couple of problems today in the translation form, the first was the preview for the logo field was missing, and the "View field in New Window" link pointed to an URL of this type:
http://www.mysite.com/http://www.mysite ... gofile.gif
I traced the problem to the default template file "Dataface_TranslationForm_element.html"
and changed this:
to this (made a copy on my theme directory instead of changing the original file):
Now the logo field preview shows correctly.
The second problem, and the cause of this post is a very strange one, field with a autocomplete widget type display twice in the translation form, it happens only with this widget type, yui_autocomplete displays correctly.
Here's a screenshot:
The country field is set as yui_autocomplete while Language is set as autocomplete and is shown twice.
I was using Xataface 1.3rc6 when I found this, I updated to 1.3.2 but nothing changed.
http://www.mysite.com/http://www.mysite ... gofile.gif
I traced the problem to the default template file "Dataface_TranslationForm_element.html"
and changed this:
- Code: Select all
{if $properties.image_preview}
<img src="{$smarty.server.HOST_URI}{$properties.image_preview}" style="display: block; max-height: 200px" alt="{$field.name} preview image"/>
{/if}
{if $properties.preview}
<a href="{$smarty.server.HOST_URI}{$properties.preview}" target="_blank">{translate id="scripts.GLOBAL.MESSAGE_VIEW_FIELD_CONTENT"}View Field Content in new Window{/translate}</a>
{/if}
to this (made a copy on my theme directory instead of changing the original file):
- Code: Select all
{if $properties.image_preview}
<img src="{$properties.image_preview}" style="display: block; max-height: 200px" alt="{$field.name} preview image"/>
{/if}
{if $properties.preview}
<a href="{$properties.preview}" target="_blank">{translate id="scripts.GLOBAL.MESSAGE_VIEW_FIELD_CONTENT"}View Field Content in new Window{/translate}</a>
{/if}
Now the logo field preview shows correctly.
The second problem, and the cause of this post is a very strange one, field with a autocomplete widget type display twice in the translation form, it happens only with this widget type, yui_autocomplete displays correctly.
Here's a screenshot:
The country field is set as yui_autocomplete while Language is set as autocomplete and is shown twice.
I was using Xataface 1.3rc6 when I found this, I updated to 1.3.2 but nothing changed.