mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
Add smarter placeholders to content forms
This commit is contained in:
parent
b8107d255b
commit
1f3e7964b7
@ -1,5 +1,6 @@
|
||||
<%
|
||||
field_id = "#{f.object.class.name.downcase}_#{attribute}"
|
||||
class_name = f.object.class.name.downcase
|
||||
|
||||
# TODO: Enable autocomplete when we can actually hide the dropdown if someone tabs out of a field.
|
||||
# Not the easiest thing in the world to do, apparently.
|
||||
@ -7,7 +8,15 @@
|
||||
|
||||
<div class="input-field content-field">
|
||||
<%= f.label attribute, attribute.humanize.capitalize %>
|
||||
<%= f.text_area attribute, class: "materialize-textarea #{defined?(autocomplete) && false ? 'autocomplete' : ''}", placeholder: 'Write as little or as much as you want!' %>
|
||||
<%
|
||||
placeholder = t("serendipitous_questions.attributes.#{class_name}.#{attribute}")
|
||||
placeholder = I18n.translate "attributes.#{class_name}.#{attribute}",
|
||||
scope: :serendipitous_questions,
|
||||
name: f.object.send('name') || "this #{class_name}",
|
||||
attribute: "test",
|
||||
default: 'Write as little or as much as you want!'
|
||||
%>
|
||||
<%= f.text_area attribute, class: "materialize-textarea #{defined?(autocomplete) && false ? 'autocomplete' : ''}", placeholder: placeholder %>
|
||||
</div>
|
||||
|
||||
<% if defined?(autocomplete) && false %>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user