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

update form buttons

Former-commit-id: 6996fe071ef5690df5958c6a3b26c3031096755c
parent 4f0c4d0a
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,12 @@ class BibliographyForm(ModelForm):
class Meta:
model = Bibliography
exclude = ['authors_list', 'biblio_year']
widgets = {
'source': forms.Select(attrs={'disabled':'disabled', 'class':'readonly'}),
'id_source': forms.TextInput(attrs={'readonly':'readonly', 'class':'readonly'}),
'title': forms.TextInput(attrs={'readonly':'readonly', 'class':'readonly'}),
'journal_name': forms.TextInput(attrs={'readonly':'readonly', 'class':'readonly'}),
}
class PDBForm(forms.Form):
pdb_id = forms.CharField(label="PDB ID",max_length=100, widget=forms.TextInput(attrs={'placeholder': 'e.g 4HHB'}))
......
......@@ -37,12 +37,12 @@ class Bibliography(AutoFillableModel):
authors_list = models.CharField('Authors list', max_length=500)
biblio_year = models.PositiveSmallIntegerField('Year')
cytotox = models.BooleanField('Cytotoxicity data', default=False)
in_silico = models.BooleanField('in silico study performed', default=False)
in_vitro = models.BooleanField('in vitro study performed', default=False)
in_vivo = models.BooleanField('in vivo study performed', default=False)
in_cellulo = models.BooleanField('in cellulo study performed', default=False)
pharmacokinetic = models.BooleanField('pharmacokinetic study performed', default=False)
xray = models.BooleanField('contains xray data', default=False)
in_silico = models.BooleanField('in silico study', default=False)
in_vitro = models.BooleanField('in vitro study', default=False)
in_vivo = models.BooleanField('in vivo study', default=False)
in_cellulo = models.BooleanField('in cellulo study', default=False)
pharmacokinetic = models.BooleanField('pharmacokinetic study', default=False)
xray = models.BooleanField('X-Ray data', default=False)
def autofill(self):
if self.source == 'PM':
......
......@@ -607,6 +607,91 @@ form {
width : 80%;
}
.readonly {
background-color: #E8E0E0;
color: #8D8889;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
padding: 5px;
}
div label input {
margin-right:100px;
display:none;
}
#id_IdForm-source{
list-style: none;
}
ul#id_IdForm-source li{
display:inline;
}
ul#id_IdForm-source li label{
text-align: center;
padding: 5px;
background-color: rgb(255, 255, 255);
color: rgb(45, 150, 250);
border: 1px solid rgb(45, 150, 250);
font-family: "Roboto";
font-weight: bold;
width: 33%;
margin: 5px;
}
body {
font-family:sans-serif;
}
#ck-button {
margin: 4px;
background-color: #FFFFFF;
float:left;
}
#ck-button label {
width: 80%;
text-transform: uppercase;
}
#ck-button label span {
text-align:center;
padding:3px;
display:block;
background-color:#FFFFFF;
color:#2D96FA;
border:1px solid #2D96FA;
font-family: "Roboto";
font-weight: bold;
}
#ck-button label input {
position:absolute;
top:-20px;
}
#ck-button input:hover + span {
background-color:#E3E9EB;
color:#2D96FA;
border:1px solid #2D96FA;
}
#ck-button input:checked + span {
background-color:#E8E0E0;
color:#8D8889;
border:1px solid #8D8889;
}
#ck-button input:checked:hover + span {
background-color:#E3E9EB;
color:#8D8889;
border:1px solid #8D8889;
}
button, input, select, textarea {
line-height: inherit;
font-family: "BrandonGrotesqueReg";
......
ippisite/ippidb/static/images/Buttons/CytotoxButtOff.png

7.37 KiB

ippisite/ippidb/static/images/Buttons/CytotoxButtOn.png

7.23 KiB

ippisite/ippidb/static/images/Buttons/InSilicoButtOff.png

6.34 KiB

ippisite/ippidb/static/images/Buttons/InSilicoButtOn.png

6.24 KiB

......@@ -31,7 +31,33 @@ Please check that the information below is correct (Title, Authors etc. ) and an
{{ form }}
{% endfor %}
{% else %}
{{ wizard.form }}
<div id="ck-button">{{ wizard.form.source.label }} {{ wizard.form.source }}</div>
<div id="ck-button">{{ wizard.form.id_source.label }} {{ wizard.form.id_source }}</div>
<div id="ck-button">{{ wizard.form.title.label }} {{ wizard.form.title }}</div>
<div id="ck-button">{{ wizard.form.journal_name.label }} {{ wizard.form.journal_name }}</div>
<div id="ck-button">
<label>
<input type="checkbox" value="True"><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 %}
......
......@@ -14,6 +14,8 @@
</nav>
<div id="Form">
<div class="step_desc">
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "first step" %}</button>
<p>Step {{ wizard.steps.step1 }} of {{ wizard.steps.count }}</p>
<p> Please provide a valid ID for your bibliographic source, either a PubMed ID or WIPO ID. This ID should correspond to a bibliographic source in its final format. Therefore, PubMed articles in « Just Accepted » format should not be used as a source of data as they are not considered the official version of record. </p>
</div>
<form action="" method="post">
......@@ -30,7 +32,7 @@
{{ form }}
{% endfor %}
{% else %}
{{ wizard.form }}
{{ wizard.form}}
{% endif %}
</table>
<input type="submit" value="{% trans "Next step" %}"/>
......
......@@ -3,6 +3,7 @@ from . import views
from ippidb.forms import IdForm, BibliographyForm,PDBForm,ProteinDomainComplexTypeForm,ProteinDomainComplexForm,PpiForm
from ippidb.views import IppiWizard,FORMS
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^about$', views.about, name='about'),
......
import ippidb
from django.shortcuts import render
from django.http import HttpResponseRedirect
from formtools.wizard.views import SessionWizardView
from formtools.wizard.views import SessionWizardView,NamedUrlSessionWizardView
from .forms import IdForm, BibliographyForm, PDBForm, ProteinForm, ProteinDomainComplexTypeForm, ProteinDomainComplexForm, PpiForm
def index(request):
......
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