Skip to content
Snippets Groups Projects
Commit f2b433a0 authored by Rachel TORCHET's avatar Rachel TORCHET
Browse files

Update css files and images for Protein Domain Complex Type form

Former-commit-id: cffefe011db95dea9442e0810503870ae4c6329d
parent 2e09c996
No related branches found
No related tags found
No related merge requests found
...@@ -39,8 +39,7 @@ class ProteinForm(ModelForm): ...@@ -39,8 +39,7 @@ class ProteinForm(ModelForm):
ProteinFormSet = modelformset_factory(Protein, exclude=('recommended_name_long', 'short_name')) ProteinFormSet = modelformset_factory(Protein, exclude=('recommended_name_long', 'short_name'))
formset=ProteinFormSet() formset=ProteinFormSet()
for form in formset:
print(form.as_table())
ARCHI_TYPE = ( ARCHI_TYPE = (
('inhibited', 'Inhibited'), ('inhibited', 'Inhibited'),
......
...@@ -646,6 +646,8 @@ body { ...@@ -646,6 +646,8 @@ body {
/* BUTTONS */ /* BUTTONS */
/* IdForm*/
#id_IdForm-source { #id_IdForm-source {
overflow: hidden; overflow: hidden;
width: 400px; width: 400px;
...@@ -684,6 +686,8 @@ body { ...@@ -684,6 +686,8 @@ body {
border-right: 1px solid #E3E9EB; border-right: 1px solid #E3E9EB;
} }
/* BibliographyForm*/
#ck-button { #ck-button {
margin: 4px; margin: 4px;
float:left; float:left;
...@@ -735,6 +739,87 @@ body { ...@@ -735,6 +739,87 @@ body {
border-right: 1px solid #E3E9EB; border-right: 1px solid #E3E9EB;
} }
/* ProteinDomainComplexTypeForm */
#id_ProteinDomainComplexTypeForm-inhibited {
overflow: hidden;
width: 600px;
padding-bottom: 5px;
}
#id_ProteinDomainComplexTypeForm-inhibited label span{
display: inline-block;
width: 180px;
text-align: center;
border: 1px solid #8D8888;
height: 180px;
font-size: 12px;
}
#id_ProteinDomainComplexTypeForm-inhibited input {
display:none;
}
#id_ProteinDomainComplexTypeForm-inhibited input:hover+label span{
cursor: pointer;
background-color: #FFFFFF;
color: #000000;
border-bottom: 1px solid #2D96FA;
border-top: 1px solid #E3E9EB;
border-left: 1px solid #E3E9EB;
border-right: 1px solid #E3E9EB;
}
#id_ProteinDomainComplexTypeForm-inhibited input[type="radio"]:checked+label span{
background-color: #FFFFFF;
color: #000000;
border-bottom: 1px solid #2D96FA;
border-top: 1px solid #E3E9EB;
border-left: 1px solid #E3E9EB;
border-right: 1px solid #E3E9EB;
}
/* Stabilized */
#id_ProteinDomainComplexTypeForm-stabilized {
overflow: hidden;
width: 600px;
padding-bottom: 5px;
}
#id_ProteinDomainComplexTypeForm-stabilized label span{
display: inline-block;
width: 180px;
text-align: center;
border: 1px solid #8D8888;
height: 180px;
font-size: 12px;
}
#id_ProteinDomainComplexTypeForm-stabilized input {
display:none;
}
#id_ProteinDomainComplexTypeForm-stabilized input:hover+label span{
cursor: pointer;
background-color: #FFFFFF;
color: #000000;
border-bottom: 1px solid #2D96FA;
border-top: 1px solid #E3E9EB;
border-left: 1px solid #E3E9EB;
border-right: 1px solid #E3E9EB;
}
#id_ProteinDomainComplexTypeForm-stabilized input[type="radio"]:checked+label span{
background-color: #FFFFFF;
color: #000000;
border-bottom: 1px solid #2D96FA;
border-top: 1px solid #E3E9EB;
border-left: 1px solid #E3E9EB;
border-right: 1px solid #E3E9EB;
}
button, input, select, textarea { button, input, select, textarea {
line-height: inherit; line-height: inherit;
font-family: "BrandonGrotesqueReg"; font-family: "BrandonGrotesqueReg";
...@@ -808,6 +893,18 @@ button, input, select, textarea { ...@@ -808,6 +893,18 @@ button, input, select, textarea {
} }
.type_style {
background-color: rgb(227, 233, 235);
padding: 10px;
margin: 10px;
}
.type_title h1{
text-align: left;
color: #414144;
font-size: 42px;
}
/* FOOTER */ /* FOOTER */
.main-footer { .main-footer {
......
...@@ -28,25 +28,41 @@ If your PPI complex is not among them, please select « Create you Own »</p> ...@@ -28,25 +28,41 @@ If your PPI complex is not among them, please select « Create you Own »</p>
{% if wizard.form.forms %} {% if wizard.form.forms %}
{{ wizard.form.management_form }} {{ wizard.form.management_form }}
{% for form in wizard.form.forms %} {% for form in wizard.form.forms %}
<td>{{form.archi_type}}</td>
<td>{{form.inhibited_type}}</td>
{% endfor %} {% endfor %}
{% else %} {% else %}
<script type="text/javascript"> <div id='archi' name='archi'>{{ wizard.form.archi }}</div>
function Hide (){ <div id='inhibited' name='inhibited' class="type_style">
if(document.getElementById('archi').value == 'inhibited'){ <div class="type_title"><h1>Inhibited</h1></div>
document.getElementById('inhibited').style.display = 'block'; <div id="id_ProteinDomainComplexTypeForm-inhibited">
document.getElementById('stabilized').style.display = ''; {{ wizard.form.inhibited.0.tag }}
} else { <label for="{{ wizard.form.inhibited.0.id_for_label }}">
document.getElementById('inhibited').style.display = ''; <span>{{ wizard.form.inhibited.0.choice_label}}</span>
document.getElementById('stabilized').style.display = 'block'; </label>
} </div>
} <div id="id_ProteinDomainComplexTypeForm-inhibited">
; {{ wizard.form.inhibited.1.tag }}
</script> <label for="{{ wizard.form.inhibited.1.id_for_label }}">
<div id='archi' name='archi' onclick='Hide ()'>{{ wizard.form.archi }}</div> <span>{{ wizard.form.inhibited.1.choice_label}}</span>
<div id='inhibited' name='inhibited'>{{ wizard.form.inhibited }}</div> </label>
<div id='stabilized' name= 'stabilized'>{{ wizard.form.stabilized }}</div> </div>
<div id="id_ProteinDomainComplexTypeForm-inhibited">
{{ wizard.form.inhibited.2.tag }}
<label for="{{ wizard.form.inhibited.2.id_for_label }}">
<span>{{ wizard.form.inhibited.2.choice_label}}</span>
</label>
</div>
</div>
<div id='stabilized' name= '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_value}}.png');" for="{{ radio.id_for_label }}">
<span>{{ radio.choice_label }}</span>
</label>
{% endfor %}
</div>
</div> </div>
{% endif %} {% endif %}
</table> </table>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment