|
67 | 67 | <small class="flex-fill text-end fw-light text-muted text-uppercase">Press enter to add a new tag</small> |
68 | 68 | </div> |
69 | 69 | <p>Please note: For any tag you add or remove, its cognates are also added or removed.</p> |
70 | | - <%= f.select :tag_list, |
71 | | - options_from_collection_for_select( |
72 | | - ActsAsTaggableOn::Tag.all&.order(name: :asc), |
73 | | - :name, |
74 | | - :name, |
75 | | - topic.tag_list |
76 | | - ), |
77 | | - { prompt: "Select tags", include_blank: true }, |
78 | | - multiple: true, |
79 | | - style: "width: 100%; min-height: 120px; padding: 0.75rem 1rem; border: 2px solid #e5e7eb; border-radius: 0.5rem; font-size: 0.875rem; transition: all 0.2s; background: #f9fafb;", |
80 | | - data: { "allow-new": "true", "allow-clear": "true", "select-tags-target": "tagList" } |
81 | | - %> |
| 70 | + <%= f.select :tag_list, |
| 71 | + options_from_collection_for_select( |
| 72 | + ActsAsTaggableOn::Tag.all&.order(name: :asc), |
| 73 | + :name, |
| 74 | + :name, |
| 75 | + topic.tag_list |
| 76 | + ), |
| 77 | + { prompt: "Select tags", include_blank: true }, |
| 78 | + multiple: true, |
| 79 | + style: "width: 100%; min-height: 120px; padding: 0.75rem 1rem; border: 2px solid #e5e7eb; border-radius: 0.5rem; font-size: 0.875rem; transition: all 0.2s; background: #f9fafb;", |
| 80 | + data: { "allow-new": "true", "allow-clear": "true", "select-tags-target": "tagList" } |
| 81 | + %> |
82 | 82 | </div> |
83 | 83 | <p style="margin-top: 0.5rem; font-size: 0.75rem; color: #6b7280;">Add relevant tags to help users discover this content. You can select existing tags or create new ones.</p> |
84 | 84 | </div> |
|
99 | 99 | <%= f.hidden_field :documents, multiple: true, value: document.signed_id, data: { upload_target: "hiddenField" } %> |
100 | 100 | <% end %> |
101 | 101 |
|
102 | | - <%= f.file_field :documents, multiple: true, class: "form-control mt-4", id: "documents", data: { upload_target: "filesInput", action: "change->upload#uploadFile" } %> |
| 102 | + <%= f.file_field :documents, multiple: true, class: "form-control mt-4", id: "documents", data: { upload_target: "filesInput", action: "change->upload#uploadFile" } %> |
103 | 103 |
|
104 | | - <div class="d-none" data-upload-target="spinner"> |
105 | | - <div class="spinner-border spinner-border-sm mt-4" role="status"> |
106 | | - <span class="visually-hidden">Uploading in progress...</span> |
107 | | - </div> |
108 | | - <span>Uploading in progress...</span> |
| 104 | + <div class="d-none" data-upload-target="spinner"> |
| 105 | + <div class="spinner-border spinner-border-sm mt-4" role="status"> |
| 106 | + <span class="visually-hidden">Uploading in progress...</span> |
109 | 107 | </div> |
| 108 | + <span>Uploading in progress...</span> |
| 109 | + </div> |
110 | 110 |
|
111 | | - <div class="col-12 d-flex justify-content-end mt-4"> |
112 | | - <%= f.submit class: "btn btn-primary me-1 mb-1", data: { upload_target: "submitButton" } %> |
113 | | - <%= link_to "Cancel Editing", topics_path, class: "btn btn-light-secondary me-1 mb-1" %> |
114 | | - </div> |
| 111 | + <div class="col-12 d-flex justify-content-end mt-4"> |
| 112 | + <%= f.submit class: "btn btn-primary me-1 mb-1", data: { upload_target: "submitButton" } %> |
| 113 | + <%= link_to "Cancel Editing", topics_path, class: "btn btn-light-secondary me-1 mb-1" %> |
115 | 114 | </div> |
116 | 115 | </div> |
117 | 116 | </div> |
118 | 117 |
|
119 | 118 | <div style="display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; border-top: 1px solid #f3f4f6; margin-top: 2rem;"> |
120 | 119 | <div style="display: flex; gap: 1rem;"> |
121 | | - <%= f.submit "Save Topic", |
122 | | - style: "background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: white; font-weight: 600; padding: 0.75rem 2rem; border-radius: 0.5rem; border: none; cursor: pointer; font-size: 0.875rem; box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3); transition: all 0.2s;" %> |
123 | | - <%= link_to "Back to Topics", topics_path, |
124 | | - class: "topic-form-cancel-btn", |
125 | | - style: "background: #f3f4f6; color: #6b7280; font-weight: 600; padding: 0.75rem 2rem; border-radius: 0.5rem; text-decoration: none; font-size: 0.875rem; transition: all 0.2s; display: inline-block;" %> |
| 120 | + <%= f.submit "Save Topic", style: "background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: white; font-weight: 600; padding: 0.75rem 2rem; border-radius: 0.5rem; border: none; cursor: pointer; font-size: 0.875rem; box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3); transition: all 0.2s;" %> |
| 121 | + <%= link_to "Back to Topics", topics_path, |
| 122 | + class: "topic-form-cancel-btn", |
| 123 | + style: "background: #f3f4f6; color: #6b7280; font-weight: 600; padding: 0.75rem 2rem; border-radius: 0.5rem; text-decoration: none; font-size: 0.875rem; transition: all 0.2s; display: inline-block;" %> |
126 | 124 | </div> |
127 | 125 |
|
128 | 126 | <% if topic.persisted? %> |
|
0 commit comments