Commit 190b5c75 authored by mmassaviol's avatar mmassaviol
Browse files

Add textArea input type

parent b3829501
......@@ -31,6 +31,11 @@ generate_page_input <- function(res, cnt) {
res <- res + '\t\ttextInput("'+ cnt$name +'", label = "'+ cnt$label +'", value = "'+ cnt$value +'", width = "'+ 'auto' +'")'
}
if(cnt$type == "textArea") {
res <- res + '\t\ttextAreaInput("'+ cnt$name +'", label = "'+ cnt$label +'", value = "'+ cnt$value +'")'
}
if(cnt$type == "numeric") {
......@@ -410,7 +415,7 @@ generate_pages_server <- function() {
genR <- ""
if(cnt$type == 'text' || cnt$type == "input_dir" || cnt$type == "output_dir") {
if(cnt$type == 'text' || cnt$type == 'textArea' || cnt$type == "input_dir" || cnt$type == "output_dir") {
genR <- genR + '\t\tif(!is.na(as.numeric(input$' + id + '))) {\n'
genR <- genR + '\t\t\tres = paste0(res, paste("' + id + ':", input$' + id + ', "\\n", sep = " "))\n'
genR <- genR + '\t\t} else {\n'
......@@ -921,6 +926,9 @@ generate_app <- function() {
res <- res + '\t\t\tif (params$params_info[[param]]$type == "text" || params$params_info[[param]]$type == "input_dir" || params$params_info[[param]]$type == "output_dir"){\n'
res <- res + '\t\t\t\tupdateTextInput(session, param, value = params[[param]])\n'
res <- res + '\t\t\t}\n'
res <- res + '\t\t\tif (params$params_info[[param]]$type == "textArea"){\n'
res <- res + '\t\t\t\tupdateTextAreaInput(session, paste0(param,"_server"), value = params[[param]])\n'
res <- res + '\t\t\t}\n'
res <- res + '\t\t\tif (params$params_info[[param]]$type == "input_file" && params[[paste0(param,"_select")]] == "server"){\n'
res <- res + '\t\t\t\tupdateTextInput(session, paste0(param,"_server"), value = params[[param]])\n'
res <- res + '\t\t\t}\n'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment