Sha256: 298f83d8bb3854b4fd6cccd1519876878b57e8a325d5b0b3fde59e2995a60263
Contents?: true
Size: 1.61 KB
Versions: 4
Compression:
Stored size: 1.61 KB
Contents
<form name="edit<%= @model_name%>"> <fieldset> <legend> Edit <%= @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="edit<%= @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() || edit<%= @model_name%>.$invalid"> 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 <%= @plural_model_name%> </a> </div> </fieldset> </form>
Version data entries
4 entries across 4 versions & 1 rubygems