Skip to content

Commit

Permalink
... but don't do this for the inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
hypebright committed May 22, 2024
1 parent 52497db commit 32e7570
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 5 additions & 4 deletions R/f7Login.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
#' to have authentication only in a specific tab of your app (See example 2).
#' @param module Whether or not to use in combination with \link{f7LoginServer}. Can be
#' set to FALSE if you want to develop your own server functionality, or if you want to
#' use \code{f7Login} inside a module yourself. Defaults to TRUE.
#' use \code{f7Login} inside a module yourself. Note that inputs, like user, password and submit,
#' will need to be accessed with the id of \code{f7Login} with -user, -password or -submit appended.
#'
#' @export
#' @rdname authentication
Expand All @@ -33,7 +34,7 @@ f7Login <- function(..., id, title, label = "Sign In", footer = NULL,

ns <- shiny::NS(id)

submitBttn <- f7Button(inputId = ifelse(module, ns("submit"), "submit"), label = label)
submitBttn <- f7Button(inputId = ns("submit"), label = label)
submitBttn[[2]]$attribs$class <- "item-link list-button f7-action-button"
submitBttn[[2]]$name <- "a"

Expand All @@ -53,12 +54,12 @@ f7Login <- function(..., id, title, label = "Sign In", footer = NULL,
shiny::tags$form(
f7List(
f7Text(
inputId = ifelse(module, ns("user"), "user"),
inputId = ns("user"),
label = "Username",
placeholder = "Your name here"
),
f7Password(
inputId = ifelse(module, ns("password"), "password"),
inputId = ns("password"),
label = "Password",
placeholder = "Your password here"
),
Expand Down
4 changes: 3 additions & 1 deletion man/authentication.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 32e7570

Please sign in to comment.