Browse Source

Indenta foto com restante dos campos

pull/271/head
Eduardo Edson Batista Cordeiro Alves 9 years ago
parent
commit
bee6414744
  1. 11
      base/forms.py
  2. 23
      parlamentares/forms.py

11
base/forms.py

@ -36,6 +36,7 @@ class CasaLegislativaTabelaAuxForm(ModelForm):
'cep': forms.TextInput(attrs={'class': 'cep'}),
'telefone': forms.TextInput(attrs={'class': 'telefone'}),
'fax': forms.TextInput(attrs={'class': 'telefone'}),
'logotipo': forms.FileInput,
'informacao_geral': forms.Textarea(
attrs={'id': 'casa-informacoes'})
}
@ -87,16 +88,18 @@ class CasaLegislativaTabelaAuxForm(ModelForm):
row3,
row4,
row5,
HTML("""{% if form.logotipo.value %}
HTML("""<div class="col-md-12">
{% if form.logotipo.value %}
<img class="img-responsive" width="225" height="300"
src="{{ MEDIA_URL }}{{ form.logotipo.value }}">
<br /><br />
<br />
<input type="submit"
name="remover"
id="remover"
class="button primary"
class="btn btn-warning"
value="Remover Logo"/>
{% endif %}""", ),
{% endif %}
</div>"""),
row6,
row7,
row8,

23
parlamentares/forms.py

@ -131,16 +131,19 @@ class ParlamentaresForm (ModelForm):
row1, row2, row3, row4, row5,
row6, row7, row8, row9, row10,
row11, row12, row13,
HTML("""{% if form.fotografia.value %}
<img class="img-responsive" width="225" height="300"
src="{{ MEDIA_URL }}{{ form.fotografia.value }}">
<br /><br />
<input type="submit"
name="remover"
id="remover"
class="btn btn-warning"
value="Remover Foto"/>
{% endif %}""", ),
HTML("""<div class="col-md-12">
{% if form.fotografia.value %}
<img class="img-responsive"
width="225" height="300"
src="{{MEDIA_URL}}{{form.fotografia.value}}">
<br />
<input type="submit"
name="remover"
id="remover"
class="btn btn-warning"
value="Remover Foto"/>
{% endif %}
</div>""", ),
row14,
form_actions())

Loading…
Cancel
Save