{% extends 'ui/base.html' %} {% block title %}Create Protocol | BioQueue{% endblock %} {% block content %}

To import a protocol

You can fetch the procotol from BioQueue Open Platform by providing the ID of the protocol.

For example, 01269439-28F0-F1BD-3B4A-38604657DBD3

{% csrf_token %}

Alternatively

You can upload a protocol file to import it.

{% csrf_token %}

Steps


Add step {% csrf_token %}

{% include 'ui/variant_hint.html' %}
{% endblock %} {% block script %} var before_software = ""; var before_uid = ""; $("#add-protocol").addClass("active"); $(document).ready(function(){ var oTextbox = new AutoSuggestControl("parameter"); }); $("#create-protocol-form").submit(function(){ var self = $(this); $.post(self.attr("action"), self.serialize(), success, "json"); return false; function success(data){ if(data.status){ Messenger().post({ message: data.info, showCloseButton: true }); self[0].reset(); } else { Messenger().post({ message: data.info, type: 'error', showCloseButton: true }); $("#verify").val(''); } } }); function fetchKB(obj){ var self = $(obj); var this_software = self.parent().parent().children("#software").val(); var hint_panel = self.parent().parent().parent().children(".hints"); if (before_software != this_software){ before_software = this_software; self.attr("disabled", true); var api_bus = "{{ api_bus }}/Kb/findSoftwareUsage"; var opera_tag = 0; var old_ie_tag = 0; if(window.opera){ var version_arr = opera.version().split("."); if (version_arr [0] <= 12){ opera_tag = 1; } } if(document.all && !window.atob){ old_ie_tag = 1; } if (old_ie_tag || opera_tag){ api_bus = "{% url 'ui:query_usage' %}"; var csrftoken = $.cookie('csrftoken'); $.ajaxSetup({ beforeSend: function(xhr, settings){ xhr.setRequestHeader("X-CSRFToken", csrftoken); } }); } $.post(api_bus, {software: this_software}, function(data){ if (data.status){ hint_panel.children('.hints-container').html(data.content); hint_panel.show(); } self.attr("disabled", false); }, 'json').error(function(){ self.attr("disabled", false); }); }else{ hint_panel.show(); } } function importProtocolByFetch(obj){ var self = $(obj); var this_uid = self.parent().parent().children("#uid").val(); var hint_panel = self.parent().parent().parent().children(".ref-hints"); if (before_uid != this_uid){ before_uid = this_uid; self.attr("disabled", true); var csrftoken = $.cookie('csrftoken'); $.ajaxSetup({ beforeSend: function(xhr, settings){ xhr.setRequestHeader("X-CSRFToken", csrftoken); } }); $.post('{% url 'ui:import_protocol_by_fetch' %}', {uid: this_uid}, function(data){ if (data.status){ hint_panel.children('.ref-hints-container').html(data.info); hint_panel.show(); $("#uid").val(""); }else{ Messenger().post({ message: data.info, type: 'error', showCloseButton: true }); } self.attr("disabled", false); }, 'json').error(function(){ self.attr("disabled", false); }); }else{ hint_panel.show(); } } function addStep(){ var new_id = "parameter"+$(".parameter-ac").length new_step = $(".protocol-step:eq(0)").clone(); new_step.find(":input").each(function(i){ $(this).val(""); }); new_step.find(".parameter-ac").each(function(i){ $(this).attr("id", new_id); }); new_step.appendTo(".step-container"); var oTextbox = new AutoSuggestControl(new_id); } {% endblock %}