Added missing require attribute.

This commit is contained in:
Martin Edenhofer 2013-04-28 23:20:32 +02:00
parent dbeeda47ab
commit 83bc417933
2 changed files with 3 additions and 2 deletions

View file

@ -4,7 +4,8 @@ class App.ControllerForm extends App.Controller
@[key] = value
@attribute_count = 0
@form = @formGen()
if !@form
@form = @formGen()
# @log 'form', @form
if @el
@el.prepend( @form )

View file

@ -1,4 +1,4 @@
<select id="<%= @attribute.id %>" class="<%= @attribute.class %>" name="<%= @attribute.name %>" <%= @attribute.multiple %>>
<select id="<%= @attribute.id %>" class="<%= @attribute.class %>" name="<%= @attribute.name %>" <%= @attribute.multiple %> <%= @attribute.required %> <%= @attribute.autofocus %>>
<% for row in @attribute.options: %>
<option value="<%= row.value %>" <%= row.selected %> <%= row.disabled %>><%= row.name %></option>
<% end %>