Sha256: c59e03ba2c74b33ad562aced87be9e62f7c45ce65f247ce1ed8b1285c8c3ba20
Contents?: true
Size: 1.39 KB
Versions: 16
Compression:
Stored size: 1.39 KB
Contents
<% tag_attrs = ['required', 'element', 'error_condition', 'inputs_hash'] inputs_hash = @attributes['inputs_hash'] || 'inputs' error_condition = @attributes['error_condition'] ? @attributes['error_condition'] : "#{inputs_hash}[#{@attributes['element']}].error?" required = @attributes['required'] ? @attributes['required'] : "#{inputs_hash}[#{@attributes['element']}].required?" %> <forms:row error_condition="<%=error_condition%>" required="<%=required%>" element="<%=@attributes['element']%>"> <forms:element_label element="<%=@attributes['element']%>" required="<%=required%>" inputs_hash="<%=inputs_hash%>"/> <div class="controls"> <sp:run obj="@<%=inputs_hash%>[<%=@attributes['element']%>]" widget="<%=@attributes['element']%>"> <sp:attribute widget="<%=@attributes['element'][1..-1]%>" name="required" value="<%=(@attributes['required']=='true')? 'true' : ''%>" /> <% (@attributes.keys - tag_attrs).each do |k| %> <sp:attribute widget="<%=@attributes['element'][1..-1]%>" name="<%=k%>" value="<%=@attributes[k]%>" /> <% end %> </sp:run> <p sp:if="@model.elements[<%=@attributes['element']%>] && !@model.elements[<%=@attributes['element']%>].attributes[:description].blank?" class="help-block"> { @model.elements[<%=@attributes['element']%>].attributes[:description] } </p> </div> </forms:row>
Version data entries
16 entries across 16 versions & 1 rubygems