Sha256: b0d5baf087697821973426541f319e8cda02bb029625537cadc32cb3a0094a23

Contents?: true

Size: 1.2 KB

Versions: 2

Compression:

Stored size: 1.2 KB

Contents

<%= form_for(:profile, url: {action: action}, method: method) do |f| %>
  <% if @error.present? && @error.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@error.errors.count, "error") %> prohibited this user from being saved:</h2>

      <ul>
        <% @error.errors.full_messages.each do |message| %>
          <li><%= message %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <%= f.hidden_field :id, value: @profile.id  %>

  <div class="field">
    <%= f.label :name %><br>
    <%= f.text_field :name %>
  </div>

  <div class="field">
    <%= f.label :description %><br>
    <%= f.text_field :description %>
  </div>

  <div class="field">
    <%= f.label :entity_id %><br>
    <%= f.text_field :entity_id %>
  </div>

  <div class="field">
    <%= f.label :entity_class %><br>
    <%= f.text_field :entity_class %>
  </div>

  <div class="field">

    <% @roles.each do |role|  %>
    <div>
      <input type="checkbox" name="profile[role_ids][]" value="<%= role.id %>" <%= checked="checked" if @profile.role_ids.include?(role.id) %> >
      <%= "#{role.name} - #{role.description}"%>
    </div>
    <% end %>

  </div>

  <div class="actions">
    <%= f.submit %>
  </div>

<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
arpa-0.3.0 lib/generators/arpa/templates/views/profiles/_form.html.erb
arpa-0.2.0 lib/generators/arpa/templates/views/profiles/_form.html.erb