Skip to content

Commit 2f5b938

Browse files
committed
Merge pull request rstudio#1152 from daattali/master
add placeholder option to passwordInput()
2 parents 1101835 + 4e5e0fb commit 2f5b938

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ shiny 0.13.2.9001
4747

4848
* navbarMenu now has dividers and dropdown headers (#888)
4949

50+
* Added `placeholder` option to `passwordInput`.
51+
5052
shiny 0.13.2
5153
--------------------------------------------------------------------------------
5254

R/input-password.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
#' @examples
1212
#' passwordInput("password", "Password:")
1313
#' @export
14-
passwordInput <- function(inputId, label, value = "", width = NULL) {
14+
passwordInput <- function(inputId, label, value = "", width = NULL,
15+
placeholder = NULL) {
1516
div(class = "form-group shiny-input-container",
1617
style = if (!is.null(width)) paste0("width: ", validateCssUnit(width), ";"),
1718
label %AND% tags$label(label, `for` = inputId),
18-
tags$input(id = inputId, type="password", class="form-control", value=value)
19+
tags$input(id = inputId, type="password", class="form-control", value=value,
20+
placeholder = placeholder)
1921
)
2022
}

man/passwordInput.Rd

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)