<commit_before><div class="fieldset">
    <div class="form_item required">
        <div class="form_item_block">
            <%= required_label(scope[:form], :name, l.string("JOB_NAME")) %>
            <div>
                <%= scope[:form].text_field :name %>
                <%= error_message_on(scope[:job], com.thoughtworks.go.config.JobConfig::NAME, :css_class => "form_error") %>
            </div>
        </div>
        <div class="form_item_block">
            <%= scope[:form].label com.thoughtworks.go.config.JobConfig::RESOURCES, l.string("RESOURCES") %>
            <div>
                <%= scope[:form].text_field com.thoughtworks.go.config.JobConfig::RESOURCES, :class => "resources_auto_complete", :value => scope[:job].resources().exportToCsv() %>
                <div class="contextual_help has_go_tip_right" title="<%= l.string("TOOLTIP_RESOURCES") -%>"></div>
                <%- scope[:job].resources().each do |resource| -%>
                    <%= error_message_on(resource, com.thoughtworks.go.config.JobConfig::RESOURCES, :css_class => "form_error") -%>
                <%- end -%>
            </div>
            <div class="inline_instruction">
                <%= l.string('INSTRUCTION_RESOURCES') -%>
            </div>
        </div>
        <div class="form_item">
            <%= scope[:form].label com.thoughtworks.go.config.JobConfig::TIMEOUT, l.string("JOB_TIMEOUT"), :class => "before_tip" %>
            <div class="contextual_help has_go_tip_right" title="<%=l.string("TOOLTIP_JOB_TIMEOUT")-%>"></div>
            <div class="clear"></div>

            <div class="checkbox_row">
                <%= scope[:form].radio_button 'timeoutType', com.thoughtworks.go.config.JobConfig::NEVER_TIMEOUT, :id => "jobTimeout_never" -%>
                <%= label_tag "jobTimeout_never", l.string("NEVER_TIMEOUT") -%>
            </div>
            
            <div class="checkbox_row">
                <%= scope[:form].radio_button 'timeoutType', com.thoughtworks.go.config.JobConfig::DEFAULT_TIMEOUT, :id => "jobTimeout_default" -%>
                <%= label_tag "jobTimeout_default", "#{l.string("DEFAULT_TIMEOUT")} (#{default_job_timeout_for_display(scope[:cruise_config])})"-%>
            </div>

            <div class="override_timeout checkbox_row">
                <%= scope[:form].radio_button 'timeoutType', com.thoughtworks.go.config.JobConfig::OVERRIDE_TIMEOUT, :id => "jobTimeout_override" -%>
                <%= label_tag "jobTimeout_override", l.string("OVERRIDE_TIMEOUT_PREFIX")  -%>
                <%= scope[:form].text_field com.thoughtworks.go.config.JobConfig::TIMEOUT, :class => "inline in_between_text small_text_field" %>
                <%= label_tag "jobTimeout_override", l.string("OVERRIDE_TIMEOUT_SUFFIX") -%>
            </div>
        </div>
        <div class="form_item_block checkbox_row run_on_all_agents">
            <%= scope[:form].check_box :runOnAllAgents, :title => "#{l.string("TOOLTIP_RUN_ON_ALL")}" %>
            <label for="job_runOnAllAgents" title="<%= l.string("TOOLTIP_RUN_ON_ALL") %>"><%= l.string('RUN_ON_ALL_AGENTS') -%></label>
            <%= error_message_on(scope[:job].isRunOnAllAgents(), "type", :css_class => "form_error") %>
        </div>
    </div>
    <%= render :partial => 'shared/form_required_message.html', :locals => {:scope => {}} %>
    <%= render :partial => 'shared/convert_tool_tips.html', :locals => {:scope => {}} %>
</div>
<script type="text/javascript">

    Util.on_load(function() {
        function hookupResourcesAutoComplete() {
            jQuery(".resources_auto_complete").autocomplete(<%= @autocomplete_resources -%>, {
                multiple: true,
                minChars: 0,
                matchContains: true,
                selectFirst: false,
                multipleSeparator: ", ",
                width: 248});
        };
        
        hookupResourcesAutoComplete();

    });
</script><commit_msg>prevent html escape in js code<commit_after><div class="fieldset">
    <div class="form_item required">
        <div class="form_item_block">
            <%= required_label(scope[:form], :name, l.string("JOB_NAME")) %>
            <div>
                <%= scope[:form].text_field :name %>
                <%= error_message_on(scope[:job], com.thoughtworks.go.config.JobConfig::NAME, :css_class => "form_error") %>
            </div>
        </div>
        <div class="form_item_block">
            <%= scope[:form].label com.thoughtworks.go.config.JobConfig::RESOURCES, l.string("RESOURCES") %>
            <div>
                <%= scope[:form].text_field com.thoughtworks.go.config.JobConfig::RESOURCES, :class => "resources_auto_complete", :value => scope[:job].resources().exportToCsv() %>
                <div class="contextual_help has_go_tip_right" title="<%= l.string("TOOLTIP_RESOURCES") -%>"></div>
                <%- scope[:job].resources().each do |resource| -%>
                    <%= error_message_on(resource, com.thoughtworks.go.config.JobConfig::RESOURCES, :css_class => "form_error") -%>
                <%- end -%>
            </div>
            <div class="inline_instruction">
                <%= l.string('INSTRUCTION_RESOURCES') -%>
            </div>
        </div>
        <div class="form_item">
            <%= scope[:form].label com.thoughtworks.go.config.JobConfig::TIMEOUT, l.string("JOB_TIMEOUT"), :class => "before_tip" %>
            <div class="contextual_help has_go_tip_right" title="<%=l.string("TOOLTIP_JOB_TIMEOUT")-%>"></div>
            <div class="clear"></div>

            <div class="checkbox_row">
                <%= scope[:form].radio_button 'timeoutType', com.thoughtworks.go.config.JobConfig::NEVER_TIMEOUT, :id => "jobTimeout_never" -%>
                <%= label_tag "jobTimeout_never", l.string("NEVER_TIMEOUT") -%>
            </div>
            
            <div class="checkbox_row">
                <%= scope[:form].radio_button 'timeoutType', com.thoughtworks.go.config.JobConfig::DEFAULT_TIMEOUT, :id => "jobTimeout_default" -%>
                <%= label_tag "jobTimeout_default", "#{l.string("DEFAULT_TIMEOUT")} (#{default_job_timeout_for_display(scope[:cruise_config])})"-%>
            </div>

            <div class="override_timeout checkbox_row">
                <%= scope[:form].radio_button 'timeoutType', com.thoughtworks.go.config.JobConfig::OVERRIDE_TIMEOUT, :id => "jobTimeout_override" -%>
                <%= label_tag "jobTimeout_override", l.string("OVERRIDE_TIMEOUT_PREFIX")  -%>
                <%= scope[:form].text_field com.thoughtworks.go.config.JobConfig::TIMEOUT, :class => "inline in_between_text small_text_field" %>
                <%= label_tag "jobTimeout_override", l.string("OVERRIDE_TIMEOUT_SUFFIX") -%>
            </div>
        </div>
        <div class="form_item_block checkbox_row run_on_all_agents">
            <%= scope[:form].check_box :runOnAllAgents, :title => "#{l.string("TOOLTIP_RUN_ON_ALL")}" %>
            <label for="job_runOnAllAgents" title="<%= l.string("TOOLTIP_RUN_ON_ALL") %>"><%= l.string('RUN_ON_ALL_AGENTS') -%></label>
            <%= error_message_on(scope[:job].isRunOnAllAgents(), "type", :css_class => "form_error") %>
        </div>
    </div>
    <%= render :partial => 'shared/form_required_message.html', :locals => {:scope => {}} %>
    <%= render :partial => 'shared/convert_tool_tips.html', :locals => {:scope => {}} %>
</div>
<script type="text/javascript">

    Util.on_load(function() {
        function hookupResourcesAutoComplete() {
            jQuery(".resources_auto_complete").autocomplete(<%== @autocomplete_resources %>, {
                multiple: true,
                minChars: 0,
                matchContains: true,
                selectFirst: false,
                multipleSeparator: ", ",
                width: 248});
        };
        
        hookupResourcesAutoComplete();

    });
</script>
{'fraction_non_alphanumeric': 0.1725669331303134, 'fraction_numerical': 0.0010150996066489023, 'mean_word_length': 2.6339326878745966, 'pattern_counts': {'":': 0, '<': 125, '<?xml version=': 0, '>': 159, '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': '5047289', 'n_tokens_mistral': 2582, 'n_tokens_neox': 2374, 'n_words': 324}