<commit_before><h1 class="row-fluid"><span class="icon select"></span>Select DMP Template</h1>
<br/>
<div class="row-fluid">
  <div class="span8">
    <p>Select one of the funder DMP Templates listed to proceed to the next step. The type of template chosen can affect
      what information you will need to provide in the following steps.</p>
  </div>
  <div class="search-area span4 pull-right">
    <%= form_tag('', {:method => :get}) do %>
      <div class="control-group pull-right">
        <%= search_field_tag(:q, params[:q], :class => 'input-large') %>
        <%= label_tag :q, "Search", :class => "icon search" %>
        <%= submit_tag('Search') %>
      </div>
    <% end %>
  </div>
</div>
<br/>
<div class="buttons-alpha row">
  <%= link_to('A - F', {:s => 'a', :e => 'f'}, :class => 'btn viewA-F') %>
  <%= link_to('G - L', {:s => 'g', :e => 'l'}, :class => 'btn viewG-L') %>
  <%= link_to('M - S', {:s => 'm', :e => 's'}, :class => 'btn viewM-S') %>
  <%= link_to('T - Z', {:s => 't', :e => 'z'}, :class => 'btn viewT-Z') %>
  <%= link_to('All', {:s => 'a', :e => 'z'}, :class => 'btn viewA-Z') %>
</div>
<br/>
<% unless @rt_tree.blank? %>
  <%= form_tag(@submit_to, method: "get", id: 'requirements_template_form') do %>
    <div class="row-fluid">
      <div class="tree-view template-list span8">
        <ul>
          <% @rt_tree.each do |k, v| %>
            <% if v.nil? %>
              <li>
                <div class="icons">
                  <%= radio_button_tag(:requirements_template_id, k.id, false, :class => 'req_chooser') %>
                  <span class="icon requirement"></span>
                </div>
                <%= label_tag("requirements_template_id_#{k.id}", k.name) %>
              </li>
            <% else %>
              <li class="nested_templates">
                <div class="icons">
                  <%= link_to(content_tag(:span, "", :class => "icon-chevron-right", :id => "inst_chevron_#{k.id}"), "#", :class => "accordioner", :id => "inst_opener1_#{k.id}") %>
                  <span class="icon-folder-close" id="<%= "inst_folder_#{k.id}" %>"></span>
                </div>
                <%= link_to(k.name, '#', :id => "inst_opener2_#{k.id}", :class => 'accordioner') %>
                <ul class="closed_list" id="<%= "inst_list_#{k.id}" %>">
                  <% v.each do |i| %>
                    <li>
                      <div class="icons">
                        <%= radio_button_tag(:requirements_template_id, i.id, false, :class => 'req_chooser') %>
                        <span class="icon requirement"></span>
                      </div>
                      <%= label_tag("requirements_template_id_#{i.id}", i.name) %>
                    </li>
                  <% end %>
                </ul>
              </li>
            <% end %>
          <% end %>
        </ul>
      </div>
    </div>
    <%= link_to(@back_text, @back_to, method: :get, :class => "btn pull-left") %>
    <%= submit_tag(@submit_text, id: 'next', method: :get, :class => "btn pull-right") %>
  <% end %>

<% else %>
  <br/>
  <p>No DMP templates were available to show. If you are filtering or searching, please modify your search to see more
    items.</p>
<% end %>
<div id="dialog" title="Please select a DMP Template">
  You must select a DMP template before continuing.
</div>

<script type="text/javascript">
  $('.accordioner').click(function (event) {
    event.preventDefault();
    var target_id = event.target.id.replace(/^inst_[a-z0-9]+_/g, '');
    // console.log(target_id);

    //toggle folder
    var icon = $('#inst_folder_' + target_id);
    var new_icon_class = ( icon.attr('class') == 'icon-folder-close' ? 'icon-folder-open' : 'icon-folder-close' );
    icon.removeClass(icon.attr('class')).addClass(new_icon_class);

    //toggle chevrons
    icon = $('#inst_chevron_' + target_id);
    new_icon_class = ( icon.attr('class') == 'icon-chevron-right' ? 'icon-chevron-down' : 'icon-chevron-right' );
    icon.removeClass(icon.attr('class')).addClass(new_icon_class);

    //hide/show list under
    var list = $('#inst_list_' + target_id);
    list.toggle('fold');

  });

  $('#requirements_template_form').on('submit', function (e) {
    var selected = $('input[name=requirements_template_id]:checked', '#requirements_template_form').val();
    if (selected == undefined) {
      $('#dialog').dialog('open');
      e.preventDefault();
    } else {
      // let it go ahead
    }
  });

  $('#dialog').dialog({
    autoOpen: false,
    width: 400,
    height: 100,
    modal: true,
    closeOnEscape: true,
    draggable: true,
    resizable: false,
    title: "Please Select a Template ",
    show: {
      effect: "blind",
      duration: 1000
    },
    hide: {
      effect: "toggle",
      duration: 1000
    },
    open: function () {
      $('#ui-id-1').parent().css('font-family', 'Helvetica, sans-serif');
      $("#dialog").dialog("open");
    },
    close: function () {
      $('#dialog').dialog("close");
    }
  });

</script>







<commit_msg>select dmp template popup - working on layout<commit_after><h1 class="row-fluid"><span class="icon select"></span>Select DMP Template</h1>
<br/>
<div class="row-fluid">
  <div class="span8">
    <p>Select one of the funder DMP Templates listed to proceed to the next step. The type of template chosen can affect
      what information you will need to provide in the following steps.</p>
  </div>
  <div class="search-area span4 pull-right">
    <%= form_tag('', {:method => :get}) do %>
      <div class="control-group pull-right">
        <%= search_field_tag(:q, params[:q], :class => 'input-large') %>
        <%= label_tag :q, "Search", :class => "icon search" %>
        <%= submit_tag('Search') %>
      </div>
    <% end %>
  </div>
</div>
<br/>
<div class="buttons-alpha row">
  <%= link_to('A - F', {:s => 'a', :e => 'f'}, :class => 'btn viewA-F') %>
  <%= link_to('G - L', {:s => 'g', :e => 'l'}, :class => 'btn viewG-L') %>
  <%= link_to('M - S', {:s => 'm', :e => 's'}, :class => 'btn viewM-S') %>
  <%= link_to('T - Z', {:s => 't', :e => 'z'}, :class => 'btn viewT-Z') %>
  <%= link_to('All', {:s => 'a', :e => 'z'}, :class => 'btn viewA-Z') %>
</div>
<br/>
<% unless @rt_tree.blank? %>
  <%= form_tag(@submit_to, method: "get", id: 'requirements_template_form') do %>
    <div class="row-fluid">
      <div class="tree-view template-list span8">
        <ul>
          <% @rt_tree.each do |k, v| %>
            <% if v.nil? %>
              <li>
                <div class="icons">
                  <%= radio_button_tag(:requirements_template_id, k.id, false, :class => 'req_chooser') %>
                  <span class="icon requirement"></span>
                </div>
                <%= label_tag("requirements_template_id_#{k.id}", k.name) %>
              </li>
            <% else %>
              <li class="nested_templates">
                <div class="icons">
                  <%= link_to(content_tag(:span, "", :class => "icon-chevron-right", :id => "inst_chevron_#{k.id}"), "#", :class => "accordioner", :id => "inst_opener1_#{k.id}") %>
                  <span class="icon-folder-close" id="<%= "inst_folder_#{k.id}" %>"></span>
                </div>
                <%= link_to(k.name, '#', :id => "inst_opener2_#{k.id}", :class => 'accordioner') %>
                <ul class="closed_list" id="<%= "inst_list_#{k.id}" %>">
                  <% v.each do |i| %>
                    <li>
                      <div class="icons">
                        <%= radio_button_tag(:requirements_template_id, i.id, false, :class => 'req_chooser') %>
                        <span class="icon requirement"></span>
                      </div>
                      <%= label_tag("requirements_template_id_#{i.id}", i.name) %>
                    </li>
                  <% end %>
                </ul>
              </li>
            <% end %>
          <% end %>
        </ul>
      </div>
    </div>
    <%= link_to(@back_text, @back_to, method: :get, :class => "btn pull-left") %>
    <%= submit_tag(@submit_text, id: 'next', method: :get, :class => "btn pull-right") %>
  <% end %>

<% else %>
  <br/>
  <p>No DMP templates were available to show. If you are filtering or searching, please modify your search to see more
    items.</p>
<% end %>
<div id="dialog" title="Please select a DMP Template">
  You must select a DMP template before continuing.
</div>

<script type="text/javascript">
  $('.accordioner').click(function (event) {
    event.preventDefault();
    var target_id = event.target.id.replace(/^inst_[a-z0-9]+_/g, '');
    // console.log(target_id);

    //toggle folder
    var icon = $('#inst_folder_' + target_id);
    var new_icon_class = ( icon.attr('class') == 'icon-folder-close' ? 'icon-folder-open' : 'icon-folder-close' );
    icon.removeClass(icon.attr('class')).addClass(new_icon_class);

    //toggle chevrons
    icon = $('#inst_chevron_' + target_id);
    new_icon_class = ( icon.attr('class') == 'icon-chevron-right' ? 'icon-chevron-down' : 'icon-chevron-right' );
    icon.removeClass(icon.attr('class')).addClass(new_icon_class);

    //hide/show list under
    var list = $('#inst_list_' + target_id);
    list.toggle('fold');

  });

  $('#requirements_template_form').on('submit', function (e) {
    var selected = $('input[name=requirements_template_id]:checked', '#requirements_template_form').val();
    if (selected == undefined) {
      $('#dialog').dialog('open');
      e.preventDefault();
    } else {
      // let it go ahead
    }
  });

  $('#dialog').dialog({
    autoOpen: false,
    width: 400,
    height: 100,
    modal: true,
    closeOnEscape: true,
    draggable: true,
    resizable: false,
    title: "Please Select a Template",
    
    open: function () {

       $('#ui-id-1').wrap("<h3 id=\"new_h3\"><strong id=\"new_strong\"></strong></h3>");

      $('.ui-widget-overlay').addClass('custom-overlay');

      $('.ui-dialog').css('padding','0');
      //$('.ui-dialog').css('top','10%');
      //$('.ui-dialog').css('left','50%');
      $('.ui-dialog').css('background-color','white');
      $('.ui-dialog').css('padding','0');
      $('.ui-dialog').css('padding','0');
      $('.ui-dialog').css('padding','0');


      $('.ui-dialog-titlebar').css('color', '#4C4C4E');
      $('.ui-dialog-titlebar').css('font-family', 'Helvetica, sans-serif');
      $('.ui-dialog-titlebar').css('font-size', '12px');
      $('.ui-dialog-titlebar').css('line-height', '1.3');

      $('.ui-dialog-titlebar').addClass('modal-header');


     
      $("#dialog").dialog("open");
    },
    close: function () {
      $('#ui-id-1').first().unwrap();
      $('#ui-id-1').first().unwrap();
      $('#dialog').dialog("close");
    }
  });

</script>

<!-- 
      open: function()
      {   

        $('.ui-widget-overlay').addClass('custom-overlay');
        
        $('#visibility_dialog_form').prev().css('color', '#4C4C4E');
        $('#visibility_dialog_form').prev().css('font-family', 'Helvetica, sans-serif');
        $('#visibility_dialog_form').prev().css('font-size', '12px');
        $('#visibility_dialog_form').prev().css('line-height', '1.3');

         $('#visibility_dialog_form').prev().addClass('modal-header');

        $('#visibility_dialog_form').parent().addClass(' in');

        $('#visibility_dialog_form').prev().find('button').addClass('custom-close');
        $('#visibility_dialog_form').prev().find('button').css('background','none');
        $('#visibility_dialog_form').prev().find('button').css('border','none');
        $('#visibility_dialog_form').prev().find('button').css('font-color','black');
        $('#visibility_dialog_form').prev().find('button').css('font-size','20');
        $('#visibility_dialog_form').prev().find('button').css('font-color','black');
        $('#visibility_dialog_form').prev().find('button').css('opacity','0.2');
               
        $(this).parent().find('button:contains("Cancel")').removeClass('ui-corner-all');
        $(this).parent().find('button:contains("Cancel")').removeClass('ui-widget');
        $(this).parent().find('button:contains("Cancel")').removeClass('ui-button');
        $(this).parent().find('button:contains("Cancel")').removeClass('ui-state-default');
        $(this).parent().find('button:contains("Cancel")').removeClass('ui-button-text-only');
        $(this).parent().find('button:contains("Cancel")').addClass('btn');
        

        $(this).parent().find('button:contains("Submit")').removeClass('ui-corner-all');
        $(this).parent().find('button:contains("Submit")').removeClass('ui-widget');
        $(this).parent().find('button:contains("Submit")').removeClass('ui-button');
        $(this).parent().find('button:contains("Submit")').removeClass('ui-state-default');
        $(this).parent().find('button:contains("Submit")').removeClass('ui-button-text-only');
        $(this).parent().find('button:contains("Submit")').removeClass('ui-button-text');
        $(this).parent().find('button:contains("Submit")').addClass('btn btn-green confirm');     

        $('#ui-id-1').parent().removeClass('ui-widget-overlay');
        $('#ui-id-1').parent().removeClass('ui-widget-header');
        $('#ui-id-1').parent().removeClass('ui-dialog-title');
        $('#ui-id-1').parent().addClass('modal-header');
        
        // $('#ui-id-1').css('font-weight','bold');
        // $('#ui-id-1').css('font-family', 'Helvetica, sans-serif');
        // $('#ui-id-1').css('font-size', '12px');

        
        $('#ui-id-1').wrap("<h3 id=\"new_h3\"><strong id=\"new_strong\"></strong></h3>");

        $('#visibility_dialog_form').next().removeClass('ui-dialog-buttonpane ui-widget-content ui-helper-clearfix');
        $('#visibility_dialog_form').next().addClass('modal-footer'); 

        $("#visibility_dialog_form").dialog("open");
        $(".copyright span7").hide();
      },
      close: function() {
        $('#ui-id-1').first().unwrap();
        $('#ui-id-1').first().unwrap();
        $('#visibility_dialog_form').dialog("close");
        
        //window.location.reload(true);
      }
    }).prev ().find(".ui-dialog-titlebar-close").show();
    return false
  });
}); -->







{'fraction_non_alphanumeric': 0.2283702921506512, 'fraction_numerical': 0.006124604012671594, 'mean_word_length': 2.6622840938386183, 'pattern_counts': {'":': 0, '<': 180, '<?xml version=': 0, '>': 236, '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': '5625014', 'n_tokens_mistral': 4772, 'n_tokens_neox': 4548, 'n_words': 813}