Commit 6675670c authored by Chivy Lim's avatar Chivy Lim

Merge branch 'KIME-5498' into 'master'

[IMP] Support label text to overwrite label id

See merge request !20
parents 69bce401 e3eacb0f
...@@ -26,6 +26,13 @@ final class Mapping { ...@@ -26,6 +26,13 @@ final class Mapping {
*/ */
public $labelId = ''; public $labelId = '';
/**
* Label text for the property mapping if no labelId is set
*
* @var string
*/
public $labelText = '';
/** /**
* Flag if property is handled as an identifier for updates * Flag if property is handled as an identifier for updates
* *
......
...@@ -10,7 +10,12 @@ ...@@ -10,7 +10,12 @@
<label for="{property}"> <label for="{property}">
<f:if condition="{columnMapping.mapping.labelId}"> <f:if condition="{columnMapping.mapping.labelId}">
<f:then><f:translate id="{columnMapping.mapping.labelId}" /></f:then> <f:then><f:translate id="{columnMapping.mapping.labelId}" /></f:then>
<f:else>{property}</f:else> <f:else>
<f:if condition="{columnMapping.mapping.labelText}">
<f:then>{columnMapping.mapping.labelText}</f:then>
<f:else>{property}</f:else>
</f:if>
</f:else>
</f:if> </f:if>
<f:if condition="{columnMapping.mapping.identifier}"> <f:if condition="{columnMapping.mapping.identifier}">
<span class="require"> * </span> <span class="require"> * </span>
......
...@@ -23,7 +23,12 @@ ...@@ -23,7 +23,12 @@
<label class="{f:if(condition: previewMapping.error, then: 'error-text')}"> <label class="{f:if(condition: previewMapping.error, then: 'error-text')}">
<f:if condition="{previewMapping.mapping.labelId}"> <f:if condition="{previewMapping.mapping.labelId}">
<f:then><f:translate id="{previewMapping.mapping.labelId}" />:</f:then> <f:then><f:translate id="{previewMapping.mapping.labelId}" />:</f:then>
<f:else>{property}:</f:else> <f:else>
<f:if condition="{previewMapping.mapping.labelText}">
<f:then>{previewMapping.mapping.labelText}:</f:then>
<f:else>{property}:</f:else>
</f:if>
</f:else>
</f:if> </f:if>
</label> </label>
<div class="{f:if(condition: previewMapping.error, then: 'error-text')}">{previewMapping.value}</div> <div class="{f:if(condition: previewMapping.error, then: 'error-text')}">{previewMapping.value}</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment