diff --git a/ippisite/ippidb/forms.py b/ippisite/ippidb/forms.py index 67f5eefea76fdfd889d3d35abd5db7e015dcc368..4e1791300bc41b4b3305b8de7f14e3892902f0c3 100644 --- a/ippisite/ippidb/forms.py +++ b/ippisite/ippidb/forms.py @@ -68,7 +68,8 @@ class ProteinDomainComplexTypeForm(forms.Form): archi = forms.CharField( label="PPI Architecture Type", widget=forms.Select( - choices=ARCHI_TYPE) + choices=ARCHI_TYPE, + ) ) inhibited = forms.ChoiceField( widget=forms.RadioSelect, diff --git a/ippisite/ippidb/static/css/ippidb.css b/ippisite/ippidb/static/css/ippidb.css index 204111feece247249d8f5a77fc6e485d23b7d711..ac0da657f498890fed954427532f37169a1cfcd7 100644 --- a/ippisite/ippidb/static/css/ippidb.css +++ b/ippisite/ippidb/static/css/ippidb.css @@ -783,13 +783,11 @@ body { } .image-inhibited label span{ - background-image: url('/static/images/PPITypes/Inhibited/{{radio.choice_label|cut:" "}}_Apo.png'); background-position: center; background-repeat: no-repeat; } .image-inhibited label span:hover { - background-image: url('/static/images/PPITypes/Inhibited/{{radio.choice_label|cut:" "}}_Halo.png'); background-position: center; background-repeat: no-repeat; } diff --git a/ippisite/ippidb/static/js/ippidb.js b/ippisite/ippidb/static/js/ippidb.js index 084b2751c1eca9b78161ae9c5dc3e88cd637f6c5..dbb17171e64716ca2d63cba80e19c7d6a26a114a 100644 --- a/ippisite/ippidb/static/js/ippidb.js +++ b/ippisite/ippidb/static/js/ippidb.js @@ -20,15 +20,15 @@ $(document).ready(function() { $(document).ready(function(){ $('#id_ProteinDomainComplexTypeForm-archi').on('change', function() { - if ( this.value === "stabilized") + if ( this.value === "inhibited") { - $("#stabilized").show(); - $("#inhibited").hide(); + $("#inhibited").show(); + $("#stabilized").hide(); } else { - $("#stabilized").hide(); - $("#inhibited").show(); + $("#inhibited").hide(); + $("#stabilized").show(); } }); }); \ No newline at end of file diff --git a/ippisite/ippidb/templates/BibliographyForm.html b/ippisite/ippidb/templates/BibliographyForm.html index 657704585f694deda3429576e35cb0120417e056..f7f005e54d7099ebf4c2c7796f67055fab59fd4d 100644 --- a/ippisite/ippidb/templates/BibliographyForm.html +++ b/ippisite/ippidb/templates/BibliographyForm.html @@ -14,58 +14,56 @@ </div> <div id="Form"> <div class="step_desc"> - <p>Based on the ID you have provided, we have identified the following information concerning your bibliographic source. -Please check that the information below is correct (Title, Authors etc. ) and answer the few questions about the content of your bibliographic source.</p> + <p>Based on the ID you have provided, we have identified the following information concerning your bibliographic source. + Please check that the information below is correct (Title, Authors etc. ) and answer the few questions about the content of your bibliographic source.</p> </div> <form action="" method="post"> {% csrf_token %} <table> - {{ wizard.management_form }} - {{ wizard.form.errors}} - {{ wizard.form.non_field_errors}} - {% block custom_form %}{% endblock %} + {{ wizard.management_form }} + {{ wizard.form.errors}} + {{ wizard.form.non_field_errors}} + {% block custom_form %}{% endblock %} + + {% if wizard.form.forms %} + {{ wizard.form.management_form }} + {% for form in wizard.form.forms %} + {{ form }} + {% endfor %} + {% else %} + <div class="readonlyfields"> + {{ wizard.form.source }}<br/> + {{ wizard.form.id_source }}<br/> + {{ wizard.form.title }}<br/> + {{ wizard.form.journal_name }}<br/> + </div> + <p> This publication contains :<br/></p> + <div id="ck-button"> + <label> + <input type="checkbox"><span>{{ wizard.form.cytotox.label }}</span> + </label> + <label> + <input type="checkbox"><span>{{ wizard.form.in_silico.label }}</span> + </label> + <label> + <input type="checkbox"><span>{{ wizard.form.in_vitro.label }}</span> + </label> + <label> + <input type="checkbox"><span>{{ wizard.form.in_vivo.label }}</span> + </label> + <label> + <input type="checkbox"><span>{{ wizard.form.in_cellulo.label }}</span> + </label> + <label> + <input type="checkbox"><span>{{ wizard.form.pharmacokinetic.label }}</span> + </label> + <label> + <input type="checkbox"><span>{{ wizard.form.xray.label }}</span> + </label> + </div> + {% endif %} + </table> + <input type="submit" value="{% trans "Next step" %}"/> </form> -{% if wizard.form.forms %} - {{ wizard.form.management_form }} - {% for form in wizard.form.forms %} - {{ form }} - {% endfor %} -{% else %} - <div class="readonlyfields"> - {{ wizard.form.source }}<br/> - {{ wizard.form.id_source }}<br/> - {{ wizard.form.title }}<br/> - {{ wizard.form.journal_name }}<br/> - </div> - <p> This publication contains :<br/></p> - <div id="ck-button"> - <label> - <input type="checkbox"><span>{{ wizard.form.cytotox.label }}</span> - </label> - <label> - <input type="checkbox"><span>{{ wizard.form.in_silico.label }}</span> - </label> - <label> - <input type="checkbox"><span>{{ wizard.form.in_vitro.label }}</span> - </label> - <label> - <input type="checkbox"><span>{{ wizard.form.in_vivo.label }}</span> - </label> - <label> - <input type="checkbox"><span>{{ wizard.form.in_cellulo.label }}</span> - </label> - <label> - <input type="checkbox"><span>{{ wizard.form.pharmacokinetic.label }}</span> - </label> - <label> - <input type="checkbox"><span>{{ wizard.form.xray.label }}</span> - </label> -</div> -{% endif %} -</table> -{% if wizard.steps.prev %} - -{% endif %} - <input type="submit" value="{% trans "Next step" %}"/> </div> {% endblock %} \ No newline at end of file diff --git a/ippisite/ippidb/templates/IdForm.html b/ippisite/ippidb/templates/IdForm.html index d8c8ec70aeebb23cfcd428b53d9e83c2e70cadaf..977a4fc3d4ff4963b7a6949a3e7b425db4e7cec6 100644 --- a/ippisite/ippidb/templates/IdForm.html +++ b/ippisite/ippidb/templates/IdForm.html @@ -23,24 +23,25 @@ {{ wizard.form.errors}} {{ wizard.form.non_field_errors}} {% block custom_form %}{% endblock %} + + {% if wizard.form.forms %} + {{ wizard.form.management_form }} + {% for form in wizard.form.forms %} + {{ form }} + {% endfor %} + {% else %} + <div id="id_IdForm-source"> + {% for radio in wizard.form.source %} + {{ radio.tag }} + <label for="{{ radio.id_for_label }}"> + <span>{{ radio.choice_label }}</span> + </label> + {% endfor %} + </div> + {{ wizard.form.id_source}} + {% endif %} + </table> + <input type="submit" value="{% trans "Next step" %}"/> </form> -{% if wizard.form.forms %} - {{ wizard.form.management_form }} - {% for form in wizard.form.forms %} - {{ form }} - {% endfor %} -{% else %} - <div id="id_IdForm-source"> - {% for radio in wizard.form.source %} - {{ radio.tag }} - <label for="{{ radio.id_for_label }}"> - <span>{{ radio.choice_label }}</span> - </label> - {% endfor %} - </div> - {{ wizard.form.id_source}} -{% endif %} -</table> - <input type="submit" value="{% trans "Next step" %}"/> </div> {% endblock %} \ No newline at end of file diff --git a/ippisite/ippidb/templates/PDBForm.html b/ippisite/ippidb/templates/PDBForm.html index 4f938db49d07f54441430917f30de1d3198cf374..1efe561d9f2109baccf6a4e3d314f8177e126dbb 100644 --- a/ippisite/ippidb/templates/PDBForm.html +++ b/ippisite/ippidb/templates/PDBForm.html @@ -23,19 +23,20 @@ {{ wizard.form.errors}} {{ wizard.form.non_field_errors}} {% block custom_form %}{% endblock %} + + {% if wizard.form.forms %} + {{ wizard.form.management_form }} + {% for form in wizard.form.forms %} + {{ form }} + {% endfor %} + {% else %} + <div class="input_fields_wrap"> + <div class="input_size">{{ wizard.form.pdb_id }} + <div class="add_field_button"><img class="small_icon" src="/static/images/Other/AddMore.png"></div></div> + </div> + {% endif %} + </table> + <input type="submit" value="{% trans "Next step" %}"/> </form> -{% if wizard.form.forms %} - {{ wizard.form.management_form }} - {% for form in wizard.form.forms %} - {{ form }} - {% endfor %} -{% else %} - <div class="input_fields_wrap"> - <div class="input_size">{{ wizard.form.pdb_id }} - <div class="add_field_button"><img class="small_icon" src="/static/images/Other/AddMore.png"></div></div> - </div> -{% endif %} -</table> - <input type="submit" value="{% trans "Next step" %}"/> </div> {% endblock %} \ No newline at end of file diff --git a/ippisite/ippidb/templates/PpiForm.html b/ippisite/ippidb/templates/PpiForm.html index f377c4c11369b7e982f4634c1dac1eec44ab4cd1..ad7ec0c70ada202373716fa77a55e517a9a4bdbc 100644 --- a/ippisite/ippidb/templates/PpiForm.html +++ b/ippisite/ippidb/templates/PpiForm.html @@ -23,20 +23,21 @@ {{ wizard.form.errors}} {{ wizard.form.non_field_errors}} {% block custom_form %}{% endblock %} + + {% if wizard.form.forms %} + {{ wizard.form.management_form }} + {% for form in wizard.form.forms %} + {{ form }} + {% endfor %} + {% else %} + {{ wizard.form }} + {% endif %} + </table> + {% if wizard.steps.prev %} + <button name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "first step" %}</button> + <button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "previous step" %}</button> + {% endif %} + <input type="submit" value="{% trans "submit" %}"/> </form> -{% if wizard.form.forms %} - {{ wizard.form.management_form }} - {% for form in wizard.form.forms %} - {{ form }} - {% endfor %} -{% else %} - {{ wizard.form }} -{% endif %} -</table> -{% if wizard.steps.prev %} - <button name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "first step" %}</button> - <button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "previous step" %}</button> -{% endif %} - <input type="submit" value="{% trans "submit" %}"/> </div> {% endblock %} \ No newline at end of file diff --git a/ippisite/ippidb/templates/ProteinDomainComplexForm.html b/ippisite/ippidb/templates/ProteinDomainComplexForm.html index 3c22c48d03cd157e203b71a2253de81f3c2c7fed..49d2af5963e5eff665f01788a7b085cd3661263e 100644 --- a/ippisite/ippidb/templates/ProteinDomainComplexForm.html +++ b/ippisite/ippidb/templates/ProteinDomainComplexForm.html @@ -25,19 +25,20 @@ If your PPI complex is not among them, please select « Create you Own »</p> {{ wizard.form.errors}} {{ wizard.form.non_field_errors}} {% block custom_form %}{% endblock %} - </form> -{% if wizard.form.forms %} - {{ wizard.form.management_form }} - {% for form in wizard.form.forms %} - {{ form }} - {% endfor %} -{% else %} - {{ wizard.form }} -{% endif %} -</table> -{% if wizard.steps.prev %} + + {% if wizard.form.forms %} + {{ wizard.form.management_form }} + {% for form in wizard.form.forms %} + {{ form }} + {% endfor %} + {% else %} + {{ wizard.form }} + {% endif %} + </table> + {% if wizard.steps.prev %} -{% endif %} - <input type="submit" value="{% trans "Next step" %}"/> + {% endif %} + <input type="submit" value="{% trans "Next step" %}"/> + </form> </div> {% endblock %} \ No newline at end of file diff --git a/ippisite/ippidb/templates/ProteinDomainComplexTypeForm.html b/ippisite/ippidb/templates/ProteinDomainComplexTypeForm.html index 6b3c93c930847681d112dd7c495cfef807c580c2..976d058c286bfa94ee3ecb61828d864947bf31d3 100644 --- a/ippisite/ippidb/templates/ProteinDomainComplexTypeForm.html +++ b/ippisite/ippidb/templates/ProteinDomainComplexTypeForm.html @@ -24,39 +24,40 @@ If your PPI complex is not among them, please select « Create you Own »</p> {{ wizard.form.errors}} {{ wizard.form.non_field_errors}} {% block custom_form %}{% endblock %} - </form> -{% if wizard.form.forms %} - {{ wizard.form.management_form }} - {% for form in wizard.form.forms %} - {% endfor %} -{% else %} - {{ wizard.form.archi }} - <div id='inhibited' name='inhibited' class="type_style"> - <div class="type_title"> - <h1>Inhibited</h1> - </div> - <div id="id_ProteinDomainComplexTypeForm-inhibited" class="image-inhibited"> - {% for radio in wizard.form.inhibited %} - {{ radio.tag }} - <label for="{{ radio.id_for_label }}"> - <span>{{ radio.choice_label}}</span> - </label> - {% endfor %} - </div> - </div> - <div id="stabilized" class="type_style"> - <div class="type_title"><h1>Stabilized</h1></div> - <div id="id_ProteinDomainComplexTypeForm-stabilized"> - {% for radio in wizard.form.stabilized %} - {{ radio.tag }} - <label style="background-image: url('/static/images/DimericsPPI/Stabilized/{{radio.choice_label|cut:" "}}.png');" for="{{ radio.id_for_label }}"> - <span>{{ radio.choice_label}}</span> - </label> + + {% if wizard.form.forms %} + {{ wizard.form.management_form }} + {% for form in wizard.form.forms %} {% endfor %} - </div> - </div> -{% endif %} -</table> - <input type="submit" value="{% trans "Next step" %}"/> + {% else %} + {{ wizard.form.archi }} + <div id='inhibited' name='inhibited' class="type_style"> + <div class="type_title"> + <h1>Inhibited</h1> + </div> + <div id="id_ProteinDomainComplexTypeForm-inhibited" class="image-inhibited"> + {% for radio in wizard.form.inhibited %} + {{ radio.tag }} + <label style="background-image: url('/static/images/PPITypes/Inhibited/{{radio.choice_label|cut:" "}}_Apo.png');" for="{{ radio.id_for_label }}"> + <span>{{ radio.choice_label}}</span> + </label> + {% endfor %} + </div> + </div> + <div id="stabilized" class="type_style"> + <div class="type_title"><h1>Stabilized</h1></div> + <div id="id_ProteinDomainComplexTypeForm-stabilized"> + {% for radio in wizard.form.stabilized %} + {{ radio.tag }} + <label style="background-image: url('/static/images/DimericsPPI/Stabilized/{{radio.choice_label|cut:" "}}.png');" for="{{ radio.id_for_label }}"> + <span>{{ radio.choice_label}}</span> + </label> + {% endfor %} + </div> + </div> + {% endif %} + </table> + <input type="submit" value="{% trans "Next step" %}"/> + </form> </div> {% endblock %} \ No newline at end of file diff --git a/ippisite/ippidb/templates/ProteinForm.html b/ippisite/ippidb/templates/ProteinForm.html index e6966f9be08973aad072fc3db3a52e1215962b42..68a4279c4ddbd1c631ad807ac29bc5ac326eada0 100644 --- a/ippisite/ippidb/templates/ProteinForm.html +++ b/ippisite/ippidb/templates/ProteinForm.html @@ -23,21 +23,22 @@ {{ wizard.form.errors}} {{ wizard.form.non_field_errors}} {% block custom_form %}{% endblock %} + + {% if wizard.form.forms %} + {{ wizard.form.management_form }} + {% for form in wizard.form.forms %} + {{ form }} + {% endfor %} + {% else %} + {{ wizard.form.management_form }} + {% for form in formset %} + {% for field in form %} + {{ field.label_tag }} {{ field }} + {% endfor %} + {% endfor %} + {% endif %} + </table> + <input type="submit" value="{% trans "Next step" %}"/> </form> -{% if wizard.form.forms %} - {{ wizard.form.management_form }} - {% for form in wizard.form.forms %} - {{ form }} - {% endfor %} -{% else %} - {{ formset.management_form }} - {% for form in formset %} - {% for field in form %} - {{ field.label_tag }} {{ field }} - {% endfor %} - {% endfor %} -{% endif %} -</table> - <input type="submit" value="{% trans "Next step" %}"/> </div> {% endblock %} \ No newline at end of file