Sha256: cefe4a7ff6a5baa5960a6f7aaf5979c2e49b4af50c84fe44ab25ed341925aed6
Contents?: true
Size: 1.04 KB
Versions: 28
Compression:
Stored size: 1.04 KB
Contents
<%= edit_field_wrapper field: @field, index: @index, form: @form, resource: @resource, displayed_in_modal: @displayed_in_modal do %> <% if @field.display_value %> <div class="text-center text-sm font-semibold w-full leading-none mb-1"> <span class="js-progress-bar-value-<%= @field.id %>"><%= @field.value %></span><%= @field.value_suffix if @field.value_suffix.present? %> </div> <% end %> <%= @form.range_field @field.id, class: "w-full #{@field.get_html(:classes, view: view, element: :input)}", data: @field.get_html(:data, view: view, element: :input), disabled: @field.is_readonly?, max: @field.max, min: 0, placeholder: @field.placeholder, step: @field.step, style: @field.get_html(:style, view: view, element: :input) %> <% end %> <script> var input = document.getElementById('project_progress'); var log = document.querySelector('.js-progress-bar-value-<%= @field.id %>'); input.addEventListener('input', updateValue); function updateValue(e) { log.textContent = e.target.value; } </script>
Version data entries
28 entries across 28 versions & 1 rubygems