scinote-web/app/views/shared/_inline_editing.html.erb

20 lines
826 B
Text
Raw Normal View History

<div
class="inline-editing-container <%= @inline_editable_title_config[:name] %>-editable-field"
data-field-to-update="<%= @inline_editable_title_config[:field_to_udpate] %>"
data-params-group="<%= @inline_editable_title_config[:params_group] %>"
data-path-to-update="<%= @inline_editable_title_config[:path_to_update] %>"
data-original-name="<%= initial_value %>"
error="false"
>
<div class="view-mode"><%= initial_value %></div>
<input class="hidden" type="text" value="<%= initial_value %>" disabled/>
<div class="button-container">
<span class="save-button"><i class="fas fa-check"></i></span>
<span class="cancel-button"><i class="fas fa-times"></i></span>
</div>
<span class="error-block"></span>
</div>
<script>
initInlineEditing('<%= @inline_editable_title_config[:name] %>')
</script>