Current Dev State

This commit is contained in:
Tim Lorsbach
2025-06-23 20:13:54 +02:00
parent b4f9bb277d
commit ded50edaa2
22617 changed files with 4345095 additions and 174 deletions

View File

@ -0,0 +1,50 @@
{% load static %}
<div class="modal fade bs-modal-lg" id="new_compound_modal" tabindex="-1" aria-labelledby="new_compound_modal" aria-modal="true"
role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title">Create a new Compound</h4>
</div>
<div class="modal-body">
<form id="new_compound_modal_form" accept-charset="UTF-8" action="{% url 'package compound list' meta.current_package.uuid %}" data-remote="true" method="post">
{% csrf_token %}
<label for="compound-name">Name</label>
<input id="compound-name" class="form-control" name="compound-name" placeholder="Name"/>
<label for="compound-description">Description</label>
<input id="compound-description" class="form-control" name="compound-description" placeholder="Description"/>
<p></p>
<div>
<iframe id="new_compound_ketcher" src="{% static '/js/ketcher2/ketcher.html' %}" width="100%"
height="510"></iframe>
</div>
<input type="hidden" name="compound-smiles" id="compound-smiles">
<p></p>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary pull-left" data-dismiss="modal">Close
</button>
<button type="button" class="btn btn-primary" id="new_compound_modal_form_submit">Submit</button>
</div>
</div>
</div>
</div>
<script>
$(function() {
$('#new_compound_modal_form_submit').on('click', function(e) {
e.preventDefault();
$(this).prop("disabled",true);
k = getKetcher('new_compound_ketcher');
$('#compound-smiles').val(k.getSmiles());
// submit form
$('#new_compound_modal_form').submit();
});
});
</script>