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

19 lines
667 B
Text
Raw Normal View History

<div
class="inline-editing-container <%= name %>-editable-field"
style="width:<%= (defined? width) ? width.html_safe : '100%' %>"
data-field-to-update="<%= field_to_udpate %>"
data-params-group="<%= params_group %>"
data-path-to-update="<%= path_to_update %>"
data-original-name="<%= initial_value %>"
error="false"
>
<input 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('<%= name %>')
</script>