Files
old-holivud2/app/views/contract_templates/_form.html.erb
2020-05-31 22:38:19 +02:00

41 lines
1.7 KiB
Plaintext

<%= bootstrap_form_with model: [project, contract_template], local: true do |form| %>
<%= field_set_tag content_tag(:span, t(".release_info.heading"), class: "h6 text-muted text-uppercase") do %>
<div class="form-row">
<%= form.text_field :name, wrapper_class: "col-sm-6" %>
<%= form.select :release_type, options_for_release_type_select(project, @release_type), { wrapper_class: "col-sm-6" }, data: { toggle: "collapse-select", target: "#guardian_clause", show_values: %w(appearance talent) }, class: "form-control custom-select" %>
</div>
<div class="form-row">
<%= form.number_field :fee, min:"0", max:"99999999", step: "0.01", prepend: "$", help: "Leave at $0.00 for no-fee", wrapper_class: "col-sm-6" %>
</div>
<% end %>
<hr>
<%= field_set_tag content_tag(:span, t(".exploitable_rights.heading"), class: "h6 text-muted text-uppercase")do %>
<%= render "shared/exploitable_rights_fields", form: form %>
<% end %>
<hr>
<%= field_set_tag content_tag(:span, t(".legal.heading"), class: "h6 text-muted text-uppercase") do %>
<%= form.form_group do %>
<%= form.rich_text_area :body %>
<% end %>
<div id="guardian_clause">
<%= form.form_group do %>
<%= form.rich_text_area :guardian_clause %>
<% end %>
</div>
<% end %>
<div class="row align-items-center text-center mt-4">
<%= link_to t("shared.cancel"), [project, :contract_templates], class: "col-3 text-reset" %>
<div class="col-3">
<%= form.button "Preview", name: "commit", value: "preview", class: 'btn btn-info btn-block', formtarget: "_blank" %>
</div>
<div class="col-6">
<%= form.submit class: "btn btn-success btn-block", data: { disable_with: false } %>
</div>
</div>
<% end %>