scinote-web/app/views/shared/_inline_editing.html.erb
2019-11-15 16:23:48 +01:00

17 lines
No EOL
825 B
Text

<div
class="inline-editing-container inline-init-handler"
data-field-to-update="<%= config[:field_to_udpate] %>"
data-params-group="<%= config[:params_group] %>"
data-path-to-update="<%= config[:path_to_update] %>"
data-original-name="<%= initial_value %>"
data-label-after='<%= config[:label_after]&.html_safe %>'
data-placeholder='<%= config[:placeholder] %>'
>
<div class="view-mode" data-placeholder="<%= config[:placeholder] %>"><%= initial_value %></div>
<input placeholder="<%= config[:placeholder] %>" class="hidden input-field" 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>