From d44a757b25f72eaf0b3d48ea2849043d18cde9f7 Mon Sep 17 00:00:00 2001 From: Luka Murn Date: Tue, 8 Nov 2016 11:46:30 +0100 Subject: [PATCH] Add textareas to checklist name & items Closes SCI-644 --- app/assets/stylesheets/themes/scinote.scss | 15 ++++++++++++++- app/views/steps/_form_checklists.html.erb | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/themes/scinote.scss b/app/assets/stylesheets/themes/scinote.scss index b1b4dbed8..3f3208551 100644 --- a/app/assets/stylesheets/themes/scinote.scss +++ b/app/assets/stylesheets/themes/scinote.scss @@ -1497,11 +1497,24 @@ html.turbolinks-progress-bar::before { } } +// Only allow vertical resizing of all text areas +textarea { + resize: vertical; +} + +textarea.textarea-sm { + height: 34px; + min-height: 34px; + + &.form-control { + height: 34px; + } +} + .comment-form { textarea { height: 34px; min-height: 34px; - resize: vertical; } .btn.btn-default { diff --git a/app/views/steps/_form_checklists.html.erb b/app/views/steps/_form_checklists.html.erb index dcba5f9ee..4b205292e 100644 --- a/app/views/steps/_form_checklists.html.erb +++ b/app/views/steps/_form_checklists.html.erb @@ -9,7 +9,7 @@
- <%= ff.text_field :name, label: t("protocols.steps.new.checklist_name"), class: "checklist_name", autofocus: true, placeholder: t("protocols.steps.new.checklist_name_placeholder") %> + <%= ff.text_area :name, label: t("protocols.steps.new.checklist_name"), class: "checklist_name textarea-sm", autofocus: true, placeholder: t("protocols.steps.new.checklist_name_placeholder") %> <%= ff.label t("protocols.steps.new.checklist_items") %>