scinote-web/app/views/shared/_inline_editing.html.erb
aignatov-bio b1df8c9aa7
Adding inline editing to experiment title, project title and task title [SCI-3059] (#1524)
* Adding inline editing to experiment title, project title and task title
2019-03-06 09:17:34 +01:00

19 lines
No EOL
667 B
Text

<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>