Sha256: 5021a1aebd68958e2a51b4567bfe9ab5867ea8ce14dcbfa1a9227ef8e5182b2f
Contents?: true
Size: 1.62 KB
Versions: 5
Compression:
Stored size: 1.62 KB
Contents
<form name="new<%= @model_name%>"> <fieldset> <legend> New <%= @model_name.titleize %> </legend> <%- columns.each do |column| -%> <div class="control-group"> <label class="control-label"> <%= column.name.titleize %> </label> <div class="controls"> <%- if ['description', 'body'].include? column.name -%> <textarea name="<%= @resource_name%>[<%= column.name %>]" ng-model="<%= @resource_name%>.<%= column.name %>" class="<%= column.field_type %>" required></textarea> <%- else -%> <input type="<%= column.field_type.to_s.split('_').first %>" name="<%= @resource_name%>[<%= column.name %>]" ng-model="<%= @resource_name%>.<%= column.name %>" class="<%= column.field_type %>" required> <%- end -%> <span ng-show="new<%= @model_name%>.<%= column.name %>.$error.required" class="help-inline"> Required </span> </div> </div> <%- end -%> <div class="form-actions"> <button class="btn btn-success" ng-click="save()" ng-disabled="isClean() || new<%= @model_name%>.$invalid"> <i class="icon-save"></i> Save </button> <button ng-click="destroy()" ng-show="<%= @resource_name%>.id" class="btn btn-danger"> <i class="icon-trash"></i> Delete </button> <a href="/<%= @resource_name%>s" class="btn">Back to <%= @resource_name%>s</a> </div> </fieldset> </form>
Version data entries
5 entries across 5 versions & 2 rubygems