Commit e3eacb0f authored by Simon Gadient's avatar Simon Gadient

[IMP] Support label text to overwrite label id

refs KIME-5498
parent 69bce401
......@@ -26,6 +26,13 @@ final class Mapping {
*/
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
*
......
......@@ -10,7 +10,12 @@
<label for="{property}">
<f:if condition="{columnMapping.mapping.labelId}">
<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 condition="{columnMapping.mapping.identifier}">
<span class="require"> * </span>
......
......@@ -23,7 +23,12 @@
<label class="{f:if(condition: previewMapping.error, then: 'error-text')}">
<f:if condition="{previewMapping.mapping.labelId}">
<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>
</label>
<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