summaryrefslogtreecommitdiff
path: root/app/views/shared/_field.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/shared/_field.html.haml')
-rw-r--r--app/views/shared/_field.html.haml29
1 files changed, 0 insertions, 29 deletions
diff --git a/app/views/shared/_field.html.haml b/app/views/shared/_field.html.haml
deleted file mode 100644
index 076c87400e0..00000000000
--- a/app/views/shared/_field.html.haml
+++ /dev/null
@@ -1,29 +0,0 @@
-- name = field[:name]
-- title = field[:title] || name.humanize
-- value = @service.send(name)
-- type = field[:type]
-- placeholder = field[:placeholder]
-- autocomplete = field[:autocomplete]
-- required = field[:required]
-- choices = field[:choices]
-- default_choice = field[:default_choice]
-- help = field[:help]
-
-.form-group.row
- - if type == "password" && value.present?
- = form.label name, _("Enter new %{field_title}") % { field_title: title.downcase }, class: "col-form-label col-sm-2"
- - else
- = form.label name, title, class: "col-form-label col-sm-2"
- .col-sm-10
- - if type == 'text'
- = form.text_field name, class: "form-control", autocomplete: autocomplete, placeholder: placeholder, required: required, data: { qa_selector: "#{name.downcase.gsub('\s', '')}_field" }
- - elsif type == 'textarea'
- = form.text_area name, rows: 5, class: "form-control", placeholder: placeholder, required: required
- - elsif type == 'checkbox'
- = form.check_box name
- - elsif type == 'select'
- = form.select name, options_for_select(choices, value || default_choice), {}, { class: "form-control"}
- - elsif type == 'password'
- = form.password_field name, autocomplete: "new-password", placeholder: placeholder, class: "form-control", required: value.blank? && required, data: { qa_selector: "#{name.downcase.gsub('\s', '')}_field" }
- - if help
- %span.form-text.text-muted= help