<commit_before><%= render :partial => "admin_tab" %>
<h2><%=h current_repository.name %> Members</h2>


<ul id="permissions">
<% @members.each do |user, permissions| -%>
  <li class="permission" id="<%= user ? dom_id(user) : :user_anon %>">
    <%=h permissions.first.login %><% if user -%> (<%=h user.email %>)<% end -%>
    <% permissions.each do |permission| -%>
    <span class="log">Read<%= '-write' if permission.full_access? %>: <%=h permission.formatted_path %></span>
    <% end -%>
    <ul class="admin-controls">
      <li class="edit"><%= link_to_function('Edit', %($('permission-edit-#{user ? user.id : :anon}').toggle())) %></li>
      <li class="del"><%= link_to_function('Delete', "Permissions.removeMember('#{user ? user.id : :anon}')") %></li>
    </ul>
  </li>
  <li class="permission permissionedit form" id="permission-edit-<%= user ? user.id : :anon %>" style="display:none">
    <% form_for :permission, permissions.first, :url => (user ? user_permissions_path(user) : anon_permissions_path), :html => { :method => :put } do |f| -%>
      <%= render :partial => "form", :object => f, :locals => { :permissions => permissions } %>
      <p class="btns">
        <%= submit_tag 'Save', :disable_with => 'Saving...' %>
      </p>
    <% end -%>
  </li>
<% end -%>
</ul>

  <% content_for :onready do %>new Sheet('add-member', 'addmember')<% end %>
  <% form_for @permission, :html => { :id => 'add-member' } do |f| -%>
  <div class="overlay-form oform">
    <h2>Add a new Member</h2>
    <p>
      <label for="email">Email:</label>
      <%= text_field_tag :email, nil, :size => 30 %><br />
      (leave email and svn login info blank for anonymous access)
    </p>
    <%= render :partial => "form", :object => f %>
    </div>
    
    <p class="btns">
      <%= cancel_image(:class => 'cancelbtn') %>
      <%= submit_image 'save.png' %>
    </p>
  <% end -%>

<commit_msg>fix new member form for permissions<commit_after><%= render :partial => "admin_tab" %>
<h2><%=h current_repository.name %> Members</h2>


<ul id="permissions">
<% @members.each do |user, permissions| -%>
  <li class="permission" id="<%= user ? dom_id(user) : :user_anon %>">
    <%=h permissions.first.login %><% if user -%> (<%=h user.email %>)<% end -%>
    <% permissions.each do |permission| -%>
    <span class="log">Read<%= '-write' if permission.full_access? %>: <%=h permission.formatted_path %></span>
    <% end -%>
    <ul class="admin-controls">
      <li class="edit"><%= link_to_function('Edit', %($('permission-edit-#{user ? user.id : :anon}').toggle())) %></li>
      <li class="del"><%= link_to_function('Delete', "Permissions.removeMember('#{user ? user.id : :anon}')") %></li>
    </ul>
  </li>
  <li class="permission permissionedit form" id="permission-edit-<%= user ? user.id : :anon %>" style="display:none">
    <% form_for :permission, permissions.first, :url => (user ? user_permissions_path(user) : anon_permissions_path), :html => { :method => :put } do |f| -%>
      <%= render :partial => "form", :object => f, :locals => { :permissions => permissions } %>
      <p class="btns">
        <%= submit_tag 'Save', :disable_with => 'Saving...' %>
      </p>
    <% end -%>
  </li>
<% end -%>
</ul>

  <% sheet_form_for @permission, :html => { :id => 'add-member' }, :trigger => 'addmember' do |s| -%>
    <h2>Add a new Member</h2>
    <%= s.text_field_tag "Email:", :email, params[:email], :size => 30 %>
    <p>(leave email and svn login info blank for anonymous access)</p>
    <%= s.text_field "SVN Login:", :login %>
    <p style="border-bottom:0">
      <label>Administrator?</label>
        <%= s.check_box :admin %> Yes, this user can add and delete members.
    </p>
    <div id="svn-paths">
      <%= path_permissions %>
    </div>
  <% end -%>


{'fraction_non_alphanumeric': 0.2319915254237288, 'fraction_numerical': 0.0034427966101694915, 'mean_word_length': 3.507159904534606, 'pattern_counts': {'":': 0, '<': 114, '<?xml version=': 0, '>': 142, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4315280', 'n_tokens_mistral': 1396, 'n_tokens_neox': 1313, 'n_words': 304}