<%# locals: () %>

<section class="multiform-page">
  <h3><%= t('scripts.admin.promoted_heading') %></h3>

  <p><%= t('scripts.admin.promoted_explanation', site_name: site_name) %></p>

  <%= form_tag(update_promoted_script_path, method: :patch) do |f| %>
    <div class="form-control">
      <label for="promoted_script_id"><%= t('scripts.admin.promoted_script_label') %></label>
      <% host = @script.promoted_script&.sensitive? ? 'sleazyfork.org' : 'greasyfork.org' %>
      <input id="promoted_script_id" name="promoted_script_id" type="url" value="<%= params[:promoted_script_id] || (@script.promoted_script ? script_url(@script.promoted_script, host: host) : nil) %>">
    </div>

    <input type="submit" value="<%= t('scripts.admin.promoted_submit') %>">
  <% end %>
</section>
