|
1 | 1 | <%= form_for @forum_thread,
|
2 | 2 | url: (@forum_thread.persisted? ? simple_discussion.forum_thread_path(@forum_thread) : simple_discussion.forum_threads_path),
|
3 |
| - html: { data: { behavior: "comment-form", controller: "simplemde" } } do |f| %> |
| 3 | + html: { |
| 4 | + data: { |
| 5 | + behavior: "comment-form", |
| 6 | + controller: "simplemde", |
| 7 | + simplemde_circuit_embed_value: SimpleDiscussion.markdown_circuit_embed, |
| 8 | + simplemde_user_tagging_value: SimpleDiscussion.markdown_user_tagging, |
| 9 | + simplemde_video_embed_value: SimpleDiscussion.markdown_video_embed, |
| 10 | + } |
| 11 | + } do |f| %> |
4 | 12 |
|
5 | 13 | <% if @forum_thread.errors.any? %>
|
6 | 14 | <div class="alert alert-danger" role="alert">
|
|
41 | 49 | <div class="dropdown-menu" data-simplemde-target="tagDropdown">
|
42 | 50 | </div>
|
43 | 51 | <% end %>
|
| 52 | + |
| 53 | +<!-- Embed Circuit Modal --> |
| 54 | +<div class="modal fade" id="embedCircuitModal" tabindex="-1" aria-labelledby="embedCircuitModalLabel" aria-hidden="true"> |
| 55 | + <div class="modal-dialog modal-dialog-centered"> |
| 56 | + <div class="modal-content"> |
| 57 | + <div class="modal-header"> |
| 58 | + <h5 class="modal-title" id="embedCircuitModalLabel">Embed Circuit</h5> |
| 59 | + <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"> |
| 60 | + <span aria-hidden="true">×</span> |
| 61 | + </button> |
| 62 | + </div> |
| 63 | + <div class="modal-body"> |
| 64 | + <form> |
| 65 | + <div class="mb-3"> |
| 66 | + <label for="circuitEmbedLink" class="form-label">Circuit Embed Link:</label> |
| 67 | + <input class="form-control" id="circuitEmbedLink" placeholder="Enter the circuit embed link"> |
| 68 | + </div> |
| 69 | + </form> |
| 70 | + </div> |
| 71 | + <div class="modal-footer"> |
| 72 | + <button type="button" class="btn forum-primary-btn" id="insertCircuitEmbed">Insert</button> |
| 73 | + </div> |
| 74 | + </div> |
| 75 | + </div> |
| 76 | +</div> |
| 77 | + |
| 78 | +<!-- Embed Video Modal --> |
| 79 | +<div class="modal fade" id="embedVideoModal" tabindex="-1" aria-labelledby="embedVideoModalLabel" aria-hidden="true"> |
| 80 | + <div class="modal-dialog modal-dialog-centered"> |
| 81 | + <div class="modal-content"> |
| 82 | + <div class="modal-header"> |
| 83 | + <h5 class="modal-title" id="embedVideoModalLabel">Embed YouTube Video</h5> |
| 84 | + <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"> |
| 85 | + <span aria-hidden="true">×</span> |
| 86 | + </button> |
| 87 | + </div> |
| 88 | + <div class="modal-body"> |
| 89 | + <form> |
| 90 | + <div class="mb-3"> |
| 91 | + <label for="videoEmbedLink" class="form-label">YouTube Video Link:</label> |
| 92 | + <input type="url" pattern="https://*" class="form-control" id="videoEmbedLink" placeholder="Enter the YouTube video link"> |
| 93 | + </div> |
| 94 | + </form> |
| 95 | + </div> |
| 96 | + <div class="modal-footer"> |
| 97 | + <button type="button" class="btn forum-primary-btn" id="insertVideoEmbed">Insert</button> |
| 98 | + </div> |
| 99 | + </div> |
| 100 | + </div> |
| 101 | +</div> |
0 commit comments