fixed optional text position
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
13396d1501
commit
7953751a89
@ -222,11 +222,11 @@ open class DropdownSelect: EntryFieldBase {
|
|||||||
updatedLabelText = showInlineLabel ? "" : updatedLabelText
|
updatedLabelText = showInlineLabel ? "" : updatedLabelText
|
||||||
|
|
||||||
if let oldText = updatedLabelText, !isRequired, !oldText.hasSuffix("Optional") {
|
if let oldText = updatedLabelText, !isRequired, !oldText.hasSuffix("Optional") {
|
||||||
let optionColorAttr = ColorLabelAttribute(location: oldText.count + 2,
|
let optionColorAttr = ColorLabelAttribute(location: oldText.count + 1,
|
||||||
length: 8,
|
length: 8,
|
||||||
color: secondaryColorConfiguration.getColor(self))
|
color: secondaryColorConfiguration.getColor(self))
|
||||||
|
|
||||||
updatedLabelText = showInlineLabel ? "Optional" : "\(oldText) Optional"
|
updatedLabelText = showInlineLabel ? "Optional" : "\(oldText) Optional"
|
||||||
attributes.append(optionColorAttr)
|
attributes.append(optionColorAttr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -360,13 +360,13 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable {
|
|||||||
//dealing with the "Optional" addition to the text
|
//dealing with the "Optional" addition to the text
|
||||||
if let oldText = updatedLabelText, !isRequired, !oldText.hasSuffix("Optional") {
|
if let oldText = updatedLabelText, !isRequired, !oldText.hasSuffix("Optional") {
|
||||||
if isEnabled {
|
if isEnabled {
|
||||||
let optionColorAttr = ColorLabelAttribute(location: oldText.count + 2,
|
let optionColorAttr = ColorLabelAttribute(location: oldText.count + 1,
|
||||||
length: 8,
|
length: 8,
|
||||||
color: VDSColor.elementsSecondaryOnlight)
|
color: VDSColor.elementsSecondaryOnlight)
|
||||||
|
|
||||||
attributes.append(optionColorAttr)
|
attributes.append(optionColorAttr)
|
||||||
}
|
}
|
||||||
updatedLabelText = "\(oldText) Optional"
|
updatedLabelText = "\(oldText) Optional"
|
||||||
}
|
}
|
||||||
|
|
||||||
if let tooltipModel {
|
if let tooltipModel {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user