diff options
Diffstat (limited to 'inst/app/templates')
-rw-r--r-- | inst/app/templates/content/data/enter-data/entry.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/inst/app/templates/content/data/enter-data/entry.html b/inst/app/templates/content/data/enter-data/entry.html new file mode 100644 index 0000000..be43625 --- /dev/null +++ b/inst/app/templates/content/data/enter-data/entry.html @@ -0,0 +1,48 @@ +
+<!-- Button to toggle help text. -->
+<button type="button" class="btn btn-outline-primary btn-sm" id="bulk-help-toggle"
+ data-bs-toggle="collapse" data-bs-target="#bulk-help">Show required format</button>
+<!-- Help text for bulk input format. -->
+<div class="collapse mt-2" id="bulk-help">
+ <div class="card card-body border-primary">
+ <p>Manually enter rows or upload a CSV file in the following format:</p>
+ <p class="overflow-x-scroll text-nowrap font-monospace">
+ <u>Dataset name</u>,<u>Time units</u>,<u>Case counts</u>
+ </p>
+ <p>
+ <u class="font-monospace">Time units</u> must be one of
+ <u class="font-monospace">Days</u> or
+ <u class="font-monospace">Weeks</u>, and
+ <u class="font-monospace">Case counts</u>
+ must be a comma-separated list of one or more non-negative integers.
+ </p>
+ <p>Example:</p>
+ <p class="overflow-x-scroll text-nowrap font-monospace lh-sm">
+ Montreal,Days,1,2,3,4,5,6,7,8,9,19<br>
+ Ottawa,Weeks,1,2,3,4,5,6,7,8,9,19<br>
+ Toronto,Days,1,2,3,4,5,6,7,8,9,19
+ </p>
+ </div>
+</div>
+<!-- Data input area. -->
+<div class="my-4">
+ <label class="form-label" for="data_area">Enter manually</label>
+ <textarea id="data_area" class="form-control" rows="3" wrap="off"></textarea>
+ <div>
+ <small id="data_area_warn" class="form-text text-primary shiny-html-output"></small>
+ </div>
+ <button id="data_bulk" type="button" class="btn btn-outline-primary btn-sm action-button mt-3">
+ <span class="glyphicon glyphicon-plus"></span> Add
+ </button>
+</div>
+<!-- File input for data upload (hidden). -->
+<input class="form-control" type="file" id="data_upload" accept="text/csv,text/comma-separated-values,text/plain,.csv">
+<!-- Custom button to trigger file selector for data upload (visible). -->
+<label class="form-label" for="data-upload-select">Upload a CSV file</label>
+<div class="input-group">
+ <button id="data-upload-select" type="button" class="btn btn-outline-primary btn-sm">
+ <span class="glyphicon glyphicon-file"></span> Select file
+ </button>
+ <input type="text" id="data-upload-name" class="form-control" placeholder="No file selected" disabled>
+</div>
+<small id="data_upload_warn" class="form-text text-primary shiny-html-output"></small>
|