lib/generators/katapult/haml/templates/_form.html.haml in katapult-0.1.2 vs lib/generators/katapult/haml/templates/_form.html.haml in katapult-0.2.0
- old
+ new
@@ -1,9 +1,9 @@
= form_for <%= model_name(:ivar) %> do |form|
%dl.controls
-<% wui.model.attrs.each do |attribute| -%>
+<% wui.model.editable_attrs.each do |attribute| -%>
%dt
= form.label <%= attribute.name(:symbol) %>
%dd
<%- if attribute.assignable_values -%>
= form.select <%= attribute.name(:symbol) %>, form.object.assignable_<%= attribute.name(:variables) %>
@@ -11,24 +11,24 @@
<%- case attribute.type -%>
<%- when :string -%>
= form.text_field <%= attribute.name(:symbol) %>
<%- when :email -%>
= form.email_field <%= attribute.name(:symbol) %>
+ <%- when :password -%>
+ = form.password_field <%= attribute.name(:symbol) %>
<%- when :url -%>
= form.url_field <%= attribute.name(:symbol) %>
<%- when :integer -%>
= form.number_field <%= attribute.name(:symbol) %>
<%- when :money -%>
= form.number_field <%= attribute.name(:symbol) %>
€
<%- when :text -%>
= form.text_area <%= attribute.name(:symbol) %>, rows: 5
- <%- when :markdown -%>
- = form.text_area <%= attribute.name(:symbol) %>, rows: 15
<%- when :flag -%>
= form.check_box <%= attribute.name(:symbol) %>
<%- when :datetime -%>
- = form.datetime_field <%= attribute.name(:symbol) %>
+ = form.date_field <%= attribute.name(:symbol) %>
<%- end -%>
<%- end -%>
<% end -%>
.tools