Upstream sync
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<p><%= @contract_template.body %></p>
|
||||
<% if @contract_template.fee? %>
|
||||
<p>
|
||||
Fee <span class="font-weight-bold text-success"><%= number_to_currency @contract_template.fee %></span>
|
||||
Fee <span class="font-weight-bold text-success"><%= @contract_template.fee %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<p><%= @contract_template.body %></p>
|
||||
<% if @contract_template.fee? %>
|
||||
<p>
|
||||
Fee <span class="font-weight-bold text-success"><%= number_to_currency @contract_template.fee %></span>
|
||||
Fee <span class="font-weight-bold text-success"><%= @contract_template.fee %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
$("#broadcast_recordings").html("<%= j render(partial: 'broadcasts/broadcast_recordings', locals: { recordings: @recordings, broadcast: @broadcast }) %>");
|
||||
@@ -0,0 +1,24 @@
|
||||
<%= content_tag :div, class: "modal modal-right", id: "edit_broadcast_recording_modal", aria: { labelledby: "modalLabel", hidden: true }, role: "dialog", tabindex: -1 do %>
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalLabel">Edit Broadcast Recording</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<%= bootstrap_form_with model: [broadcast, recording], url: broadcast_broadcast_recording_path(broadcast.token, recording), layout: :horizontal, label_col: "col-3", control_col: "col-9" do |form| %>
|
||||
<div class="modal-body">
|
||||
<div id="broadcast_recording_fields">
|
||||
<%= form.text_field :name %>
|
||||
<%= form.text_area :description %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<%= form.button "Close", class: "btn btn-secondary", data: { dismiss: "modal" } %>
|
||||
<%= form.submit "Update Broadcast Recording", class: "btn btn-primary", data: { disable_with: t("shared.disable_with") } %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -0,0 +1,11 @@
|
||||
$('[data-id="<%= dom_id(@recording) %>"]').remove();
|
||||
<% if @recordings.empty? %>
|
||||
$("#broadcast_recordings_nav").append('<p class="dropdown-item text-muted">Recordings will appear here</p>')
|
||||
<% end %>
|
||||
$("#broadcast_recordings").html("<%= j render(partial: 'broadcasts/broadcast_recordings', locals: { recordings: @recordings, broadcast: @broadcast }) %>");
|
||||
|
||||
// Close and remove the modal
|
||||
$("#edit_broadcast_recording_modal").on("hidden.bs.modal", function (e) {
|
||||
$("#edit_broadcast_recording_modal").remove();
|
||||
});
|
||||
$("#edit_broadcast_recording_modal").modal("hide");
|
||||
6
app/views/public/broadcast_recordings/edit.js.erb
Normal file
6
app/views/public/broadcast_recordings/edit.js.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<% # Remove the modal if it already exists %>
|
||||
$("#edit_broadcast_recording_modal").remove();
|
||||
|
||||
<% # Create and show the modal %>
|
||||
$("body").append("<%= j render(partial: 'edit_broadcast_recording_modal', locals: { broadcast: @broadcast, recording: @recording }) %>");
|
||||
$("#edit_broadcast_recording_modal").modal("toggle");
|
||||
1
app/views/public/broadcast_recordings/update.js.erb
Normal file
1
app/views/public/broadcast_recordings/update.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
<%= render("public/broadcast_recordings/refresh_recordings_list") %>
|
||||
@@ -6,7 +6,7 @@
|
||||
<p><%= @contract_template.body %></p>
|
||||
<% if @contract_template.fee? %>
|
||||
<p>
|
||||
Fee <span class="font-weight-bold text-success"><%= number_to_currency @contract_template.fee %></span>
|
||||
Fee <span class="font-weight-bold text-success"><%= @contract_template.fee %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<p><%= @contract_template.body %></p>
|
||||
<% if @contract_template.fee? %>
|
||||
<p>
|
||||
Fee <span class="font-weight-bold text-success"><%= number_to_currency @contract_template.fee %></span>
|
||||
Fee <span class="font-weight-bold text-success"><%= @contract_template.fee %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<%= @contract_template.body %>
|
||||
<% if @contract_template.fee? %>
|
||||
<p>
|
||||
Fee <span class="font-weight-bold text-success"><%= number_to_currency @contract_template.fee %></span>
|
||||
Fee <span class="font-weight-bold text-success"><%= @contract_template.fee %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -24,7 +24,7 @@
|
||||
<% end %>
|
||||
<hr>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% if (1..MedicalRelease::NUMBER_OF_CUSTOM_FIELDS).map {|n| @contract_template.public_send("question_#{n}_text").presence }.compact.any? %>
|
||||
<%= card_field_set_tag t(".questionnaire.heading") do %>
|
||||
<% (1..MedicalRelease::NUMBER_OF_CUSTOM_FIELDS).each do |n| %>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<p><%= @contract_template.body %></p>
|
||||
<% if @contract_template.fee? %>
|
||||
<p>
|
||||
Fee <span class="font-weight-bold text-success"><%= number_to_currency @contract_template.fee %></span>
|
||||
Fee <span class="font-weight-bold text-success"><%= @contract_template.fee %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -139,4 +139,4 @@
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user