Skip to content

Commit

Permalink
edit var logical: dont add suffix to label
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Nov 15, 2023
1 parent 494f626 commit 1155748
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/edit-data-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,14 @@ edit_input_form <- function(default = list(),
variable_name <- colnames[position_var_edit[i]]
variable <- data[[i]]

suffix <- if (isTRUE((inherits(variable, "logical")))) "" else " : "
if (variable_name %in% var_mandatory) {
label <- tagList(
variable_name,
tags$span(HTML("&#42;"), class = "asterisk", style = "color: red;"), " : "
tags$span(HTML("&#42;"), class = "asterisk", style = "color: red;"), suffix
)
} else {
label <- paste0(variable_name, " : ")
label <- paste0(variable_name, suffix)
}

if (isTRUE(inherits(variable, c("numeric", "integer")))) {
Expand Down

0 comments on commit 1155748

Please sign in to comment.