|
8 | 8 | 'data-thredded-submit-hotkey' => true, |
9 | 9 | } do |form| %> |
10 | 10 |
|
11 | | - <ul class="thredded--form-list on-top"> |
12 | | - <li class="title"> |
13 | | - <%= form.label :title, t('thredded.private_topics.form.title_label') %> |
14 | | - <%= form.text_field :title, placeholder: placeholder, required: true, autocomplete: 'off' %> |
| 11 | + <div class="space-y-4"> |
| 12 | + <!-- Title Field --> |
| 13 | + <div> |
| 14 | + <%= form.label :title, t('thredded.private_topics.form.title_label'), class: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1" %> |
| 15 | + <%= form.text_field :title, |
| 16 | + placeholder: placeholder, |
| 17 | + required: true, |
| 18 | + autocomplete: 'off', |
| 19 | + class: "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white text-sm" %> |
15 | 20 | <%= render 'thredded/shared/field_errors', messages: form.object.errors[:title] %> |
16 | | - </li> |
17 | | - |
18 | | - <li> |
19 | | - <%= form.label :user_names, t('thredded.private_topics.form.users_label') %> |
| 21 | + </div> |
| 22 | + |
| 23 | + <!-- Participants Field --> |
| 24 | + <div> |
| 25 | + <%= form.label :user_names, t('thredded.private_topics.form.users_label'), class: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1" %> |
20 | 26 | <%= form.text_area :user_names, |
21 | 27 | required: true, |
22 | 28 | placeholder: t('thredded.private_topics.form.users_placeholder'), |
23 | 29 | 'data-thredded-users-select' => true, |
24 | 30 | 'data-autocomplete-url' => autocomplete_users_path, |
25 | 31 | 'data-autocomplete-min-length' => Thredded.autocomplete_min_length, |
26 | | - rows: 1 %> |
27 | | - <div class="recipients-helper"> |
28 | | - <i class="material-icons">info</i> |
| 32 | + rows: 1, |
| 33 | + class: "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white text-sm" %> |
| 34 | + <p class="mt-1 text-xs text-gray-500 dark:text-gray-400 flex items-center"> |
| 35 | + <i class="material-icons text-xs mr-1">info</i> |
29 | 36 | Start typing to search for users |
30 | | - </div> |
| 37 | + </p> |
31 | 38 | <%= render 'thredded/shared/field_errors', messages: form.object.errors[:user_names] %> |
32 | | - </li> |
| 39 | + </div> |
33 | 40 |
|
| 41 | + <!-- Message Content --> |
34 | 42 | <%= render 'thredded/posts_common/form/content', |
35 | 43 | form: form, |
36 | 44 | content_label: t('thredded.private_topics.form.content_label'), |
37 | 45 | preview_url: private_topic.preview_path %> |
38 | 46 |
|
39 | | - <li> |
40 | | - <div class="compose-actions"> |
41 | | - <div class="left-actions"> |
42 | | - <a href="<%= private_topics_path %>" class="btn-cancel"> |
43 | | - <i class="material-icons">arrow_back</i> |
44 | | - Cancel |
45 | | - </a> |
46 | | - </div> |
47 | | - |
48 | | - <div class="right-actions"> |
49 | | - <button type="button" class="btn-preview" data-thredded-preview-toggle> |
50 | | - <i class="material-icons">visibility</i> |
51 | | - Preview |
52 | | - </button> |
53 | | - |
54 | | - <button type="submit" class="thredded--form--submit" |
55 | | - data-disable-with="<%= t 'thredded.private_topics.form.create_btn_submitting' %>"> |
56 | | - <i class="material-icons">send</i> |
57 | | - <%= t('thredded.private_topics.form.create_btn') %> |
58 | | - </button> |
59 | | - </div> |
| 47 | + <!-- Actions --> |
| 48 | + <div class="flex items-center justify-between pt-4 border-t border-gray-200 dark:border-gray-700"> |
| 49 | + <a href="<%= private_topics_path %>" class="inline-flex items-center px-3 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white transition-colors"> |
| 50 | + <i class="material-icons text-sm mr-1">arrow_back</i> |
| 51 | + Cancel |
| 52 | + </a> |
| 53 | + |
| 54 | + <div class="flex items-center space-x-3"> |
| 55 | + <button type="button" class="inline-flex items-center px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 transition-colors" data-thredded-preview-toggle> |
| 56 | + <i class="material-icons text-sm mr-1">visibility</i> |
| 57 | + Preview |
| 58 | + </button> |
| 59 | + |
| 60 | + <button type="submit" class="inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors" |
| 61 | + data-disable-with="<%= t 'thredded.private_topics.form.create_btn_submitting' %>"> |
| 62 | + <i class="material-icons text-sm mr-1">send</i> |
| 63 | + <%= t('thredded.private_topics.form.create_btn') %> |
| 64 | + </button> |
60 | 65 | </div> |
61 | | - </li> |
62 | | - </ul> |
| 66 | + </div> |
| 67 | + </div> |
63 | 68 | <% end %> |
64 | 69 |
|
65 | 70 | <script> |
|
0 commit comments