fixed optional text position

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-05-23 11:59:13 -05:00
parent 13396d1501
commit 7953751a89
2 changed files with 4 additions and 4 deletions

View File

@ -222,7 +222,7 @@ 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))

View File

@ -360,7 +360,7 @@ 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)