|
2 | 2 | <div class="space-y-6"> |
3 | 3 | <%= render "shared/errors", errors: provider.errors.full_messages, resource_name: provider.class.name %> |
4 | 4 |
|
| 5 | + <!-- File name prefix uneditable notice --> |
| 6 | + <% if @provider.topics? %> |
| 7 | + <div id="file-name-prefix-uneditable-notice" class="bg-blue-50 border border-blue-200 rounded-lg p-4"> |
| 8 | + <div class="flex"> |
| 9 | + <div class="flex-shrink-0"> |
| 10 | + <svg class="h-5 w-5 text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 11 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/> |
| 12 | + </svg> |
| 13 | + </div> |
| 14 | + <div class="ml-3"> |
| 15 | + <p class="text-sm text-blue-700 m-0"> |
| 16 | + There are topics associated with this provider, so the file names are established and the file name prefix can't be edited. |
| 17 | + </p> |
| 18 | + </div> |
| 19 | + </div> |
| 20 | + </div> |
| 21 | + <% end %> |
| 22 | + |
| 23 | + |
5 | 24 | <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> |
6 | 25 |
|
7 | 26 | <!-- Provider Name --> |
|
11 | 30 | <span class="text-red-500">*</span> |
12 | 31 | <% end %> |
13 | 32 | <%= form.text_field :name, |
14 | | - placeholder: "Enter provider name (e.g., Johns Hopkins, Mayo Clinic)", |
| 33 | + placeholder: "e.g., Johns Hopkins, Mayo Clinic", |
15 | 34 | autofocus: true, |
16 | 35 | class: "input-field bg-gray-50" %> |
17 | 36 | <p class="help-text">The official name of the healthcare provider or organization.</p> |
|
29 | 48 | <p class="help-text">The type or category of healthcare provider.</p> |
30 | 49 | </div> |
31 | 50 |
|
| 51 | + <!-- File name prefix --> |
| 52 | + <% if @provider.topics? %> |
| 53 | + <div> |
| 54 | + <%= form.label :file_name_prefix, class: "input-label" do %> |
| 55 | + File name prefix |
| 56 | + <% end %> |
| 57 | + <%= form.text_field :file_name_prefix, |
| 58 | + disabled: true, |
| 59 | + value: @provider.file_name_prefix, |
| 60 | + class: "input-field bg-gray-50" |
| 61 | + %> |
| 62 | + <p class="help-text">The prefix to use for this provider's uploads.</p> |
| 63 | + </div> |
| 64 | + <% else %> |
| 65 | + <div> |
| 66 | + <%= form.label :file_name_prefix, class: "input-label" do %> |
| 67 | + File name prefix |
| 68 | + <% end %> |
| 69 | + <%= form.text_field :file_name_prefix, |
| 70 | + placeholder: "e.g., 123_who_guidelines", |
| 71 | + class: "input-field bg-gray-50" %> |
| 72 | + <p class="help-text">The prefix to use for this provider's uploads.</p> |
| 73 | + </div> |
| 74 | + <% end %> |
| 75 | + |
32 | 76 | <!-- Regions --> |
33 | 77 | <div> |
34 | 78 | <%= form.label :region, class: "input-label" do %> |
|
0 commit comments