prevent update if template is in use
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<div class="btn-group">
|
||||
<%= button_tag t(".actions.manage"), class: "btn btn-light btn-sm dropdown-toggle border", data: { toggle: "dropdown", boundary: "window" }, aria: { haspopup: true, expanded: false } %>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<% if policy(ContractTemplate).edit? %>
|
||||
<% if policy(ContractTemplate).edit? && contract_template.editable? %>
|
||||
<%= link_to fa_icon("pencil fw", text: t(".actions.edit")), [:edit, contract_template], class: "dropdown-item" %>
|
||||
<% end %>
|
||||
<% if policy(QrCode).show? %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%= bootstrap_form_with model: [project, contract_template], local: true do |form| %>
|
||||
<%= bootstrap_form_with model: 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" %>
|
||||
|
||||
Reference in New Issue
Block a user