Sha256: a38b1ac94cfdb50c3ec1d695e9881c8f24d63788460cab4237e80a32ab2f5e48
Contents?: true
Size: 1.61 KB
Versions: 1
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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
explainer_angularjs_scaffold-0.0.21 | lib/generators/angularjs/scaffold/templates/edit.html.erb |