From 1a8f4cf9fa00a9f4699216cfa0d4632af678de9d Mon Sep 17 00:00:00 2001 From: kapill65chhpatel <kapil@cottagelabs.com> Date: Wed, 12 Apr 2023 19:27:20 +0530 Subject: [PATCH] remove button show also for first location --- hyrax/app/assets/stylesheets/rdms.scss | 4 ++++ .../views/records/edit_fields/_based_near.html.erb | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 hyrax/app/views/records/edit_fields/_based_near.html.erb diff --git a/hyrax/app/assets/stylesheets/rdms.scss b/hyrax/app/assets/stylesheets/rdms.scss index fff5c32c..3f339811 100644 --- a/hyrax/app/assets/stylesheets/rdms.scss +++ b/hyrax/app/assets/stylesheets/rdms.scss @@ -250,4 +250,8 @@ form .field-wrapper label[required="required"]::after { #documents .table { margin-bottom: 50px; +} + +.location-section .listing li .remove{ + display: block !important; } \ No newline at end of file diff --git a/hyrax/app/views/records/edit_fields/_based_near.html.erb b/hyrax/app/views/records/edit_fields/_based_near.html.erb new file mode 100644 index 00000000..3ab5dc60 --- /dev/null +++ b/hyrax/app/views/records/edit_fields/_based_near.html.erb @@ -0,0 +1,14 @@ +<div class="location-section"> + <%= f.input key, + as: :controlled_vocabulary, + placeholder: 'Search for a location', + input_html: { + class: 'form-control', + data: { 'autocomplete-url' => "/authorities/search/geonames", + 'autocomplete' => key } + }, + ### Required for the ControlledVocabulary javascript: + wrapper_html: { data: { 'autocomplete-url' => "/authorities/search/geonames", + 'field-name' => key }}, + required: f.object.required?(key) %> +</div> \ No newline at end of file -- GitLab