<commit_before><% @title_text = "Edit Institutional Resource" %>
<h2> Edit <%= @resource.label %> Resource For  <%= @current_institution.full_name %> </h2>


  <%= form_for @resource, html: { :class => 'form-horizontal' } do |f| %>

    <%= render partial: "shared/errors", locals: {model: @resource } %>

    <fieldset>
      <div class="control-group">
        <%= f.label :resource_type, "Resource Type", :class => "control-label" %>
        <div class="controls">
          <%= f.select :resource_type,
          		options_for_select([['Links', :actionable_url], ['Guidance', :help_text]], @resource.resource_type) %>
        </div>
      </div>

      <div class="control-group">
        <%= f.label :label, "Resource Label", :class => "control-label required", id: "label_label" %>
        <div class="controls">
          <%= f.text_field :label, placeholder: "Enter a name for this Resource", :class => "input-xlarge", 'aria-required' => 'true' %>
        </div>
      </div>

      <div class="control-group">
        <%= f.label :text, "Text", :class => "control-label", id: "text" %>
        <div class="controls">
          <%= f.text_area :text, size: "20x10",placeholder: "Enter the text", :class => "full-length" %>
        </div>
      </div>

      <%= hidden_field_tag(:origin_url, params[:origin_url]) %>
      <%= hidden_field_tag(:tab_number, params[:tab_number]) %>


      <div class="control-group">
         <%= f.label :value, "Value", :class => "control-label", id: "value_label" %>
        <div class="controls">
          <%= f.text_field :value, placeholder: "URL", :class => "input-xlarge" %>
        </div>
      </div>

      <div class="actions pull-left">
        <%= link_to '<< Back', request.env["HTTP_REFERER"] + "##{params[:tab_number]}", :class => "btn" %>
      </div>


      <div class="actions pull-right">
        <%= button_tag 'Cancel', type: :reset, :class => "btn" %>

        <%= f.submit 'Save Changes', :class => "btn" %>

        <%= link_to(content_tag(:span, "", :class => "icon remove") + 'Delete Resource',
                                      delete_resource_path(resource_id: @resource.id),
                                      :method => :delete,
                                      :data => { :confirm => 'Are you sure?' },
                                      :class => "red remove_fields") %>

      </div>

    </fieldset>

  <% end %>






<commit_msg>add tooltips to Edit Institutional Resource page<commit_after><% @title_text = "Edit Institutional Resource" %>
<h2> Edit <%= @resource.label %> Resource For  <%= @current_institution.full_name %> </h2>


  <%= form_for @resource, html: { :class => 'form-horizontal' } do |f| %>

    <%= render partial: "shared/errors", locals: {model: @resource } %>

    <fieldset>
      <div class="control-group">
        <%= f.label :resource_type, "Resource Type", :class => "control-label" %>
        <div class="controls">
          <%= f.select :resource_type,
          		options_for_select([['Links', :actionable_url], ['Guidance', :help_text]], @resource.resource_type) %>
          <%= content_tag(:span, '', :title => 'Resources can be either actionable URLs or help text.', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip') %>
        </div>
      </div>

      <div class="control-group">
        <%= f.label :label, "Resource Label", :class => "control-label required", id: "label_label" %>
        <div class="controls">
          <%= f.text_field :label, placeholder: "Enter a name for this Resource", :class => "input-xlarge", 'aria-required' => 'true' %>
          <%= content_tag(:span, '', :title => 'The name for this resource. For example, &#8220;UC3’s Merritt Repository&#8221; would be the label for the URL http://merritt.cdlib.org.', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip') %>
        </div>
      </div>

      <div class="control-group">
        <%= f.label :text, "Text", :class => "control-label", id: "text" %>
        <div class="controls">
          <%= f.text_area :text, size: "20x10",placeholder: "Enter the text", :class => "full-length" %>
        </div>
      </div>

      <%= hidden_field_tag(:origin_url, params[:origin_url]) %>
      <%= hidden_field_tag(:tab_number, params[:tab_number]) %>


      <div class="control-group">
         <%= f.label :value, "Value", :class => "control-label", id: "value_label" %>
        <div class="controls">
          <%= f.text_field :value, placeholder: "URL", :class => "input-xlarge" %>
        </div>
      </div>

      <div class="actions pull-left">
        <%= link_to '<< Back', request.env["HTTP_REFERER"] + "##{params[:tab_number]}", :class => "btn" %>
      </div>


      <div class="actions pull-right">
        <%= button_tag 'Cancel', type: :reset, :class => "btn" %>

        <%= f.submit 'Save Changes', :class => "btn" %>

        <%= link_to(content_tag(:span, "", :class => "icon remove") + 'Delete Resource',
                                      delete_resource_path(resource_id: @resource.id),
                                      :method => :delete,
                                      :data => { :confirm => 'Are you sure?' },
                                      :class => "red remove_fields") %>

      </div>

    </fieldset>

  <% end %>







{'fraction_non_alphanumeric': 0.1933456561922366, 'fraction_numerical': 0.0038817005545286505, 'mean_word_length': 2.4619321817018553, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 137, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2765550', 'n_tokens_mistral': 1774, 'n_tokens_neox': 1623, 'n_words': 383}