forked from enviPath/enviPy
refactor: large scale formatting/linting
This commit is contained in:
@ -1,61 +1,92 @@
|
||||
{% load static %}
|
||||
<!-- Add Additional Information-->
|
||||
<div id="add_additional_information_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<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>
|
||||
<h3 class="modal-title">Add Additional Information</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<select id="select-additional-information-type" data-actions-box='true' class="form-control" data-width='100%'>
|
||||
<option selected disabled>Select the type to add</option>
|
||||
{% for add_inf in available_additional_information %}
|
||||
<option value="{{ add_inf.name }}">{{ add_inf.display_name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% for add_inf in available_additional_information %}
|
||||
<div class="aiform {{ add_inf.name }}" style="display: none;">
|
||||
<form id="add_{{ add_inf.name }}_add-additional-information-modal-form" accept-charset="UTF-8"
|
||||
action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
{{ add_inf.widget|safe }}
|
||||
<input type="hidden" name="hidden" value="add-additional-information">
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="add-additional-information-modal-submit">Add
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<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>
|
||||
<h3 class="modal-title">Add Additional Information</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<select
|
||||
id="select-additional-information-type"
|
||||
data-actions-box="true"
|
||||
class="form-control"
|
||||
data-width="100%"
|
||||
>
|
||||
<option selected disabled>Select the type to add</option>
|
||||
{% for add_inf in available_additional_information %}
|
||||
<option value="{{ add_inf.name }}">
|
||||
{{ add_inf.display_name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% for add_inf in available_additional_information %}
|
||||
<div class="aiform {{ add_inf.name }}" style="display: none;">
|
||||
<form
|
||||
id="add_{{ add_inf.name }}_add-additional-information-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
{{ add_inf.widget|safe }}
|
||||
<input
|
||||
type="hidden"
|
||||
name="hidden"
|
||||
value="add-additional-information"
|
||||
/>
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="add-additional-information-modal-submit"
|
||||
>
|
||||
Add
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#select-additional-information-type').change(function(e){
|
||||
var selectedType = $("#select-additional-information-type :selected").val();
|
||||
$('.aiform').hide();
|
||||
$('.' + selectedType).show();
|
||||
})
|
||||
|
||||
$('#add-additional-information-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
|
||||
var selectedType = $("#select-additional-information-type :selected").val();
|
||||
console.log(selectedType);
|
||||
if (selectedType !== null && selectedType !== undefined && selectedType !== '') {
|
||||
$('.' + selectedType + ' >form').submit();
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#select-additional-information-type").change(function (e) {
|
||||
var selectedType = $(
|
||||
"#select-additional-information-type :selected",
|
||||
).val();
|
||||
$(".aiform").hide();
|
||||
$("." + selectedType).show();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$("#add-additional-information-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var selectedType = $(
|
||||
"#select-additional-information-type :selected",
|
||||
).val();
|
||||
console.log(selectedType);
|
||||
if (
|
||||
selectedType !== null &&
|
||||
selectedType !== undefined &&
|
||||
selectedType !== ""
|
||||
) {
|
||||
$("." + selectedType + " >form").submit();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,127 +1,174 @@
|
||||
|
||||
{% load static %}
|
||||
<div class="modal fade bs-modal-lg" id="add_pathway_edge_modal" tabindex="-1" aria-labelledby="add_pathway_edge_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">Add a Reaction</h4>
|
||||
<div
|
||||
class="modal fade bs-modal-lg"
|
||||
id="add_pathway_edge_modal"
|
||||
tabindex="-1"
|
||||
aria-labelledby="add_pathway_edge_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">Add a Reaction</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form
|
||||
id="add_pathway_edge_modal_form"
|
||||
accept-charset="UTF-8"
|
||||
action="{% url 'package pathway edge list' meta.current_package.uuid pathway.uuid %}"
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<label for="edge-name">Name</label>
|
||||
<input
|
||||
id="edge-name"
|
||||
class="form-control"
|
||||
name="edge-name"
|
||||
placeholder="Name"
|
||||
/>
|
||||
<label for="edge-description">Description</label>
|
||||
<input
|
||||
id="edge-description"
|
||||
class="form-control"
|
||||
name="edge-description"
|
||||
placeholder="Description"
|
||||
/>
|
||||
<p></p>
|
||||
<div class="row">
|
||||
<div class="col-xs-5">
|
||||
<legend>Substrate(s)</legend>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="add_pathway_edge_modal_form" accept-charset="UTF-8"
|
||||
action="{% url 'package pathway edge list' meta.current_package.uuid pathway.uuid %}"
|
||||
data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<label for="edge-name">Name</label>
|
||||
<input id="edge-name" class="form-control" name="edge-name" placeholder="Name"/>
|
||||
<label for="edge-description">Description</label>
|
||||
<input id="edge-description" class="form-control" name="edge-description" placeholder="Description"/>
|
||||
<p></p>
|
||||
<div class="row">
|
||||
<div class="col-xs-5">
|
||||
<legend>Substrate(s)</legend>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<legend>Product(s)</legend>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-5">
|
||||
<select id="add_pathway_edge_substrates" name="edge-substrates"
|
||||
data-actions-box='true' class="form-control" multiple data-width='100%'>
|
||||
{% for n in pathway.nodes %}
|
||||
<option data-smiles="{{ n.default_node_label.smiles }}" value="{{ n.url }}">{{ n.default_node_label.name|safe }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-2" style="display: flex; justify-content: center; align-items: center;">
|
||||
<i class="glyphicon glyphicon-arrow-right"></i>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<select id="add_pathway_edge_products" name="edge-products"
|
||||
data-actions-box='true' class="form-control" multiple data-width='100%'>
|
||||
{% for n in pathway.nodes %}
|
||||
<option data-smiles="{{ n.default_node_label.smiles }}" value="{{ n.url }}">{{ n.default_node_label.name|safe }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<p></p>
|
||||
<div class="col-xs-12" id="reaction_image">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="col-xs-2"></div>
|
||||
<div class="col-xs-5">
|
||||
<legend>Product(s)</legend>
|
||||
</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="add_pathway_edge_modal_form_submit">Submit</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-5">
|
||||
<select
|
||||
id="add_pathway_edge_substrates"
|
||||
name="edge-substrates"
|
||||
data-actions-box="true"
|
||||
class="form-control"
|
||||
multiple
|
||||
data-width="100%"
|
||||
>
|
||||
{% for n in pathway.nodes %}
|
||||
<option
|
||||
data-smiles="{{ n.default_node_label.smiles }}"
|
||||
value="{{ n.url }}"
|
||||
>
|
||||
{{ n.default_node_label.name|safe }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="col-xs-2"
|
||||
style="display: flex; justify-content: center; align-items: center;"
|
||||
>
|
||||
<i class="glyphicon glyphicon-arrow-right"></i>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<select
|
||||
id="add_pathway_edge_products"
|
||||
name="edge-products"
|
||||
data-actions-box="true"
|
||||
class="form-control"
|
||||
multiple
|
||||
data-width="100%"
|
||||
>
|
||||
{% for n in pathway.nodes %}
|
||||
<option
|
||||
data-smiles="{{ n.default_node_label.smiles }}"
|
||||
value="{{ n.url }}"
|
||||
>
|
||||
{{ n.default_node_label.name|safe }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<p></p>
|
||||
<div class="col-xs-12" id="reaction_image"></div>
|
||||
</div>
|
||||
</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="add_pathway_edge_modal_form_submit"
|
||||
>
|
||||
Submit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function reactionImage() {
|
||||
var substrates = [];
|
||||
$('#add_pathway_edge_substrates option:selected').each(function () {
|
||||
var smiles = $(this).data('smiles'); // read data-smiles attribute
|
||||
substrates.push(smiles);
|
||||
});
|
||||
|
||||
var products = []
|
||||
$('#add_pathway_edge_products option:selected').each(function () {
|
||||
var smiles = $(this).data('smiles'); // read data-smiles attribute
|
||||
products.push(smiles);
|
||||
});
|
||||
|
||||
if (substrates.length > 0 && products.length > 0) {
|
||||
reaction = substrates.join('.') + ">>" + products.join('.');
|
||||
$('#reaction_image').empty();
|
||||
$('#reaction_image').append(
|
||||
"<img width='100%' src='{% url 'depict' %}?smirks=" + encodeURIComponent(reaction) +"'>"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#add_pathway_edge_substrates").selectpicker();
|
||||
$("#add_pathway_edge_products").selectpicker();
|
||||
|
||||
$("#add_pathway_edge_substrates").on('change', function (e) {
|
||||
reactionImage();
|
||||
})
|
||||
|
||||
$("#add_pathway_edge_products").on('change', function (e) {
|
||||
reactionImage();
|
||||
})
|
||||
|
||||
$(function () {
|
||||
$('#add_pathway_edge_modal_form_submit').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
$(this).prop("disabled", true);
|
||||
|
||||
|
||||
// submit form
|
||||
$('#add_pathway_edge_modal_form').submit();
|
||||
});
|
||||
});
|
||||
|
||||
function reactionImage() {
|
||||
var substrates = [];
|
||||
$("#add_pathway_edge_substrates option:selected").each(function () {
|
||||
var smiles = $(this).data("smiles"); // read data-smiles attribute
|
||||
substrates.push(smiles);
|
||||
});
|
||||
|
||||
var products = [];
|
||||
$("#add_pathway_edge_products option:selected").each(function () {
|
||||
var smiles = $(this).data("smiles"); // read data-smiles attribute
|
||||
products.push(smiles);
|
||||
});
|
||||
|
||||
if (substrates.length > 0 && products.length > 0) {
|
||||
reaction = substrates.join(".") + ">>" + products.join(".");
|
||||
$("#reaction_image").empty();
|
||||
$("#reaction_image").append(
|
||||
"<img width='100%' src='{% url 'depict' %}?smirks=" +
|
||||
encodeURIComponent(reaction) +
|
||||
"'>",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#add_pathway_edge_substrates").selectpicker();
|
||||
$("#add_pathway_edge_products").selectpicker();
|
||||
|
||||
$("#add_pathway_edge_substrates").on("change", function (e) {
|
||||
reactionImage();
|
||||
});
|
||||
|
||||
$("#add_pathway_edge_products").on("change", function (e) {
|
||||
reactionImage();
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$("#add_pathway_edge_modal_form_submit").on("click", function (e) {
|
||||
e.preventDefault();
|
||||
$(this).prop("disabled", true);
|
||||
|
||||
// submit form
|
||||
$("#add_pathway_edge_modal_form").submit();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,78 +1,119 @@
|
||||
{% load static %}
|
||||
<div class="modal fade bs-modal-lg" id="add_pathway_node_modal" tabindex="-1" aria-labelledby="add_pathway_node_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">Add a Node</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="add_pathway_node_modal_form" accept-charset="UTF-8" action="{% url 'package pathway node list' meta.current_package.uuid pathway.uuid %}" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<label for="node-name">Name</label>
|
||||
<input id="node-name" class="form-control" name="node-name" placeholder="Name"/>
|
||||
<label for="node-description">Description</label>
|
||||
<input id="node-description" class="form-control" name="node-description" placeholder="Description"/>
|
||||
<label for="node-smiles">SMILES</label>
|
||||
<input type="text" class="form-control" name="node-smiles" placeholder="SMILES" id="node-smiles">
|
||||
<p></p>
|
||||
<div>
|
||||
<iframe id="add_node_ketcher" src="{% static '/js/ketcher2/ketcher.html' %}" width="100%"
|
||||
height="510"></iframe>
|
||||
</div>
|
||||
<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="add_pathway_node_modal_form_submit">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="modal fade bs-modal-lg"
|
||||
id="add_pathway_node_modal"
|
||||
tabindex="-1"
|
||||
aria-labelledby="add_pathway_node_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">Add a Node</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form
|
||||
id="add_pathway_node_modal_form"
|
||||
accept-charset="UTF-8"
|
||||
action="{% url 'package pathway node list' meta.current_package.uuid pathway.uuid %}"
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<label for="node-name">Name</label>
|
||||
<input
|
||||
id="node-name"
|
||||
class="form-control"
|
||||
name="node-name"
|
||||
placeholder="Name"
|
||||
/>
|
||||
<label for="node-description">Description</label>
|
||||
<input
|
||||
id="node-description"
|
||||
class="form-control"
|
||||
name="node-description"
|
||||
placeholder="Description"
|
||||
/>
|
||||
<label for="node-smiles">SMILES</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="node-smiles"
|
||||
placeholder="SMILES"
|
||||
id="node-smiles"
|
||||
/>
|
||||
<p></p>
|
||||
<div>
|
||||
<iframe
|
||||
id="add_node_ketcher"
|
||||
src="{% static '/js/ketcher2/ketcher.html' %}"
|
||||
width="100%"
|
||||
height="510"
|
||||
></iframe>
|
||||
</div>
|
||||
<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="add_pathway_node_modal_form_submit"
|
||||
>
|
||||
Submit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function newStructureModalketcherToNewStructureModalTextInput() {
|
||||
$("#node-smiles").val(this.ketcher.getSmiles());
|
||||
}
|
||||
|
||||
function newStructureModalketcherToNewStructureModalTextInput() {
|
||||
$('#node-smiles').val(this.ketcher.getSmiles());
|
||||
}
|
||||
$(function () {
|
||||
$("#add_node_ketcher").on("load", function () {
|
||||
const checkKetcherReady = () => {
|
||||
win = this.contentWindow;
|
||||
if (win.ketcher && "editor" in win.ketcher) {
|
||||
win.ketcher.editor.event.change.handlers.push({
|
||||
once: false,
|
||||
priority: 0,
|
||||
f: newStructureModalketcherToNewStructureModalTextInput,
|
||||
ketcher: win.ketcher,
|
||||
});
|
||||
} else {
|
||||
setTimeout(checkKetcherReady, 100);
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
|
||||
$('#add_node_ketcher').on('load', function() {
|
||||
const checkKetcherReady = () => {
|
||||
win = this.contentWindow
|
||||
if (win.ketcher && 'editor' in win.ketcher) {
|
||||
win.ketcher.editor.event.change.handlers.push({
|
||||
once: false,
|
||||
priority: 0,
|
||||
f: newStructureModalketcherToNewStructureModalTextInput,
|
||||
ketcher: win.ketcher
|
||||
});
|
||||
} else {
|
||||
setTimeout(checkKetcherReady, 100);
|
||||
}
|
||||
};
|
||||
|
||||
checkKetcherReady();
|
||||
})
|
||||
|
||||
$(function() {
|
||||
$('#add_pathway_node_modal_form_submit').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$(this).prop("disabled",true);
|
||||
|
||||
|
||||
|
||||
// submit form
|
||||
$('#add_pathway_node_modal_form').submit();
|
||||
});
|
||||
checkKetcherReady();
|
||||
});
|
||||
|
||||
});
|
||||
$(function () {
|
||||
$("#add_pathway_node_modal_form_submit").on("click", function (e) {
|
||||
e.preventDefault();
|
||||
$(this).prop("disabled", true);
|
||||
|
||||
// submit form
|
||||
$("#add_pathway_node_modal_form").submit();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,78 +1,119 @@
|
||||
{% load static %}
|
||||
<div class="modal fade bs-modal-lg" id="add_structure_modal" tabindex="-1" aria-labelledby="add_structure_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 Structure</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="add_structure_modal_form" accept-charset="UTF-8" action="{% url 'package compound structure list' meta.current_package.uuid compound.uuid %}" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<label for="structure-name">Name</label>
|
||||
<input id="structure-name" class="form-control" name="structure-name" placeholder="Name"/>
|
||||
<label for="structure-description">Description</label>
|
||||
<input id="structure-description" class="form-control" name="structure-description" placeholder="Description"/>
|
||||
<label for="structure-smiles">SMILES</label>
|
||||
<input type="text" class="form-control" name="structure-smiles" placeholder="SMILES" id="structure-smiles">
|
||||
<p></p>
|
||||
<div>
|
||||
<iframe id="add_structure_ketcher" src="{% static '/js/ketcher2/ketcher.html' %}" width="100%"
|
||||
height="510"></iframe>
|
||||
</div>
|
||||
<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="add_structure_modal_form_submit">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="modal fade bs-modal-lg"
|
||||
id="add_structure_modal"
|
||||
tabindex="-1"
|
||||
aria-labelledby="add_structure_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 Structure</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form
|
||||
id="add_structure_modal_form"
|
||||
accept-charset="UTF-8"
|
||||
action="{% url 'package compound structure list' meta.current_package.uuid compound.uuid %}"
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<label for="structure-name">Name</label>
|
||||
<input
|
||||
id="structure-name"
|
||||
class="form-control"
|
||||
name="structure-name"
|
||||
placeholder="Name"
|
||||
/>
|
||||
<label for="structure-description">Description</label>
|
||||
<input
|
||||
id="structure-description"
|
||||
class="form-control"
|
||||
name="structure-description"
|
||||
placeholder="Description"
|
||||
/>
|
||||
<label for="structure-smiles">SMILES</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="structure-smiles"
|
||||
placeholder="SMILES"
|
||||
id="structure-smiles"
|
||||
/>
|
||||
<p></p>
|
||||
<div>
|
||||
<iframe
|
||||
id="add_structure_ketcher"
|
||||
src="{% static '/js/ketcher2/ketcher.html' %}"
|
||||
width="100%"
|
||||
height="510"
|
||||
></iframe>
|
||||
</div>
|
||||
<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="add_structure_modal_form_submit"
|
||||
>
|
||||
Submit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function newStructureModalketcherToNewStructureModalTextInput() {
|
||||
$("#structure-smiles").val(this.ketcher.getSmiles());
|
||||
}
|
||||
|
||||
function newStructureModalketcherToNewStructureModalTextInput() {
|
||||
$('#structure-smiles').val(this.ketcher.getSmiles());
|
||||
}
|
||||
$(function () {
|
||||
$("#add_structure_ketcher").on("load", function () {
|
||||
const checkKetcherReady = () => {
|
||||
win = this.contentWindow;
|
||||
if (win.ketcher && "editor" in win.ketcher) {
|
||||
win.ketcher.editor.event.change.handlers.push({
|
||||
once: false,
|
||||
priority: 0,
|
||||
f: newStructureModalketcherToNewStructureModalTextInput,
|
||||
ketcher: win.ketcher,
|
||||
});
|
||||
} else {
|
||||
setTimeout(checkKetcherReady, 100);
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
|
||||
$('#add_structure_ketcher').on('load', function() {
|
||||
const checkKetcherReady = () => {
|
||||
win = this.contentWindow
|
||||
if (win.ketcher && 'editor' in win.ketcher) {
|
||||
win.ketcher.editor.event.change.handlers.push({
|
||||
once: false,
|
||||
priority: 0,
|
||||
f: newStructureModalketcherToNewStructureModalTextInput,
|
||||
ketcher: win.ketcher
|
||||
});
|
||||
} else {
|
||||
setTimeout(checkKetcherReady, 100);
|
||||
}
|
||||
};
|
||||
|
||||
checkKetcherReady();
|
||||
})
|
||||
|
||||
$(function() {
|
||||
$('#add_structure_modal_form_submit').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$(this).prop("disabled",true);
|
||||
|
||||
|
||||
|
||||
// submit form
|
||||
$('#add_structure_modal_form').submit();
|
||||
});
|
||||
checkKetcherReady();
|
||||
});
|
||||
|
||||
});
|
||||
$(function () {
|
||||
$("#add_structure_modal_form_submit").on("click", function (e) {
|
||||
e.preventDefault();
|
||||
$(this).prop("disabled", true);
|
||||
|
||||
// submit form
|
||||
$("#add_structure_modal_form").submit();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,66 +1,89 @@
|
||||
|
||||
{% load static %}
|
||||
<!-- Delete Edge -->
|
||||
<div id="delete_pathway_edge_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Delete Edge</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Deletes the Edge. Nodes referenced by this edge will remain.
|
||||
<p></p>
|
||||
<form id="delete-pathway-edge-modal-form" accept-charset="UTF-8" action="" data-remote="true"
|
||||
method="post">
|
||||
{% csrf_token %}
|
||||
<select id="delete_pathway_edge_edges" name="edge-url"
|
||||
data-actions-box='true' class="form-control" data-width='100%'>
|
||||
<option value="" disabled selected>Select Reaction to delete</option>
|
||||
{% for e in pathway.edges %}
|
||||
<option value="{{ e.url }}">{{ e.edge_label.name|safe }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete"/>
|
||||
</form>
|
||||
<p></p>
|
||||
<div id="delete_pathway_edge_image"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="delete-pathway-edge-modal-submit">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Delete Edge</h3>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Deletes the Edge. Nodes referenced by this edge will remain.
|
||||
<p></p>
|
||||
<form
|
||||
id="delete-pathway-edge-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<select
|
||||
id="delete_pathway_edge_edges"
|
||||
name="edge-url"
|
||||
data-actions-box="true"
|
||||
class="form-control"
|
||||
data-width="100%"
|
||||
>
|
||||
<option value="" disabled selected>
|
||||
Select Reaction to delete
|
||||
</option>
|
||||
{% for e in pathway.edges %}
|
||||
<option value="{{ e.url }}">{{ e.edge_label.name|safe }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete" />
|
||||
</form>
|
||||
<p></p>
|
||||
<div id="delete_pathway_edge_image"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="delete-pathway-edge-modal-submit"
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$("#delete_pathway_edge_edges").selectpicker();
|
||||
$(function () {
|
||||
$("#delete_pathway_edge_edges").selectpicker();
|
||||
|
||||
$("#delete_pathway_edge_edges").on('change', function (e) {
|
||||
edge_url = $('#delete_pathway_edge_edges option:selected').val()
|
||||
$("#delete_pathway_edge_edges").on("change", function (e) {
|
||||
edge_url = $("#delete_pathway_edge_edges option:selected").val();
|
||||
|
||||
if (edge_url !== "") {
|
||||
$('#delete_pathway_edge_image').empty();
|
||||
$('#delete_pathway_edge_image').append(
|
||||
"<img width='100%' src='" + edge_url + "?image=svg'>"
|
||||
);
|
||||
}
|
||||
})
|
||||
if (edge_url !== "") {
|
||||
$("#delete_pathway_edge_image").empty();
|
||||
$("#delete_pathway_edge_image").append(
|
||||
"<img width='100%' src='" + edge_url + "?image=svg'>",
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
$('#delete-pathway-edge-modal-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
edge_url = $('#delete_pathway_edge_edges option:selected').val()
|
||||
$("#delete-pathway-edge-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
edge_url = $("#delete_pathway_edge_edges option:selected").val();
|
||||
|
||||
if (edge_url === "") {
|
||||
return;
|
||||
}
|
||||
if (edge_url === "") {
|
||||
return;
|
||||
}
|
||||
|
||||
$('#delete-pathway-edge-modal-form').attr('action', edge_url)
|
||||
$('#delete-pathway-edge-modal-form').submit();
|
||||
});
|
||||
|
||||
})
|
||||
$("#delete-pathway-edge-modal-form").attr("action", edge_url);
|
||||
$("#delete-pathway-edge-modal-form").submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -2,65 +2,92 @@
|
||||
|
||||
<!-- Delete Node -->
|
||||
<div id="delete_pathway_node_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Delete Node</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Deletes the Node. Edges having this Node as Substrate or Product will be removed as well.
|
||||
<p></p>
|
||||
<form id="delete-pathway-node-modal-form" accept-charset="UTF-8" action="" data-remote="true"
|
||||
method="post">
|
||||
{% csrf_token %}
|
||||
<select id="delete_pathway_node_nodes" name="node-url"
|
||||
data-actions-box='true' class="form-control" data-width='100%'>
|
||||
<option value="" disabled selected>Select Compound to delete</option>
|
||||
{% for n in pathway.nodes %}
|
||||
<option value="{{ n.url }}">{{ n.default_node_label.name|safe }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete"/>
|
||||
</form>
|
||||
<p></p>
|
||||
<div id="delete_pathway_node_image"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="delete-pathway-node-modal-submit">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Delete Node</h3>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Deletes the Node. Edges having this Node as Substrate or Product will be
|
||||
removed as well.
|
||||
<p></p>
|
||||
<form
|
||||
id="delete-pathway-node-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<select
|
||||
id="delete_pathway_node_nodes"
|
||||
name="node-url"
|
||||
data-actions-box="true"
|
||||
class="form-control"
|
||||
data-width="100%"
|
||||
>
|
||||
<option value="" disabled selected>
|
||||
Select Compound to delete
|
||||
</option>
|
||||
{% for n in pathway.nodes %}
|
||||
<option value="{{ n.url }}">
|
||||
{{ n.default_node_label.name|safe }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete" />
|
||||
</form>
|
||||
<p></p>
|
||||
<div id="delete_pathway_node_image"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="delete-pathway-node-modal-submit"
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$("#delete_pathway_node_nodes").selectpicker();
|
||||
$(function () {
|
||||
$("#delete_pathway_node_nodes").selectpicker();
|
||||
|
||||
$("#delete_pathway_node_nodes").on('change', function (e) {
|
||||
node_url = $('#delete_pathway_node_nodes option:selected').val()
|
||||
$("#delete_pathway_node_nodes").on("change", function (e) {
|
||||
node_url = $("#delete_pathway_node_nodes option:selected").val();
|
||||
|
||||
if (node_url !== "") {
|
||||
$('#delete_pathway_node_image').empty();
|
||||
$('#delete_pathway_node_image').append(
|
||||
"<img width='100%' src='" + node_url + "?image=svg'>"
|
||||
);
|
||||
}
|
||||
})
|
||||
if (node_url !== "") {
|
||||
$("#delete_pathway_node_image").empty();
|
||||
$("#delete_pathway_node_image").append(
|
||||
"<img width='100%' src='" + node_url + "?image=svg'>",
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
$('#delete-pathway-node-modal-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
node_url = $('#delete_pathway_node_nodes option:selected').val()
|
||||
$("#delete-pathway-node-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
node_url = $("#delete_pathway_node_nodes option:selected").val();
|
||||
|
||||
if (node_url === "") {
|
||||
return;
|
||||
}
|
||||
if (node_url === "") {
|
||||
return;
|
||||
}
|
||||
|
||||
$('#delete-pathway-node-modal-form').attr('action', node_url)
|
||||
$('#delete-pathway-node-modal-form').submit();
|
||||
});
|
||||
|
||||
})
|
||||
$("#delete-pathway-node-modal-form").attr("action", node_url);
|
||||
$("#delete-pathway-node-modal-form").submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,36 +1,53 @@
|
||||
{% load static %}
|
||||
<!-- Download Pathway -->
|
||||
<div id="download_pathway_csv_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Download Pathway as CSV</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
By clicking on Download the Pathway will be converted into a CSV and directly downloaded.
|
||||
<form id="download-pathway-csv-modal-form" accept-charset="UTF-8" action="{{ pathway.url }}"
|
||||
data-remote="true" method="GET">
|
||||
<input type="hidden" name="download" value="true"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="download-pathway-csv-modal-submit">Download</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Download Pathway as CSV</h3>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
By clicking on Download the Pathway will be converted into a CSV and
|
||||
directly downloaded.
|
||||
<form
|
||||
id="download-pathway-csv-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action="{{ pathway.url }}"
|
||||
data-remote="true"
|
||||
method="GET"
|
||||
>
|
||||
<input type="hidden" name="download" value="true" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="download-pathway-csv-modal-submit"
|
||||
>
|
||||
Download
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#download-pathway-csv-modal-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('#download-pathway-csv-modal-form').submit();
|
||||
$('#download_pathway_csv_modal').modal('hide');
|
||||
});
|
||||
|
||||
})
|
||||
$(function () {
|
||||
$("#download-pathway-csv-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#download-pathway-csv-modal-form").submit();
|
||||
$("#download_pathway_csv_modal").modal("hide");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,32 +1,43 @@
|
||||
{% load static %}
|
||||
<!-- Download Pathway -->
|
||||
<div id="download_pathway_image_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Download Pathway as Image</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
By clicking on Download the Pathway will be saved as SVG.
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="download-pathway-image-modal-submit">Download</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Download Pathway as Image</h3>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
By clicking on Download the Pathway will be saved as SVG.
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="download-pathway-image-modal-submit"
|
||||
>
|
||||
Download
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#download-pathway-image-modal-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
downloadSVG($('#pwsvg')[0], '{{ pathway.name.split|join:"_" }}.svg')
|
||||
$('#download_pathway_image_modal').modal('hide');
|
||||
});
|
||||
|
||||
})
|
||||
$(function () {
|
||||
$("#download-pathway-image-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
downloadSVG($("#pwsvg")[0], '{{ pathway.name.split|join:"_" }}.svg');
|
||||
$("#download_pathway_image_modal").modal("hide");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,47 +1,70 @@
|
||||
|
||||
{% load static %}
|
||||
<!-- Edit Compound -->
|
||||
<div id="edit_compound_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Edit Compound</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Edit Compound.</p>
|
||||
<form id="edit-compound-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="compound-name">Name</label>
|
||||
<input id="compound-name" class="form-control" name="compound-name" value="{{ compound.name|safe}}">
|
||||
</p>
|
||||
<p>
|
||||
<label for="compound-description">Description</label>
|
||||
<input id="compound-description" type="text" class="form-control"
|
||||
value="{{ compound.description|safe }}"
|
||||
name="compound-description">
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="edit-compound-modal-submit">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Edit Compound</h5>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Edit Compound.</p>
|
||||
<form
|
||||
id="edit-compound-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="compound-name">Name</label>
|
||||
<input
|
||||
id="compound-name"
|
||||
class="form-control"
|
||||
name="compound-name"
|
||||
value="{{ compound.name|safe }}"
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="compound-description">Description</label>
|
||||
<input
|
||||
id="compound-description"
|
||||
type="text"
|
||||
class="form-control"
|
||||
value="{{ compound.description|safe }}"
|
||||
name="compound-description"
|
||||
/>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="edit-compound-modal-submit"
|
||||
>
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#edit-compound-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#edit-compound-modal-form').submit();
|
||||
$(function () {
|
||||
$("#edit-compound-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#edit-compound-modal-form").submit();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,46 +1,70 @@
|
||||
|
||||
{% load static %}
|
||||
<!-- Edit Compound -->
|
||||
<div id="edit_compound_structure_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Create a Compound</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Edit a Compound Structure.</p>
|
||||
<form id="edit-compound-structure-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="compound-structure-name">Name</label>
|
||||
<input id="compound-structure-name" class="form-control" name="compound-structure-name" value="{{ compound_structure.name|safe }}">
|
||||
</p>
|
||||
<p>
|
||||
<label for="compound-structure-description">Description</label>
|
||||
<input id="compound-structure-description" type="text" class="form-control"
|
||||
value="{{ compound_structure.description|safe }}" name="compound-structure-description">
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="edit-compound-structure-modal-submit">Create</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Create a Compound</h5>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Edit a Compound Structure.</p>
|
||||
<form
|
||||
id="edit-compound-structure-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="compound-structure-name">Name</label>
|
||||
<input
|
||||
id="compound-structure-name"
|
||||
class="form-control"
|
||||
name="compound-structure-name"
|
||||
value="{{ compound_structure.name|safe }}"
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="compound-structure-description">Description</label>
|
||||
<input
|
||||
id="compound-structure-description"
|
||||
type="text"
|
||||
class="form-control"
|
||||
value="{{ compound_structure.description|safe }}"
|
||||
name="compound-structure-description"
|
||||
/>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="edit-compound-structure-modal-submit"
|
||||
>
|
||||
Create
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#edit-compound-structure-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#edit-compound-structure-modal-form').submit();
|
||||
$(function () {
|
||||
$("#edit-compound-structure-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#edit-compound-structure-modal-form").submit();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,121 +1,151 @@
|
||||
|
||||
{% load static %}
|
||||
<!-- Edit Package Permission -->
|
||||
<div id="edit_group_member_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Add or Remove Group Member</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
To add member (either User or entire Groups) to this group select the entity you want to add below
|
||||
and click the check mark.
|
||||
<br>
|
||||
To remove member simply click the <code>X</code> next to the member.
|
||||
</p>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Add or Remove Group Member</h5>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
To add member (either User or entire Groups) to this group select the
|
||||
entity you want to add below and click the check mark.
|
||||
<br />
|
||||
To remove member simply click the <code>X</code> next to the member.
|
||||
</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
<legend>User or Group</legend>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<legend>Add/Remove</legend>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<form id="modal-form-group-member" class="form-inline" role="form" accept-charset="UTF-8" action=""
|
||||
data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="col-xs-8">
|
||||
<select id="select_member" name="member" data-actions-box='true'
|
||||
class="selPackages" data-width='100%'>
|
||||
<option disabled selected>User</option>
|
||||
{% for u in users %}
|
||||
<option value="{{ u.url }}">{{ u.username }}</option>
|
||||
{% endfor %}
|
||||
<option disabled>Groups</option>
|
||||
{% for g in groups %}
|
||||
<option value="{{ g.url }}">{{ g.name|safe }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="hidden" name="action" value="add">
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<button type="submit" style="width:60%;" class="btn col-xs-2">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<p></p>
|
||||
{% for u in group.user_member.all %}
|
||||
<div class="row">
|
||||
<form id="modal-form-group-member_{{ u.uuid }}" class="form-inline" role="form"
|
||||
accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="col-xs-8">
|
||||
{{ u.username }}
|
||||
<input type="hidden" name="member" value="{{ u.url }}"/>
|
||||
<input type="hidden" name="action" value="remove">
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<button type="submit" style="width:60%;" class="btn col-xs-2">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<p></p>
|
||||
{% for g in group.group_member.all %}
|
||||
<div class="row">
|
||||
<form id="modal-form-group-member_{{ g.uuid }}" class="form-inline" role="form"
|
||||
accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="col-xs-8">
|
||||
{{ g.name|safe }}
|
||||
<input type="hidden" name="member" value="{{ g.url }}"/>
|
||||
<input type="hidden" name="action" value="remove">
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<button type="submit" style="width:60%;" class="btn col-xs-2">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="edit-package-modal-submit">Update</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
<legend>User or Group</legend>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<legend>Add/Remove</legend>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<form
|
||||
id="modal-form-group-member"
|
||||
class="form-inline"
|
||||
role="form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<div class="col-xs-8">
|
||||
<select
|
||||
id="select_member"
|
||||
name="member"
|
||||
data-actions-box="true"
|
||||
class="selPackages"
|
||||
data-width="100%"
|
||||
>
|
||||
<option disabled selected>User</option>
|
||||
{% for u in users %}
|
||||
<option value="{{ u.url }}">{{ u.username }}</option>
|
||||
{% endfor %}
|
||||
<option disabled>Groups</option>
|
||||
{% for g in groups %}
|
||||
<option value="{{ g.url }}">{{ g.name|safe }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="hidden" name="action" value="add" />
|
||||
</div>
|
||||
<div class="col-xs-2"></div>
|
||||
<div class="col-xs-2">
|
||||
<button type="submit" style="width:60%;" class="btn col-xs-2">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<p></p>
|
||||
{% for u in group.user_member.all %}
|
||||
<div class="row">
|
||||
<form
|
||||
id="modal-form-group-member_{{ u.uuid }}"
|
||||
class="form-inline"
|
||||
role="form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<div class="col-xs-8">
|
||||
{{ u.username }}
|
||||
<input type="hidden" name="member" value="{{ u.url }}" />
|
||||
<input type="hidden" name="action" value="remove" />
|
||||
</div>
|
||||
<div class="col-xs-2"></div>
|
||||
<div class="col-xs-2">
|
||||
<button type="submit" style="width:60%;" class="btn col-xs-2">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<p></p>
|
||||
{% for g in group.group_member.all %}
|
||||
<div class="row">
|
||||
<form
|
||||
id="modal-form-group-member_{{ g.uuid }}"
|
||||
class="form-inline"
|
||||
role="form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<div class="col-xs-8">
|
||||
{{ g.name|safe }}
|
||||
<input type="hidden" name="member" value="{{ g.url }}" />
|
||||
<input type="hidden" name="action" value="remove" />
|
||||
</div>
|
||||
<div class="col-xs-2"></div>
|
||||
<div class="col-xs-2">
|
||||
<button type="submit" style="width:60%;" class="btn col-xs-2">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="edit-package-modal-submit"
|
||||
>
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
|
||||
$(function() {
|
||||
|
||||
$('#edit-package-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#edit-package-modal-form').submit();
|
||||
$(function () {
|
||||
$("#edit-package-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#edit-package-modal-form").submit();
|
||||
});
|
||||
|
||||
$("#select_member").selectpicker();
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,45 +1,71 @@
|
||||
|
||||
{% load static %}
|
||||
<!-- Edit Model -->
|
||||
<div id="edit_model_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<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>
|
||||
<h3 class="modal-title">Update Model</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Alter Name and Description of the Model.</p>
|
||||
<form id="edit-model-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="model-name">Name</label>
|
||||
<input id="model-name" type="text" class="form-control" name="model-name"
|
||||
value="{{ model.name|safe }}">
|
||||
</p>
|
||||
<p>
|
||||
<label for="model-description">Description</label>
|
||||
<input id="model-description" type="text" class="form-control" name="model-description"
|
||||
value="{{ model.description|safe }}">
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="edit-model-modal-submit">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<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>
|
||||
<h3 class="modal-title">Update Model</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Alter Name and Description of the Model.</p>
|
||||
<form
|
||||
id="edit-model-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="model-name">Name</label>
|
||||
<input
|
||||
id="model-name"
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="model-name"
|
||||
value="{{ model.name|safe }}"
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="model-description">Description</label>
|
||||
<input
|
||||
id="model-description"
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="model-description"
|
||||
value="{{ model.description|safe }}"
|
||||
/>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="edit-model-modal-submit"
|
||||
>
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#edit-model-modal-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('#edit-model-modal-form').submit();
|
||||
});
|
||||
|
||||
})
|
||||
$(function () {
|
||||
$("#edit-model-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#edit-model-modal-form").submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,47 +1,70 @@
|
||||
|
||||
{% load static %}
|
||||
<!-- Edit Node -->
|
||||
<div id="edit_node_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Edit Node</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Edit Node.</p>
|
||||
<form id="edit-node-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="node-name">Name</label>
|
||||
<input id="node-name" class="form-control" name="node-name" value="{{ node.name|safe}}">
|
||||
</p>
|
||||
<p>
|
||||
<label for="node-description">Description</label>
|
||||
<input id="node-description" type="text" class="form-control"
|
||||
value="{{ node.description|safe }}"
|
||||
name="node-description">
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="edit-node-modal-submit">Create</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Edit Node</h5>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Edit Node.</p>
|
||||
<form
|
||||
id="edit-node-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="node-name">Name</label>
|
||||
<input
|
||||
id="node-name"
|
||||
class="form-control"
|
||||
name="node-name"
|
||||
value="{{ node.name|safe }}"
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="node-description">Description</label>
|
||||
<input
|
||||
id="node-description"
|
||||
type="text"
|
||||
class="form-control"
|
||||
value="{{ node.description|safe }}"
|
||||
name="node-description"
|
||||
/>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="edit-node-modal-submit"
|
||||
>
|
||||
Create
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#edit-node-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#edit-node-modal-form').submit();
|
||||
$(function () {
|
||||
$("#edit-node-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#edit-node-modal-form").submit();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,45 +1,70 @@
|
||||
|
||||
{% load static %}
|
||||
<!-- Edit Package -->
|
||||
<div id="edit_package_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Update Package</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Edit a Package.</p>
|
||||
<form id="edit-package-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="package-name">Name</label>
|
||||
<input id="package-name" class="form-control" name="package-name" value="{{ package.name|safe}}">
|
||||
</p>
|
||||
<p>
|
||||
<label for="package-description">Description</label>
|
||||
<input id="package-description" type="text" class="form-control"
|
||||
value="{{ package.description|safe }}"
|
||||
name="package-description">
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="edit-package-modal-submit">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Update Package</h5>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Edit a Package.</p>
|
||||
<form
|
||||
id="edit-package-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="package-name">Name</label>
|
||||
<input
|
||||
id="package-name"
|
||||
class="form-control"
|
||||
name="package-name"
|
||||
value="{{ package.name|safe }}"
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="package-description">Description</label>
|
||||
<input
|
||||
id="package-description"
|
||||
type="text"
|
||||
class="form-control"
|
||||
value="{{ package.description|safe }}"
|
||||
name="package-description"
|
||||
/>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="edit-package-modal-submit"
|
||||
>
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#edit-package-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#edit-package-modal-form').submit();
|
||||
$(function () {
|
||||
$("#edit-package-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#edit-package-modal-form").submit();
|
||||
});
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,183 +1,264 @@
|
||||
|
||||
{% load static %}
|
||||
<!-- Edit Package Permission -->
|
||||
<div id="edit_package_permissions_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Grant or Revoke Permissions</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
Modify permissions for this package. Note that if you give <code>write</code>
|
||||
permissions to a user or group, <code>read</code> permissions will be granted automatically.
|
||||
<br>
|
||||
To allow users to perform destructive actions, such as deleting the package, <code>owner</code>
|
||||
permissions must be granted.
|
||||
</p>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Grant or Revoke Permissions</h5>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
Modify permissions for this package. Note that if you give
|
||||
<code>write</code> permissions to a user or group,
|
||||
<code>read</code> permissions will be granted automatically.
|
||||
<br />
|
||||
To allow users to perform destructive actions, such as deleting the
|
||||
package, <code>owner</code>
|
||||
permissions must be granted.
|
||||
</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-4">
|
||||
<legend>User or Group</legend>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<legend>Read</legend>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<legend>Write</legend>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<legend>Owner</legend>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<form id="modal-form-permissions" class="form-inline" role="form" accept-charset="UTF-8" action=""
|
||||
data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="col-xs-4">
|
||||
<select id="select_grantee" name="grantee" data-actions-box='true'
|
||||
class="selPackages" data-width='100%'>
|
||||
<option disabled selected>User</option>
|
||||
{% for u in users %}
|
||||
<option value="{{ u.url }}">{{ u.username }}</option>
|
||||
{% endfor %}
|
||||
<option disabled>Groups</option>
|
||||
{% for g in groups %}
|
||||
<option value="{{ g.url }}">{{ g.name|safe }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input type="checkbox" name="read" id="read_new"/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input type="checkbox" name="write" id="write_new"/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input type="checkbox" name="owner" id="owner_new"/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<button type="submit" style="width:60%;" class="btn col-xs-2 modify-perm-button">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<p></p>
|
||||
{% for up in user_permissions %}
|
||||
<div class="row">
|
||||
<form id="modal-form-permissions_{{ up.user.uuid }}" class="form-inline" role="form"
|
||||
accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="col-xs-4">
|
||||
{{ up.user.username }}
|
||||
<input type="hidden" name="grantee" value="{{ up.user.url }}"/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input type="checkbox" name="read" id="read_{{ up.user.uuid }}" {% if up.has_read %} checked {% endif %}/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input type="checkbox" name="write" id="write_{{ up.user.uuid }}" {% if up.has_write %} checked {% endif %}/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input type="checkbox" name="owner" id="owner_{{ up.user.uuid }}" {% if up.has_all %} checked {% endif %}/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<button type="submit" style="width:60%;" class="btn col-xs-2 modify-perm-button">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<p></p>
|
||||
{% for gp in group_permissions %}
|
||||
<div class="row">
|
||||
<form id="modal-form-permissions_{{ gp.user.uuid }}" class="form-inline" role="form"
|
||||
accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="col-xs-4">
|
||||
{{ gp.group.name|safe }}
|
||||
<input type="hidden" name="grantee" value="{{ gp.group.url }}"/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input type="checkbox" name="read" id="read_{{ gp.group.uuid }}" {% if gp.has_read %} checked {% endif %}/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input type="checkbox" name="write" id="write_{{ gp.group.uuid }}" {% if gp.has_write %} checked {% endif %}/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input type="checkbox" name="owner" id="owner_{{ gp.group.uuid }}" {% if gp.has_all %} checked {% endif %}/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<button type="submit" style="width:60%;" class="btn col-xs-2 modify-perm-button">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="edit-package-modal-submit">Update</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-4">
|
||||
<legend>User or Group</legend>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<legend>Read</legend>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<legend>Write</legend>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<legend>Owner</legend>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<form
|
||||
id="modal-form-permissions"
|
||||
class="form-inline"
|
||||
role="form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<div class="col-xs-4">
|
||||
<select
|
||||
id="select_grantee"
|
||||
name="grantee"
|
||||
data-actions-box="true"
|
||||
class="selPackages"
|
||||
data-width="100%"
|
||||
>
|
||||
<option disabled selected>User</option>
|
||||
{% for u in users %}
|
||||
<option value="{{ u.url }}">{{ u.username }}</option>
|
||||
{% endfor %}
|
||||
<option disabled>Groups</option>
|
||||
{% for g in groups %}
|
||||
<option value="{{ g.url }}">{{ g.name|safe }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input type="checkbox" name="read" id="read_new" />
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input type="checkbox" name="write" id="write_new" />
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input type="checkbox" name="owner" id="owner_new" />
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<button
|
||||
type="submit"
|
||||
style="width:60%;"
|
||||
class="btn col-xs-2 modify-perm-button"
|
||||
>
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<p></p>
|
||||
{% for up in user_permissions %}
|
||||
<div class="row">
|
||||
<form
|
||||
id="modal-form-permissions_{{ up.user.uuid }}"
|
||||
class="form-inline"
|
||||
role="form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<div class="col-xs-4">
|
||||
{{ up.user.username }}
|
||||
<input type="hidden" name="grantee" value="{{ up.user.url }}" />
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="read"
|
||||
id="read_{{ up.user.uuid }}"
|
||||
{% if up.has_read %}checked{% endif %}
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="write"
|
||||
id="write_{{ up.user.uuid }}"
|
||||
{% if up.has_write %}checked{% endif %}
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="owner"
|
||||
id="owner_{{ up.user.uuid }}"
|
||||
{% if up.has_all %}checked{% endif %}
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<button
|
||||
type="submit"
|
||||
style="width:60%;"
|
||||
class="btn col-xs-2 modify-perm-button"
|
||||
>
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<p></p>
|
||||
{% for gp in group_permissions %}
|
||||
<div class="row">
|
||||
<form
|
||||
id="modal-form-permissions_{{ gp.user.uuid }}"
|
||||
class="form-inline"
|
||||
role="form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<div class="col-xs-4">
|
||||
{{ gp.group.name|safe }}
|
||||
<input
|
||||
type="hidden"
|
||||
name="grantee"
|
||||
value="{{ gp.group.url }}"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="read"
|
||||
id="read_{{ gp.group.uuid }}"
|
||||
{% if gp.has_read %}checked{% endif %}
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="write"
|
||||
id="write_{{ gp.group.uuid }}"
|
||||
{% if gp.has_write %}checked{% endif %}
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="owner"
|
||||
id="owner_{{ gp.group.uuid }}"
|
||||
{% if gp.has_all %}checked{% endif %}
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<button
|
||||
type="submit"
|
||||
style="width:60%;"
|
||||
class="btn col-xs-2 modify-perm-button"
|
||||
>
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="edit-package-modal-submit"
|
||||
>
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function checkboxClick() {
|
||||
function checkboxClick() {
|
||||
// id looks like read_3cadef24-220e-4587-9fa5-0e9a17aca2da
|
||||
parts = this.id.split('_');
|
||||
parts = this.id.split("_");
|
||||
perm = parts[0];
|
||||
id = parts[1];
|
||||
|
||||
readbox = '#read_' + id;
|
||||
writebox = '#write_' + id;
|
||||
ownerbox = '#owner_' + id;
|
||||
readbox = "#read_" + id;
|
||||
writebox = "#write_" + id;
|
||||
ownerbox = "#owner_" + id;
|
||||
|
||||
if (perm == "read" && !$(readbox).prop("checked")) {
|
||||
$(writebox).prop("checked", false);
|
||||
$(ownerbox).prop("checked", false);
|
||||
}
|
||||
|
||||
if (perm == 'read' && !$(readbox).prop("checked")) {
|
||||
$(writebox).prop("checked", false);
|
||||
if (perm == "write") {
|
||||
if ($(writebox).prop("checked")) {
|
||||
$(readbox).prop("checked", true);
|
||||
}
|
||||
if (!$(writebox).prop("checked")) {
|
||||
$(ownerbox).prop("checked", false);
|
||||
}
|
||||
}
|
||||
|
||||
if (perm == 'write') {
|
||||
if ($(writebox).prop("checked")) {
|
||||
$(readbox).prop("checked", true);
|
||||
}
|
||||
if (!$(writebox).prop("checked")) {
|
||||
$(ownerbox).prop("checked", false);
|
||||
}
|
||||
if (perm == "owner") {
|
||||
if ($(ownerbox).prop("checked")) {
|
||||
$(readbox).prop("checked", true);
|
||||
$(writebox).prop("checked", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (perm == 'owner') {
|
||||
if ($(ownerbox).prop("checked")) {
|
||||
$(readbox).prop("checked", true);
|
||||
$(writebox).prop("checked", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
|
||||
$('#edit-package-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#edit-package-modal-form').submit();
|
||||
$(function () {
|
||||
$("#edit-package-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#edit-package-modal-form").submit();
|
||||
});
|
||||
|
||||
$("#select_grantee").selectpicker();
|
||||
|
||||
// Add click functions to permission checkboxes
|
||||
$('[id^="read_"]').on('click', checkboxClick);
|
||||
$('[id^="write_"]').on('click', checkboxClick);
|
||||
$('[id^="owner_"]').on('click', checkboxClick);
|
||||
|
||||
})
|
||||
$('[id^="read_"]').on("click", checkboxClick);
|
||||
$('[id^="write_"]').on("click", checkboxClick);
|
||||
$('[id^="owner_"]').on("click", checkboxClick);
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,46 +1,82 @@
|
||||
{% load static %}
|
||||
<!-- Edit Package -->
|
||||
<div id="edit_password_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Update your Password</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>To change your password please fill out the following inputs</p>
|
||||
<form id="edit-password-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="old-password">Old Password</label>
|
||||
<input id="old-password" class="form-control" name="old-password" type="password" autocomplete="current-password">
|
||||
</p>
|
||||
<p>
|
||||
<label for="new-password">New Password</label>
|
||||
<input id="new-password" class="form-control" name="new-password" type="password", autocomplete="new-password">
|
||||
</p>
|
||||
<p>
|
||||
<label for="new-password-repeat">Repeat New Password</label>
|
||||
<input id="new-password-repeat" class="form-control" name="new-password-repeat" type="password" autocomplete="new-password">
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="edit-password-modal-submit">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Update your Password</h5>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>To change your password please fill out the following inputs</p>
|
||||
<form
|
||||
id="edit-password-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="old-password">Old Password</label>
|
||||
<input
|
||||
id="old-password"
|
||||
class="form-control"
|
||||
name="old-password"
|
||||
type="password"
|
||||
autocomplete="current-password"
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="new-password">New Password</label>
|
||||
<input
|
||||
id="new-password"
|
||||
class="form-control"
|
||||
name="new-password"
|
||||
type="password"
|
||||
,
|
||||
autocomplete="new-password"
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="new-password-repeat">Repeat New Password</label>
|
||||
<input
|
||||
id="new-password-repeat"
|
||||
class="form-control"
|
||||
name="new-password-repeat"
|
||||
type="password"
|
||||
autocomplete="new-password"
|
||||
/>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="edit-password-modal-submit"
|
||||
>
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#edit-password-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#edit-password-modal-form').submit();
|
||||
$(function () {
|
||||
$("#edit-password-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#edit-password-modal-form").submit();
|
||||
});
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,44 +1,72 @@
|
||||
|
||||
{% load static %}
|
||||
<!-- Edit Pathway -->
|
||||
<div id="edit_pathway_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Edit Pathway</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Edit Pathway.</p>
|
||||
<form id="edit-pathway-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="pathway-name">Name</label>
|
||||
<input id="pathway-name" class="form-control" name="pathway-name" value="{{ pathway.name|safe }}">
|
||||
</p>
|
||||
<p>
|
||||
<label for="pathway-description">Description</label>
|
||||
<textarea id="pathway-description" type="text" class="form-control" name="pathway-description"
|
||||
rows="10">{{ pathway.description|safe }}</textarea>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="edit-pathway-modal-submit">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Edit Pathway</h5>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Edit Pathway.</p>
|
||||
<form
|
||||
id="edit-pathway-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="pathway-name">Name</label>
|
||||
<input
|
||||
id="pathway-name"
|
||||
class="form-control"
|
||||
name="pathway-name"
|
||||
value="{{ pathway.name|safe }}"
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="pathway-description">Description</label>
|
||||
<textarea
|
||||
id="pathway-description"
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="pathway-description"
|
||||
rows="10"
|
||||
>
|
||||
{{ pathway.description|safe }}</textarea
|
||||
>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="edit-pathway-modal-submit"
|
||||
>
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#edit-pathway-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#edit-pathway-modal-form').submit();
|
||||
$(function () {
|
||||
$("#edit-pathway-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#edit-pathway-modal-form").submit();
|
||||
});
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,106 +1,163 @@
|
||||
{% load static %}
|
||||
<!-- Edit Package -->
|
||||
<div id="update_prediction_settings_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Update Prediction Setting</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Update Prediction Setting</h5>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
To update your prediction setting modify parameters in the form below
|
||||
und click "Update"
|
||||
</p>
|
||||
<form
|
||||
id="edit-prediction-setting-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<div id="prediction-setting" class="panel-collapse in collapse">
|
||||
<div class="panel-body list-group-item">
|
||||
<table class="table-bordered table-hover table">
|
||||
<tr style="background-color: rgba(0, 0, 0, 0.08);">
|
||||
<th scope="col" width="20%">Parameter</th>
|
||||
<th scope="col" width="80%">Value</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
{% if 'model' in user.prediction_settings %}
|
||||
<tr>
|
||||
<td width="20%">Model</td>
|
||||
<td width="80%">
|
||||
<table
|
||||
width="100%"
|
||||
class="table-bordered table-hover table"
|
||||
>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<select
|
||||
id="model"
|
||||
name="model"
|
||||
class="form-control"
|
||||
data-width="100%"
|
||||
>
|
||||
{% for m in models %}
|
||||
<option
|
||||
value="{{ m.id }}"
|
||||
{% if user.prediction_settings.model.url == m.url %}selected{% endif %}
|
||||
>
|
||||
{{ m.name|safe }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
{% for k, v in user.prediction_settings.model_parameters.items %}
|
||||
<tr>
|
||||
<th width="20%">Model Parameter</th>
|
||||
<th width="80%">Parameter Value</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%">
|
||||
{% if k == 'threshold' %}
|
||||
Threshold
|
||||
{% endif %}
|
||||
</td>
|
||||
<td width="80%">
|
||||
{% if k == 'threshold' %}
|
||||
<input
|
||||
type="number"
|
||||
class="form-control"
|
||||
name="{{ k }}"
|
||||
value="{{ v }}"
|
||||
min="0"
|
||||
max="1"
|
||||
step="0.05"
|
||||
/>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% for k, v in user.prediction_settings.truncator.items %}
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
{% if k == 'max_nodes' %}
|
||||
Max Nodes
|
||||
{% elif k == 'max_depth' %}
|
||||
Max Depth
|
||||
{% endif %}
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
{% if k == 'max_nodes' %}
|
||||
<input
|
||||
type="number"
|
||||
class="form-control"
|
||||
name="{{ k }}"
|
||||
value="{{ v }}"
|
||||
min="1"
|
||||
max="50"
|
||||
step="1"
|
||||
/>
|
||||
{% elif k == 'max_depth' %}
|
||||
<input
|
||||
type="number"
|
||||
class="form-control"
|
||||
name="{{ k }}"
|
||||
value="{{ v }}"
|
||||
min="1"
|
||||
max="8"
|
||||
step="1"
|
||||
/>
|
||||
{% endif %}
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>To update your prediction setting modify parameters in the form below und click "Update"</p>
|
||||
<form id="edit-prediction-setting-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<div id="prediction-setting" class="panel-collapse collapse in">
|
||||
<div class="panel-body list-group-item">
|
||||
|
||||
<table class="table table-bordered table-hover">
|
||||
<tr style="background-color: rgba(0, 0, 0, 0.08);">
|
||||
<th scope="col" width="20%">Parameter</th>
|
||||
<th scope="col" width="80%">Value</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
{% if 'model' in user.prediction_settings %}
|
||||
<tr>
|
||||
<td width="20%">Model</td>
|
||||
<td width="80%">
|
||||
<table width="100%" class="table table-bordered table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<select id="model" name="model" class="form-control" data-width='100%'>
|
||||
{% for m in models %}
|
||||
<option value="{{ m.id }}" {% if user.prediction_settings.model.url == m.url %}selected{% endif %}>{{ m.name|safe }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
{% for k, v in user.prediction_settings.model_parameters.items %}
|
||||
<tr>
|
||||
<th width="20%">Model Parameter</th>
|
||||
<th width="80%">Parameter Value</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%">
|
||||
{% if k == 'threshold' %}
|
||||
Threshold
|
||||
{% endif %}
|
||||
</td>
|
||||
<td width="80%">
|
||||
{% if k == 'threshold' %}
|
||||
<input type="number" class="form-control" name="{{k}}" value="{{v}}"
|
||||
min="0" max="1" step="0.05">
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% for k, v in user.prediction_settings.truncator.items %}
|
||||
<tr>
|
||||
<td><p>
|
||||
{% if k == 'max_nodes' %}
|
||||
Max Nodes
|
||||
{% elif k == 'max_depth' %}
|
||||
Max Depth
|
||||
{% endif %}
|
||||
</p></td>
|
||||
<td><p>
|
||||
{% if k == 'max_nodes' %}
|
||||
<input type="number" class="form-control" name="{{k}}" value="{{v}}" min="1"
|
||||
max="50" step="1">
|
||||
{% elif k == 'max_depth' %}
|
||||
<input type="number" class="form-control" name="{{k}}" value="{{v}}" min="1"
|
||||
max="8" step="1">
|
||||
{% endif %}
|
||||
</p></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="edit-prediction-setting-modal-submit">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="edit-prediction-setting-modal-submit"
|
||||
>
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#edit-prediction-setting-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#edit-prediction-setting-modal-form').submit();
|
||||
});
|
||||
|
||||
})
|
||||
$(function () {
|
||||
$("#edit-prediction-setting-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#edit-prediction-setting-modal-form").submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,45 +1,69 @@
|
||||
|
||||
{% load static %}
|
||||
<!-- Edit Reaction -->
|
||||
<div id="edit_reaction_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<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>
|
||||
<h3 class="modal-title">Update Reaction</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="edit-reaction-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="reaction-name">Name</label>
|
||||
<input id="reaction-name" class="form-control" name="reaction-name" value="{{ reaction.name|safe }}">
|
||||
</p>
|
||||
<p>
|
||||
<label for="reaction-description">Description</label>
|
||||
<input id="reaction-description" type="text" class="form-control"
|
||||
value="{{ reaction.description|safe }}" name="reaction-description">
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="edit-reaction-modal-submit">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<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>
|
||||
<h3 class="modal-title">Update Reaction</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form
|
||||
id="edit-reaction-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="reaction-name">Name</label>
|
||||
<input
|
||||
id="reaction-name"
|
||||
class="form-control"
|
||||
name="reaction-name"
|
||||
value="{{ reaction.name|safe }}"
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="reaction-description">Description</label>
|
||||
<input
|
||||
id="reaction-description"
|
||||
type="text"
|
||||
class="form-control"
|
||||
value="{{ reaction.description|safe }}"
|
||||
name="reaction-description"
|
||||
/>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="edit-reaction-modal-submit"
|
||||
>
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#edit-reaction-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#edit-reaction-modal-form').submit();
|
||||
$(function () {
|
||||
$("#edit-reaction-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#edit-reaction-modal-form").submit();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,45 +1,69 @@
|
||||
|
||||
{% load static %}
|
||||
<!-- Edit Rule -->
|
||||
<div id="edit_rule_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<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>
|
||||
<h3 class="modal-title">Update Rule</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="edit-rule-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="rule-name">Name</label>
|
||||
<input id="rule-name" class="form-control" name="rule-name" value="{{ rule.name|safe }}">
|
||||
</p>
|
||||
<p>
|
||||
<label for="rule-description">Description</label>
|
||||
<input id="rule-description" type="text" class="form-control"
|
||||
value="{{ rule.description|safe }}" name="rule-description">
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="edit-rule-modal-submit">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<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>
|
||||
<h3 class="modal-title">Update Rule</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form
|
||||
id="edit-rule-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="rule-name">Name</label>
|
||||
<input
|
||||
id="rule-name"
|
||||
class="form-control"
|
||||
name="rule-name"
|
||||
value="{{ rule.name|safe }}"
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="rule-description">Description</label>
|
||||
<input
|
||||
id="rule-description"
|
||||
type="text"
|
||||
class="form-control"
|
||||
value="{{ rule.description|safe }}"
|
||||
name="rule-description"
|
||||
/>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="edit-rule-modal-submit"
|
||||
>
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#edit-rule-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#edit-rule-modal-form').submit();
|
||||
$(function () {
|
||||
$("#edit-rule-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#edit-rule-modal-form").submit();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,62 +1,110 @@
|
||||
|
||||
{% load static %}
|
||||
<!-- Edit User -->
|
||||
<div id="edit_user_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Update User Defaults</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Edit User Defaults.</p>
|
||||
<form id="edit-user-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="default-package">Default Package</label>
|
||||
<select id="default-package" name="default-package" class="form-control" data-width='100%'>
|
||||
<option disabled>Select a Package</option>
|
||||
{% for p in meta.writeable_packages %}
|
||||
<option value="{{ p.url }}" {% if p.id == meta.user.default_package.id %}selected{% endif %}>{{ p.name|safe }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<label for="default-group">Default Group</label>
|
||||
<select id="default-group" name="default-group" class="form-control" data-width='100%'>
|
||||
<option disabled>Select a Group</option>
|
||||
{% for g in meta.available_groups %}
|
||||
<option value="{{ g.url }}" {% if g.id == meta.user.default_group.id %}selected{% endif %}>{{ g.name|safe }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<label for="default-prediction-setting">Default Prediction Setting</label>
|
||||
<select id="default-prediction-setting" name="default-prediction-setting" class="form-control" data-width='100%'>
|
||||
<option disabled>Select a Setting</option>
|
||||
{% for s in meta.available_settings %}
|
||||
<option value="{{ s.url }}" {% if s.id == meta.user.default_setting.id %}selected{% endif %}>{{ s.name|safe }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="edit-user-modal-submit">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Update User Defaults</h5>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Edit User Defaults.</p>
|
||||
<form
|
||||
id="edit-user-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="default-package">Default Package</label>
|
||||
<select
|
||||
id="default-package"
|
||||
name="default-package"
|
||||
class="form-control"
|
||||
data-width="100%"
|
||||
>
|
||||
<option disabled>Select a Package</option>
|
||||
{% for p in meta.writeable_packages %}
|
||||
<option
|
||||
value="{{ p.url }}"
|
||||
{% if p.id == meta.user.default_package.id %}selected{% endif %}
|
||||
>
|
||||
{{ p.name|safe }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<label for="default-group">Default Group</label>
|
||||
<select
|
||||
id="default-group"
|
||||
name="default-group"
|
||||
class="form-control"
|
||||
data-width="100%"
|
||||
>
|
||||
<option disabled>Select a Group</option>
|
||||
{% for g in meta.available_groups %}
|
||||
<option
|
||||
value="{{ g.url }}"
|
||||
{% if g.id == meta.user.default_group.id %}selected{% endif %}
|
||||
>
|
||||
{{ g.name|safe }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<label for="default-prediction-setting"
|
||||
>Default Prediction Setting</label
|
||||
>
|
||||
<select
|
||||
id="default-prediction-setting"
|
||||
name="default-prediction-setting"
|
||||
class="form-control"
|
||||
data-width="100%"
|
||||
>
|
||||
<option disabled>Select a Setting</option>
|
||||
{% for s in meta.available_settings %}
|
||||
<option
|
||||
value="{{ s.url }}"
|
||||
{% if s.id == meta.user.default_setting.id %}selected{% endif %}
|
||||
>
|
||||
{{ s.name|safe }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="edit-user-modal-submit"
|
||||
>
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#edit-user-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#edit-user-modal-form').submit();
|
||||
$(function () {
|
||||
$("#edit-user-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#edit-user-modal-form").submit();
|
||||
});
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,73 +1,93 @@
|
||||
<div
|
||||
class="modal fade"
|
||||
tabindex="-1"
|
||||
id="evaluate_model_modal"
|
||||
role="dialog"
|
||||
aria-labelledby="evaluate_model_modal"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
<h4 class="modal-title">Evaluate Model</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form
|
||||
id="evaluate_model_form"
|
||||
accept-charset="UTF-8"
|
||||
action="{{ current_object.url }}"
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<div class="jumbotron">
|
||||
For evaluation, you need to select the packages you want to use.
|
||||
While the model is evaluating, you can use the model for
|
||||
predictions.
|
||||
</div>
|
||||
<!-- Evaluation Packages -->
|
||||
<label for="model-evaluation-packages">Evaluation Packages</label>
|
||||
<select
|
||||
id="model-evaluation-packages"
|
||||
name="model-evaluation-packages"
|
||||
data-actions-box="true"
|
||||
class="form-control"
|
||||
multiple
|
||||
data-width="100%"
|
||||
>
|
||||
<option disabled>Reviewed Packages</option>
|
||||
{% for obj in meta.readable_packages %}
|
||||
{% if obj.reviewed %}
|
||||
<option value="{{ obj.url }}">{{ obj.name|safe }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="modal fade" tabindex="-1" id="evaluate_model_modal" role="dialog" aria-labelledby="evaluate_model_modal"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
<h4 class="modal-title">Evaluate Model</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="evaluate_model_form" accept-charset="UTF-8" action="{{ current_object.url }}"
|
||||
data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="jumbotron">
|
||||
For evaluation, you need to select the packages you want to use.
|
||||
While the model is evaluating, you can use the model for predictions.
|
||||
</div>
|
||||
<!-- Evaluation Packages -->
|
||||
<label for="model-evaluation-packages">Evaluation Packages</label>
|
||||
<select id="model-evaluation-packages" name="model-evaluation-packages" data-actions-box='true'
|
||||
class="form-control" multiple data-width='100%'>
|
||||
<option disabled>Reviewed Packages</option>
|
||||
{% for obj in meta.readable_packages %}
|
||||
{% if obj.reviewed %}
|
||||
<option value="{{ obj.url }}">{{ obj.name|safe }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<option disabled>Unreviewed Packages</option>
|
||||
{% for obj in meta.readable_packages %}
|
||||
{% if not obj.reviewed %}
|
||||
<option value="{{ obj.url }}">{{ obj.name|safe }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<option disabled>Unreviewed Packages</option>
|
||||
{% for obj in meta.readable_packages %}
|
||||
{% if not obj.reviewed %}
|
||||
<option value="{{ obj.url }}">{{ obj.name|safe }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
<!-- Eval Type -->
|
||||
<label for="model-evaluation-type">Evaluation Type</label>
|
||||
<select
|
||||
id="model-evaluation-type"
|
||||
name="model-evaluation-type"
|
||||
class="form-control"
|
||||
>
|
||||
<option disabled selected>Select evaluation type</option>
|
||||
<option value="sg">Single Generation</option>
|
||||
<option value="mg">Multiple Generations</option>
|
||||
</select>
|
||||
|
||||
<!-- Eval Type -->
|
||||
<label for="model-evaluation-type">Evaluation Type</label>
|
||||
<select id="model-evaluation-type" name="model-evaluation-type" class="form-control">
|
||||
<option disabled selected>Select evaluation type</option>
|
||||
<option value="sg">Single Generation</option>
|
||||
<option value="mg">Multiple Generations</option>
|
||||
</select>
|
||||
|
||||
<input type="hidden" name="hidden" value="evaluate">
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a id="evaluate_model_form_submit" class="btn btn-primary" href="#">Evaluate</a>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="hidden" value="evaluate" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a id="evaluate_model_form_submit" class="btn btn-primary" href="#"
|
||||
>Evaluate</a
|
||||
>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$("#model-evaluation-packages").selectpicker();
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#model-evaluation-packages").selectpicker();
|
||||
|
||||
$('#evaluate_model_form_submit').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
$('#evaluate_model_form').submit();
|
||||
});
|
||||
|
||||
$("#evaluate_model_form_submit").on("click", function (e) {
|
||||
e.preventDefault();
|
||||
$("#evaluate_model_form").submit();
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,36 +1,53 @@
|
||||
{% load static %}
|
||||
<!-- Export Package -->
|
||||
<div id="export_package_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Export Package as JSON</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
By clicking on Export the Package will be serialized into a JSON and directly downloaded.
|
||||
<form id="export-package-modal-form" accept-charset="UTF-8" action="{{ package.url }}"
|
||||
data-remote="true" method="GET">
|
||||
<input type="hidden" name="export" value="true"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="export-package-modal-form-submit">Export</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Export Package as JSON</h3>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
By clicking on Export the Package will be serialized into a JSON and
|
||||
directly downloaded.
|
||||
<form
|
||||
id="export-package-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action="{{ package.url }}"
|
||||
data-remote="true"
|
||||
method="GET"
|
||||
>
|
||||
<input type="hidden" name="export" value="true" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="export-package-modal-form-submit"
|
||||
>
|
||||
Export
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#export-package-modal-form-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('#export-package-modal-form').submit();
|
||||
$('#export_package_modal').modal('hide');
|
||||
});
|
||||
|
||||
})
|
||||
$(function () {
|
||||
$("#export-package-modal-form-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#export-package-modal-form").submit();
|
||||
$("#export_package_modal").modal("hide");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,75 +1,109 @@
|
||||
|
||||
{% load static %}
|
||||
<!-- Copy Object -->
|
||||
<div id="generic_copy_object_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Copy {{ object_type|capfirst }}</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="generic-copy-object-modal-form" accept-charset="UTF-8" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<label for="target-package">Select the Target Package you want to copy this {{ object_type }}
|
||||
into</label>
|
||||
<select id="target-package" name="target-package" data-actions-box='true' class="form-control"
|
||||
data-width='100%'>
|
||||
<option disabled selected>Select Target Package</option>
|
||||
{% for p in meta.writeable_packages %}
|
||||
<option value="{{ p.url }}">{{ p.name|safe }}</option>`
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="hidden" name="hidden" value="copy">
|
||||
</form>
|
||||
<div id="copy-object-error-message" class="alert alert-danger" role="alert" style="display: none">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="generic-copy-object-modal-form-submit">
|
||||
Copy
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Copy {{ object_type|capfirst }}</h3>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form
|
||||
id="generic-copy-object-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<label for="target-package"
|
||||
>Select the Target Package you want to copy this {{ object_type }}
|
||||
into</label
|
||||
>
|
||||
<select
|
||||
id="target-package"
|
||||
name="target-package"
|
||||
data-actions-box="true"
|
||||
class="form-control"
|
||||
data-width="100%"
|
||||
>
|
||||
<option disabled selected>Select Target Package</option>
|
||||
{% for p in meta.writeable_packages %}
|
||||
<option value="{{ p.url }}">{{ p.name|safe }}</option>
|
||||
`
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="hidden" name="hidden" value="copy" />
|
||||
</form>
|
||||
<div
|
||||
id="copy-object-error-message"
|
||||
class="alert alert-danger"
|
||||
role="alert"
|
||||
style="display: none"
|
||||
></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="generic-copy-object-modal-form-submit"
|
||||
>
|
||||
Copy
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$(function () {
|
||||
$("#generic-copy-object-modal-form-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#copy-object-error-message").hide();
|
||||
|
||||
$('#generic-copy-object-modal-form-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('#copy-object-error-message').hide()
|
||||
const packageUrl = $("#target-package").find(":selected").val();
|
||||
|
||||
const packageUrl = $('#target-package').find(":selected").val();
|
||||
if (
|
||||
packageUrl === "Select Target Package" ||
|
||||
packageUrl === "" ||
|
||||
packageUrl === null ||
|
||||
packageUrl === undefined
|
||||
) {
|
||||
return;
|
||||
}
|
||||
const formData = {
|
||||
hidden: "copy",
|
||||
object_to_copy: "{{ current_object.url }}",
|
||||
};
|
||||
|
||||
if (packageUrl === 'Select Target Package' || packageUrl === '' || packageUrl === null || packageUrl === undefined) {
|
||||
return;
|
||||
}
|
||||
const formData = {
|
||||
hidden: 'copy',
|
||||
object_to_copy: '{{ current_object.url }}',
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
data: formData,
|
||||
url: packageUrl,
|
||||
success: function (data, textStatus) {
|
||||
window.location.href = data.success;
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
if (jqXHR.responseJSON.error.indexOf('to the same package') > -1) {
|
||||
$('#copy-object-error-message').append('<p>The target Package is the same as the source Package. Please select another target!</p>');
|
||||
} else {
|
||||
$('#copy-object-error-message').append('<p>' + jqXHR.responseJSON.error + '</p>');
|
||||
}
|
||||
$('#copy-object-error-message').show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
})
|
||||
$.ajax({
|
||||
type: "post",
|
||||
data: formData,
|
||||
url: packageUrl,
|
||||
success: function (data, textStatus) {
|
||||
window.location.href = data.success;
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
if (jqXHR.responseJSON.error.indexOf("to the same package") > -1) {
|
||||
$("#copy-object-error-message").append(
|
||||
"<p>The target Package is the same as the source Package. Please select another target!</p>",
|
||||
);
|
||||
} else {
|
||||
$("#copy-object-error-message").append(
|
||||
"<p>" + jqXHR.responseJSON.error + "</p>",
|
||||
);
|
||||
}
|
||||
$("#copy-object-error-message").show();
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,42 +1,58 @@
|
||||
{% load static %}
|
||||
<!-- Delete Object -->
|
||||
<div id="generic_delete_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Delete {{ object_type|capfirst }}</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{% if object_type == 'user' %}
|
||||
Clicking "Delete" will <strong>permanently</strong> delete the User and associated data.
|
||||
This action can't be undone!
|
||||
{% else %}
|
||||
Deletes the {{ object_type|capfirst }}. Related objects that depend on this {{ object_type|capfirst }}
|
||||
will be deleted as well.
|
||||
{% endif %}
|
||||
<form id="generic-delete-modal-form" accept-charset="UTF-8" action="{{ current_object.url }}"
|
||||
data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="generic-delete-modal-form-submit">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Delete {{ object_type|capfirst }}</h3>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{% if object_type == 'user' %}
|
||||
Clicking "Delete" will <strong>permanently</strong> delete the User
|
||||
and associated data. This action can't be undone!
|
||||
{% else %}
|
||||
Deletes the {{ object_type|capfirst }}. Related objects that depend on
|
||||
this {{ object_type|capfirst }} will be deleted as well.
|
||||
{% endif %}
|
||||
<form
|
||||
id="generic-delete-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action="{{ current_object.url }}"
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<input type="hidden" id="hidden" name="hidden" value="delete" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="generic-delete-modal-form-submit"
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#generic-delete-modal-form-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('#generic-delete-modal-form').submit();
|
||||
});
|
||||
|
||||
})
|
||||
$(function () {
|
||||
$("#generic-delete-modal-form-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#generic-delete-modal-form").submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,170 +1,213 @@
|
||||
|
||||
{% load static %}
|
||||
|
||||
<style>
|
||||
.alias-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
padding: 4px 6px;
|
||||
cursor: text;
|
||||
min-height: 38px;
|
||||
background-color: #fff;
|
||||
}
|
||||
.alias-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
padding: 4px 6px;
|
||||
cursor: text;
|
||||
min-height: 38px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.alias {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
background-color: #5bc0de;
|
||||
color: white;
|
||||
padding: 4px 8px;
|
||||
margin: 3px 3px;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.alias {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
background-color: #5bc0de;
|
||||
color: white;
|
||||
padding: 4px 8px;
|
||||
margin: 3px 3px;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.alias .remove {
|
||||
margin-left: 6px;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
}
|
||||
.alias .remove {
|
||||
margin-left: 6px;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.alias-input {
|
||||
flex: 1;
|
||||
min-width: 120px;
|
||||
border: none;
|
||||
outline: none;
|
||||
margin: 3px 3px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.alias-input {
|
||||
flex: 1;
|
||||
min-width: 120px;
|
||||
border: none;
|
||||
outline: none;
|
||||
margin: 3px 3px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.form-control.alias-container {
|
||||
height: auto;
|
||||
box-shadow: none;
|
||||
}
|
||||
.form-control.alias-container {
|
||||
height: auto;
|
||||
box-shadow: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="modal fade bs-modal-lg" id="set_aliases_modal" tabindex="-1" aria-labelledby="set_aliases_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">Set Aliases for {{ current_object.name|safe }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="set_aliases_modal_form" accept-charset="UTF-8" action="{{ current_object.url }}"
|
||||
data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<label for="alias-input">Aliases:</label>
|
||||
<div class="form-control alias-container" id="alias-box">
|
||||
{% for alias in current_object.aliases %}
|
||||
<span class="alias">{{ alias|escape }}<span class="remove">×</span></span>
|
||||
{% endfor %}
|
||||
<input type="text" id="alias-input" class="alias-input" placeholder="Add Alias...">
|
||||
</div>
|
||||
</form>
|
||||
<div id="add-alias-error-message" class="alert alert-danger" role="alert" style="display: none">
|
||||
</div>
|
||||
</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="set_aliases_modal_form_submit">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="modal fade bs-modal-lg"
|
||||
id="set_aliases_modal"
|
||||
tabindex="-1"
|
||||
aria-labelledby="set_aliases_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">
|
||||
Set Aliases for {{ current_object.name|safe }}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form
|
||||
id="set_aliases_modal_form"
|
||||
accept-charset="UTF-8"
|
||||
action="{{ current_object.url }}"
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<label for="alias-input">Aliases:</label>
|
||||
<div class="form-control alias-container" id="alias-box">
|
||||
{% for alias in current_object.aliases %}
|
||||
<span class="alias"
|
||||
>{{ alias|escape }}<span class="remove">×</span></span
|
||||
>
|
||||
{% endfor %}
|
||||
<input
|
||||
type="text"
|
||||
id="alias-input"
|
||||
class="alias-input"
|
||||
placeholder="Add Alias..."
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
<div
|
||||
id="add-alias-error-message"
|
||||
class="alert alert-danger"
|
||||
role="alert"
|
||||
style="display: none"
|
||||
></div>
|
||||
</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="set_aliases_modal_form_submit"
|
||||
>
|
||||
Submit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$(function () {
|
||||
function addAlias(aliasText) {
|
||||
aliasText = aliasText.trim();
|
||||
if (aliasText === "") return;
|
||||
|
||||
function addAlias(aliasText) {
|
||||
aliasText = aliasText.trim();
|
||||
if (aliasText === '') return;
|
||||
|
||||
// Avoid duplicate aliass
|
||||
var exists = false;
|
||||
$('#alias-box .alias').each(function () {
|
||||
if ($(this).text().replace('×', '').trim().toLowerCase() === aliasText.toLowerCase()) {
|
||||
exists = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if (!exists) {
|
||||
var aliasHtml = '<span class="alias">' + $('<div>').text(aliasText).html() +
|
||||
'<span class="remove">×</span></span>';
|
||||
$(aliasHtml).insertBefore('#alias-input');
|
||||
}
|
||||
|
||||
$('#alias-input').val('');
|
||||
// Avoid duplicate aliass
|
||||
var exists = false;
|
||||
$("#alias-box .alias").each(function () {
|
||||
if (
|
||||
$(this).text().replace("×", "").trim().toLowerCase() ===
|
||||
aliasText.toLowerCase()
|
||||
) {
|
||||
exists = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// Add alias when Enter is pressed
|
||||
$('#alias-input').on('keypress', function (e) {
|
||||
if (e.which === 13) {
|
||||
e.preventDefault();
|
||||
addAlias($(this).val());
|
||||
}
|
||||
});
|
||||
if (!exists) {
|
||||
var aliasHtml =
|
||||
'<span class="alias">' +
|
||||
$("<div>").text(aliasText).html() +
|
||||
'<span class="remove">×</span></span>';
|
||||
$(aliasHtml).insertBefore("#alias-input");
|
||||
}
|
||||
|
||||
// Add alias when input loses focus
|
||||
$('#alias-input').on('blur', function () {
|
||||
var val = $(this).val();
|
||||
if (val.trim() !== '') {
|
||||
addAlias(val);
|
||||
}
|
||||
});
|
||||
|
||||
// Remove alias when clicking ×
|
||||
$('#alias-box').on('click', '.remove', function () {
|
||||
$(this).closest('.alias').remove();
|
||||
});
|
||||
|
||||
// Focus input when clicking the container
|
||||
$('#alias-box').on('click', function () {
|
||||
$('#alias-input').focus();
|
||||
});
|
||||
|
||||
|
||||
$('#set_aliases_modal_form_submit').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
let aliases = [];
|
||||
$('#alias-box .alias').each(function () {
|
||||
aliases.push($(this).text().replace('×', '').trim())
|
||||
});
|
||||
|
||||
if (aliases.length === 0) {
|
||||
// Set empty string for deletion of all aliases
|
||||
// If empty list is sent, its gets removed entirely from post data
|
||||
aliases = ['']
|
||||
}
|
||||
|
||||
formData = {
|
||||
'aliases': aliases
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
data: formData,
|
||||
url: '{{ current_object.url }}',
|
||||
traditional: true,
|
||||
success: function (data, textStatus) {
|
||||
window.location.href = data.success;
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
$('#add-alias-error-message').append('<p>Setting aliases failed!</p>');
|
||||
$('#add-alias-error-message').show(); }
|
||||
});
|
||||
|
||||
});
|
||||
$("#alias-input").val("");
|
||||
}
|
||||
|
||||
// Add alias when Enter is pressed
|
||||
$("#alias-input").on("keypress", function (e) {
|
||||
if (e.which === 13) {
|
||||
e.preventDefault();
|
||||
addAlias($(this).val());
|
||||
}
|
||||
});
|
||||
|
||||
// Add alias when input loses focus
|
||||
$("#alias-input").on("blur", function () {
|
||||
var val = $(this).val();
|
||||
if (val.trim() !== "") {
|
||||
addAlias(val);
|
||||
}
|
||||
});
|
||||
|
||||
// Remove alias when clicking ×
|
||||
$("#alias-box").on("click", ".remove", function () {
|
||||
$(this).closest(".alias").remove();
|
||||
});
|
||||
|
||||
// Focus input when clicking the container
|
||||
$("#alias-box").on("click", function () {
|
||||
$("#alias-input").focus();
|
||||
});
|
||||
|
||||
$("#set_aliases_modal_form_submit").on("click", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
let aliases = [];
|
||||
$("#alias-box .alias").each(function () {
|
||||
aliases.push($(this).text().replace("×", "").trim());
|
||||
});
|
||||
|
||||
if (aliases.length === 0) {
|
||||
// Set empty string for deletion of all aliases
|
||||
// If empty list is sent, its gets removed entirely from post data
|
||||
aliases = [""];
|
||||
}
|
||||
|
||||
formData = {
|
||||
aliases: aliases,
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
type: "post",
|
||||
data: formData,
|
||||
url: "{{ current_object.url }}",
|
||||
traditional: true,
|
||||
success: function (data, textStatus) {
|
||||
window.location.href = data.success;
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
$("#add-alias-error-message").append(
|
||||
"<p>Setting aliases failed!</p>",
|
||||
);
|
||||
$("#add-alias-error-message").show();
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,61 +1,97 @@
|
||||
|
||||
{% load static %}
|
||||
<!-- Delete Object -->
|
||||
<div id="generic_set_external_reference_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Add External References</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="generic-set-external-reference-modal-form" accept-charset="UTF-8"
|
||||
action="{{ current_object.url }}"
|
||||
data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<label for="database-select">Select the Database you want to attach an External Reference
|
||||
for</label>
|
||||
<select id="database-select" name="selected-database" data-actions-box='true' class="form-control"
|
||||
data-width='100%'>
|
||||
<option disabled selected>Select Database</option>
|
||||
{% for entity, databases in meta.external_databases.items %}
|
||||
{% if entity == object_type %}
|
||||
{% for db in databases %}
|
||||
<option id="db-select-{{ db.database.pk }}" data-input-placeholder="{{ db.placeholder }}"
|
||||
value="{{ db.database.id }}">{{ db.database.name|safe }}</option>`
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
<p></p>
|
||||
<div id="input-div" style="display: none">
|
||||
<label for="identifier" >The reference</label>
|
||||
<input type="text" id="identifier" name="identifier" class="form-control" placeholder="">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="generic-set-external-reference-modal-form-submit">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Add External References</h3>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form
|
||||
id="generic-set-external-reference-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action="{{ current_object.url }}"
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<label for="database-select"
|
||||
>Select the Database you want to attach an External Reference
|
||||
for</label
|
||||
>
|
||||
<select
|
||||
id="database-select"
|
||||
name="selected-database"
|
||||
data-actions-box="true"
|
||||
class="form-control"
|
||||
data-width="100%"
|
||||
>
|
||||
<option disabled selected>Select Database</option>
|
||||
{% for entity, databases in meta.external_databases.items %}
|
||||
{% if entity == object_type %}
|
||||
{% for db in databases %}
|
||||
<option
|
||||
id="db-select-{{ db.database.pk }}"
|
||||
data-input-placeholder="{{ db.placeholder }}"
|
||||
value="{{ db.database.id }}"
|
||||
>
|
||||
{{ db.database.name|safe }}
|
||||
</option>
|
||||
`
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
<p></p>
|
||||
<div id="input-div" style="display: none">
|
||||
<label for="identifier">The reference</label>
|
||||
<input
|
||||
type="text"
|
||||
id="identifier"
|
||||
name="identifier"
|
||||
class="form-control"
|
||||
placeholder=""
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="generic-set-external-reference-modal-form-submit"
|
||||
>
|
||||
Submit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$(function () {
|
||||
$("#database-select").on("change", function () {
|
||||
let selected = $(this).val();
|
||||
$("#identifier").attr(
|
||||
"placeholder",
|
||||
$("#db-select-" + selected).data("input-placeholder"),
|
||||
);
|
||||
$("#input-div").show();
|
||||
});
|
||||
|
||||
$("#database-select").on("change", function () {
|
||||
let selected = $(this).val();
|
||||
$("#identifier").attr("placeholder", $('#db-select-' + selected).data('input-placeholder'));
|
||||
$("#input-div").show();
|
||||
});
|
||||
|
||||
$('#generic-set-external-reference-modal-form-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('#generic-set-external-reference-modal-form').submit();
|
||||
});
|
||||
|
||||
})
|
||||
$("#generic-set-external-reference-modal-form-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#generic-set-external-reference-modal-form").submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,37 +1,71 @@
|
||||
|
||||
{% load static %}
|
||||
<div class="modal fade bs-modal-lg" id="set_scenario_modal" tabindex="-1" aria-labelledby="set_scenario_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">Set Scenarios for {{ current_object.name|safe }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="loading_scenario_div" class="text-center"></div>
|
||||
<form id="set_scenario_modal_form" accept-charset="UTF-8" action="{{ current_object.url }}"
|
||||
data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<label for="scenario-select">Scenarios</label>
|
||||
<select id="scenario-select" name="selected-scenarios" data-actions-box='true' class="form-control"
|
||||
multiple data-width='100%'>
|
||||
<option disabled>Select Scenarios</option>
|
||||
<option value="" hidden></option>
|
||||
</select>
|
||||
</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="set_scenario_modal_form_submit">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="modal fade bs-modal-lg"
|
||||
id="set_scenario_modal"
|
||||
tabindex="-1"
|
||||
aria-labelledby="set_scenario_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">
|
||||
Set Scenarios for {{ current_object.name|safe }}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="loading_scenario_div" class="text-center"></div>
|
||||
<form
|
||||
id="set_scenario_modal_form"
|
||||
accept-charset="UTF-8"
|
||||
action="{{ current_object.url }}"
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<label for="scenario-select">Scenarios</label>
|
||||
<select
|
||||
id="scenario-select"
|
||||
name="selected-scenarios"
|
||||
data-actions-box="true"
|
||||
class="form-control"
|
||||
multiple
|
||||
data-width="100%"
|
||||
>
|
||||
<option disabled>Select Scenarios</option>
|
||||
<option value="" hidden></option>
|
||||
</select>
|
||||
</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="set_scenario_modal_form_submit"
|
||||
>
|
||||
Submit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{# prettier-ignore-start #}
|
||||
<script>
|
||||
|
||||
$(function () {
|
||||
@ -75,3 +109,4 @@
|
||||
});
|
||||
|
||||
</script>
|
||||
{# prettier-ignore-end #}
|
||||
|
||||
@ -1,54 +1,75 @@
|
||||
{% load static %}
|
||||
<!-- Identify Missing Rules -->
|
||||
<div id="identify_missing_rules_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Identify Missing Rules</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
By clicking on Download we'll search the Pathway for Reactions that are not backed by
|
||||
a Rule or which can be assembled by chaining two rules.
|
||||
<form id="identify-missing-rules-modal-form" accept-charset="UTF-8" action="{{ pathway.url }}"
|
||||
data-remote="true" method="GET">
|
||||
<label for="rule-package">Select the Rule Package</label>
|
||||
<select id="rule-package" name="rule-package" data-actions-box='true' class="form-control"
|
||||
data-width='100%'>
|
||||
<option disabled>Reviewed Packages</option>
|
||||
{% for obj in meta.readable_packages %}
|
||||
{% if obj.reviewed %}
|
||||
<option value="{{ obj.url }}">{{ obj.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Identify Missing Rules</h3>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
By clicking on Download we'll search the Pathway for Reactions that are
|
||||
not backed by a Rule or which can be assembled by chaining two rules.
|
||||
<form
|
||||
id="identify-missing-rules-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action="{{ pathway.url }}"
|
||||
data-remote="true"
|
||||
method="GET"
|
||||
>
|
||||
<label for="rule-package">Select the Rule Package</label>
|
||||
<select
|
||||
id="rule-package"
|
||||
name="rule-package"
|
||||
data-actions-box="true"
|
||||
class="form-control"
|
||||
data-width="100%"
|
||||
>
|
||||
<option disabled>Reviewed Packages</option>
|
||||
{% for obj in meta.readable_packages %}
|
||||
{% if obj.reviewed %}
|
||||
<option value="{{ obj.url }}">{{ obj.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<option disabled>Unreviewed Packages</option>
|
||||
{% for obj in meta.readable_packages %}
|
||||
{% if not obj.reviewed %}
|
||||
<option value="{{ obj.url }}">{{ obj.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="hidden" name="identify-missing-rules" value="true"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="identify-missing-rules-modal-submit">Download</button>
|
||||
</div>
|
||||
</div>
|
||||
<option disabled>Unreviewed Packages</option>
|
||||
{% for obj in meta.readable_packages %}
|
||||
{% if not obj.reviewed %}
|
||||
<option value="{{ obj.url }}">{{ obj.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="hidden" name="identify-missing-rules" value="true" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="identify-missing-rules-modal-submit"
|
||||
>
|
||||
Download
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#identify-missing-rules-modal-submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('#identify-missing-rules-modal-form').submit();
|
||||
$('#identify_missing_rules_modal').modal('hide');
|
||||
});
|
||||
|
||||
})
|
||||
$(function () {
|
||||
$("#identify-missing-rules-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#identify-missing-rules-modal-form").submit();
|
||||
$("#identify_missing_rules_modal").modal("hide");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,92 +1,118 @@
|
||||
|
||||
<div class="modal fade"
|
||||
tabindex="-1"
|
||||
id="manage_api_token_modal"
|
||||
role="dialog"
|
||||
aria-labelledby="manage_api_token_modal"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button"
|
||||
class="close"
|
||||
data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
<h3 class="modal-title">Manage API Token</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Requesting a Token will invalidate all potential existing tokens. The new token will only be shown once, so ensure to store it in secure place</p>
|
||||
<form id="request_api_token_form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post">
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="token-name">Name</label>
|
||||
<input type="text" id="token-name" class="form-control" name="name" placeholder="Generic Token for {{ meta.user.username }}"/>
|
||||
<label for="valid-for">Valid for (in days)</label>
|
||||
<input type="number" id="valid-for" class="form-control" name="valid-for" value="90"/>
|
||||
<input type="hidden" name="hidden" value="request-api-token">
|
||||
</p>
|
||||
</form>
|
||||
<div id="new-token">
|
||||
<pre id="new-token-pre"></pre>
|
||||
</div>
|
||||
<div id="existing-tokens">
|
||||
{% for t in tokens %}
|
||||
<form id="delete-token-{{ forloop.counter0 }}" accept-charset="UTF-8" action="{{ meta.user.url }}" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="input-group">
|
||||
<input type="hidden" name="hidden" value="delete">
|
||||
<input type="hidden" name="token-id" value="{{ t.pk }}">
|
||||
<input type="text" class="form-control" value="{{ t.name|safe }}" disabled>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-danger">Delete</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a id="manage_api_token_form_submit"
|
||||
class="btn btn-primary"
|
||||
href="#">Submit</a>
|
||||
<button type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="modal">Cancel
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="modal fade"
|
||||
tabindex="-1"
|
||||
id="manage_api_token_modal"
|
||||
role="dialog"
|
||||
aria-labelledby="manage_api_token_modal"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
<h3 class="modal-title">Manage API Token</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
Requesting a Token will invalidate all potential existing tokens. The
|
||||
new token will only be shown once, so ensure to store it in secure
|
||||
place
|
||||
</p>
|
||||
<form
|
||||
id="request_api_token_form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="token-name">Name</label>
|
||||
<input
|
||||
type="text"
|
||||
id="token-name"
|
||||
class="form-control"
|
||||
name="name"
|
||||
placeholder="Generic Token for {{ meta.user.username }}"
|
||||
/>
|
||||
<label for="valid-for">Valid for (in days)</label>
|
||||
<input
|
||||
type="number"
|
||||
id="valid-for"
|
||||
class="form-control"
|
||||
name="valid-for"
|
||||
value="90"
|
||||
/>
|
||||
<input type="hidden" name="hidden" value="request-api-token" />
|
||||
</p>
|
||||
</form>
|
||||
<div id="new-token">
|
||||
<pre id="new-token-pre"></pre>
|
||||
</div>
|
||||
<div id="existing-tokens">
|
||||
{% for t in tokens %}
|
||||
<form
|
||||
id="delete-token-{{ forloop.counter0 }}"
|
||||
accept-charset="UTF-8"
|
||||
action="{{ meta.user.url }}"
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<div class="input-group">
|
||||
<input type="hidden" name="hidden" value="delete" />
|
||||
<input type="hidden" name="token-id" value="{{ t.pk }}" />
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
value="{{ t.name|safe }}"
|
||||
disabled
|
||||
/>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-danger">Delete</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a id="manage_api_token_form_submit" class="btn btn-primary" href="#"
|
||||
>Submit</a
|
||||
>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
$('#new-token').hide()
|
||||
$(function () {
|
||||
$("#new-token").hide();
|
||||
|
||||
$('#manage_api_token_form_submit').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
$("#manage_api_token_form_submit").on("click", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const formData = $('#request_api_token_form').serialize();
|
||||
$.post('', formData, function(response) {
|
||||
$('#new-token-pre').text(response.raw_token);
|
||||
$('#new-token').show();
|
||||
});
|
||||
const formData = $("#request_api_token_form").serialize();
|
||||
$.post("", formData, function (response) {
|
||||
$("#new-token-pre").text(response.raw_token);
|
||||
$("#new-token").show();
|
||||
});
|
||||
});
|
||||
|
||||
// Select all elements that start with 'delete-token-'
|
||||
$("[id^='delete-token-']").on("submit", function(e) {
|
||||
e.preventDefault();
|
||||
const formData = $(this).serialize();
|
||||
const form = $(this);
|
||||
$.post(this.action, formData, function(response) {
|
||||
console.log(this);
|
||||
form.remove();
|
||||
});
|
||||
$("[id^='delete-token-']").on("submit", function (e) {
|
||||
e.preventDefault();
|
||||
const formData = $(this).serialize();
|
||||
const form = $(this);
|
||||
$.post(this.action, formData, function (response) {
|
||||
console.log(this);
|
||||
form.remove();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,35 +1,52 @@
|
||||
{% load static %}
|
||||
<!-- Publish a Package -->
|
||||
<div id="publish_package_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Publish Package</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Clicking on Publish will make this Package publicly available!</p>
|
||||
<form id="publish-package-modal-form" accept-charset="UTF-8" action="{{ current_package.url }}" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="hidden" value="publish-package">
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="publish-package-modal-form-submit">Publish</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Publish Package</h5>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Clicking on Publish will make this Package publicly available!</p>
|
||||
<form
|
||||
id="publish-package-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action="{{ current_package.url }}"
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="hidden" value="publish-package" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="publish-package-modal-form-submit"
|
||||
>
|
||||
Publish
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#publish-package-modal-form-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#publish-package-modal-form').submit();
|
||||
$(function () {
|
||||
$("#publish-package-modal-form-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#publish-package-modal-form").submit();
|
||||
});
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,149 +1,198 @@
|
||||
<div class="modal fade"
|
||||
tabindex="-1"
|
||||
id="set_license_modal"
|
||||
role="dialog"
|
||||
aria-labelledby="set_license_modal"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button"
|
||||
class="close"
|
||||
data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
<h3 class="modal-title">Set License</h3>
|
||||
</div>
|
||||
<div
|
||||
class="modal fade"
|
||||
tabindex="-1"
|
||||
id="set_license_modal"
|
||||
role="dialog"
|
||||
aria-labelledby="set_license_modal"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
<h3 class="modal-title">Set License</h3>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<p>
|
||||
Set the license for all data in this package:
|
||||
<br> <br>
|
||||
(For more information please visit our <a target="#"
|
||||
href="https://wiki.envipath.org/index.php/License">wiki</a>.)
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div id="ccfig"></div>
|
||||
</div>
|
||||
</div>
|
||||
<form id="set_license_form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="input-group">
|
||||
<div class="radio">
|
||||
<label><input type="radio" name="optlicense" onclick="cc()" id="ccradio">Creative commons license</label>
|
||||
</div>
|
||||
<div>
|
||||
<div class="checkbox">
|
||||
<label><input type="checkbox" value="" onclick="cc()" id="ccremix" disabled>Allow adaptations of your work to be shared</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label><input type="checkbox" value="" onclick="cc()" id="ccnocom" disabled>Prohibit commercial use</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label><input type="checkbox" value="" onclick="cc()" id="ccalike" disabled>Share only if others share alike</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label><input type="radio" name="optlicense" onclick="cc()" id="noccradio">No creative commons license, contact package owner for license information</label>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="license" name="license">
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="set_license_form_submit" class="btn btn-primary">Submit</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<p>
|
||||
Set the license for all data in this package:
|
||||
<br />
|
||||
<br />
|
||||
(For more information please visit our
|
||||
<a target="#" href="https://wiki.envipath.org/index.php/License"
|
||||
>wiki</a
|
||||
>.)
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div id="ccfig"></div>
|
||||
</div>
|
||||
</div>
|
||||
<form
|
||||
id="set_license_form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
<div class="input-group">
|
||||
<div class="radio">
|
||||
<label
|
||||
><input
|
||||
type="radio"
|
||||
name="optlicense"
|
||||
onclick="cc()"
|
||||
id="ccradio"
|
||||
/>Creative commons license</label
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
<div class="checkbox">
|
||||
<label
|
||||
><input
|
||||
type="checkbox"
|
||||
value=""
|
||||
onclick="cc()"
|
||||
id="ccremix"
|
||||
disabled
|
||||
/>Allow adaptations of your work to be shared</label
|
||||
>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label
|
||||
><input
|
||||
type="checkbox"
|
||||
value=""
|
||||
onclick="cc()"
|
||||
id="ccnocom"
|
||||
disabled
|
||||
/>Prohibit commercial use</label
|
||||
>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label
|
||||
><input
|
||||
type="checkbox"
|
||||
value=""
|
||||
onclick="cc()"
|
||||
id="ccalike"
|
||||
disabled
|
||||
/>Share only if others share alike</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label
|
||||
><input
|
||||
type="radio"
|
||||
name="optlicense"
|
||||
onclick="cc()"
|
||||
id="noccradio"
|
||||
/>No creative commons license, contact package owner for license
|
||||
information</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="license" name="license" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="set_license_form_submit" class="btn btn-primary">
|
||||
Submit
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function ccstring(ccremix, ccnocom, ccalike){
|
||||
function ccstring(ccremix, ccnocom, ccalike) {
|
||||
var ccstring = "by";
|
||||
|
||||
if(ccnocom){
|
||||
ccstring +="-nc";
|
||||
if (ccnocom) {
|
||||
ccstring += "-nc";
|
||||
}
|
||||
|
||||
if(!ccremix){
|
||||
ccstring +="-nd";
|
||||
} else{
|
||||
if(ccalike){
|
||||
ccstring +="-sa";
|
||||
}
|
||||
if (!ccremix) {
|
||||
ccstring += "-nd";
|
||||
} else {
|
||||
if (ccalike) {
|
||||
ccstring += "-sa";
|
||||
}
|
||||
}
|
||||
return ccstring;
|
||||
}
|
||||
}
|
||||
|
||||
function cc() {
|
||||
var nocc = $('#noccradio').prop('checked')
|
||||
var iscc = $('#ccradio').prop('checked');
|
||||
function cc() {
|
||||
var nocc = $("#noccradio").prop("checked");
|
||||
var iscc = $("#ccradio").prop("checked");
|
||||
|
||||
if(nocc) {
|
||||
$('#ccradio').prop('checked', false);
|
||||
$('#ccremix').prop('checked', false);
|
||||
$('#ccnocom').prop('checked', false);
|
||||
$('#ccalike').prop('checked', false);
|
||||
if (nocc) {
|
||||
$("#ccradio").prop("checked", false);
|
||||
$("#ccremix").prop("checked", false);
|
||||
$("#ccnocom").prop("checked", false);
|
||||
$("#ccalike").prop("checked", false);
|
||||
|
||||
$('#ccremix').prop('disabled', true);
|
||||
$('#ccnocom').prop('disabled', true);
|
||||
$('#ccalike').prop('disabled', true);
|
||||
$("#ccremix").prop("disabled", true);
|
||||
$("#ccnocom").prop("disabled", true);
|
||||
$("#ccalike").prop("disabled", true);
|
||||
} else if (iscc) {
|
||||
$('#ccremix').prop('disabled', false);
|
||||
$('#ccnocom').prop('disabled', false);
|
||||
$("#ccremix").prop("disabled", false);
|
||||
$("#ccnocom").prop("disabled", false);
|
||||
|
||||
if ($('#ccremix').prop('checked')) {
|
||||
$('#ccalike').prop('disabled', false);
|
||||
} else {
|
||||
$('#ccalike').prop('disabled', true);
|
||||
}
|
||||
if ($("#ccremix").prop("checked")) {
|
||||
$("#ccalike").prop("disabled", false);
|
||||
} else {
|
||||
$("#ccalike").prop("disabled", true);
|
||||
}
|
||||
}
|
||||
|
||||
var remix = $('#ccremix').prop('checked');
|
||||
var nocom = $('#ccnocom').prop('checked');
|
||||
var alike = $('#ccalike').prop('checked');
|
||||
var remix = $("#ccremix").prop("checked");
|
||||
var nocom = $("#ccnocom").prop("checked");
|
||||
var alike = $("#ccalike").prop("checked");
|
||||
|
||||
if(nocc) {
|
||||
$('#set_license_form_submit').prop('disabled', false);
|
||||
$('#ccfig').empty();
|
||||
$('#license').val('no-license')
|
||||
} else if(iscc) {
|
||||
$('#set_license_form_submit').prop('disabled', false);
|
||||
$('#ccfig').empty();
|
||||
var ccstr = ccstring(remix, nocom, alike)
|
||||
if (nocc) {
|
||||
$("#set_license_form_submit").prop("disabled", false);
|
||||
$("#ccfig").empty();
|
||||
$("#license").val("no-license");
|
||||
} else if (iscc) {
|
||||
$("#set_license_form_submit").prop("disabled", false);
|
||||
$("#ccfig").empty();
|
||||
var ccstr = ccstring(remix, nocom, alike);
|
||||
|
||||
var link = `https://creativecommons.org/licenses/${ccstr}/4.0/`;
|
||||
var imageLink = `https://licensebuttons.net/l/${ccstr}/4.0/88x31.png`;
|
||||
var link = `https://creativecommons.org/licenses/${ccstr}/4.0/`;
|
||||
var imageLink = `https://licensebuttons.net/l/${ccstr}/4.0/88x31.png`;
|
||||
|
||||
var img_tpl = `<a href='${link}' target="_blank">
|
||||
var img_tpl = `<a href='${link}' target="_blank">
|
||||
<img src='${imageLink}'>
|
||||
</a>`;
|
||||
|
||||
$('#ccfig').append(img_tpl);
|
||||
$('#license').val(ccstr);
|
||||
$("#ccfig").append(img_tpl);
|
||||
$("#license").val(ccstr);
|
||||
} else {
|
||||
$('#ccfig').empty();
|
||||
$('#set_license_form_submit').prop('disabled', true);
|
||||
$('#license').val('no-license')
|
||||
$("#ccfig").empty();
|
||||
$("#set_license_form_submit").prop("disabled", true);
|
||||
$("#license").val("no-license");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$(function () {
|
||||
// Disable by default as nothing is selected
|
||||
|
||||
cc();
|
||||
$('#set_license_form_submit').prop('disabled', true);
|
||||
$("#set_license_form_submit").prop("disabled", true);
|
||||
|
||||
$('#set_license_form_submit').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
$('#set_license_form').submit();
|
||||
$("#set_license_form_submit").on("click", function (e) {
|
||||
e.preventDefault();
|
||||
$("#set_license_form").submit();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,39 +1,62 @@
|
||||
{% load static %}
|
||||
<!-- Update Scenario Additional Information-->
|
||||
<div id="update_scenario_additional_information_modal" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<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>
|
||||
<h3 class="modal-title">Update Additional Information</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="edit-scenario-additional-information-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
||||
{% csrf_token %}
|
||||
{% for widget in update_widgets %}
|
||||
{{ widget|safe }}
|
||||
{% endfor %}
|
||||
<input type="hidden" name="hidden" value="set-additional-information">
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="edit-scenario-additional-information-modal-submit">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
id="update_scenario_additional_information_modal"
|
||||
class="modal"
|
||||
tabindex="-1"
|
||||
>
|
||||
<div class="modal-dialog">
|
||||
<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>
|
||||
<h3 class="modal-title">Update Additional Information</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form
|
||||
id="edit-scenario-additional-information-modal-form"
|
||||
accept-charset="UTF-8"
|
||||
action=""
|
||||
data-remote="true"
|
||||
method="post"
|
||||
>
|
||||
{% csrf_token %}
|
||||
{% for widget in update_widgets %}
|
||||
{{ widget|safe }}
|
||||
{% endfor %}
|
||||
<input
|
||||
type="hidden"
|
||||
name="hidden"
|
||||
value="set-additional-information"
|
||||
/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="edit-scenario-additional-information-modal-submit"
|
||||
>
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('#edit-scenario-additional-information-modal-submit').click(function(e){
|
||||
e.preventDefault();
|
||||
$('#edit-scenario-additional-information-modal-form').submit();
|
||||
$(function () {
|
||||
$("#edit-scenario-additional-information-modal-submit").click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#edit-scenario-additional-information-modal-form").submit();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user