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,8 +10,13 @@
<label for="{property}">
<f:if condition="{columnMapping.mapping.labelId}">
<f:then><f:translate id="{columnMapping.mapping.labelId}" /></f:then>
<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>
</f:if>
......
......@@ -23,8 +23,13 @@
<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>
<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>
</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