mirror of https://github.com/interlegis/sapl.git
3 changed files with 45 additions and 18 deletions
@ -1,29 +1,50 @@ |
|||||
{% extends "crud/detail.html" %} |
{% extends "crud/detail.html" %} |
||||
{% load i18n %} |
{% load i18n %} |
||||
{% load crispy_forms_tags %} |
{% load crispy_forms_tags %} |
||||
|
{% load common_tags %} |
||||
|
|
||||
{% block detail_content %} |
{% block detail_content %} |
||||
|
|
||||
<form method="post"> |
{% if perms|get_add_perm:view %} |
||||
{% csrf_token %} |
<form method="post"> |
||||
|
{% csrf_token %} |
||||
|
|
||||
|
{% for e in expedientes %} |
||||
|
<fieldset class="form-group"> |
||||
|
<legend>{{e.tipo}}</legend> |
||||
|
<input type="hidden" name="tipo" id="tipo" value="{{e.tipo.id}}" class="form-control"/> |
||||
|
<textarea rows="5" cols="50" name="conteudo" id="conteudo" class="form-control">{{e.conteudo}}</textarea> |
||||
|
<br /> |
||||
|
</fieldset> |
||||
|
{% endfor %} |
||||
|
|
||||
|
<br /> |
||||
|
<input type="submit" value="Salvar" class="btn btn-primary"/> |
||||
|
</form> |
||||
|
|
||||
|
{% else %} |
||||
|
|
||||
{% for e in expedientes %} |
{% for e in expedientes %} |
||||
<fieldset class="form-group"> |
<fieldset class="form-group"> |
||||
<legend>{{e.tipo}}</legend> |
<legend>{{e.tipo}}</legend> |
||||
<input type="hidden" name="tipo" id="tipo" value="{{e.tipo.id}}" class="form-control"/> |
<textarea rows="5" cols="50" name="conteudo" id="conteudo" class="form-control">{{e.conteudo}}</textarea> |
||||
<textarea rows="5" cols="50" name="conteudo" id="conteudo" class="form-control">{{e.conteudo}}</textarea> |
<br /> |
||||
<br /> |
</fieldset> |
||||
</fieldset> |
|
||||
{% endfor %} |
{% endfor %} |
||||
|
|
||||
<br /> |
{% endif %} |
||||
<input type="submit" value="Salvar" class="btn btn-primary"/> |
|
||||
</form> |
|
||||
|
|
||||
{% endblock detail_content %} |
{% endblock detail_content %} |
||||
<!-- Texto RICO --> |
<!-- Texto RICO --> |
||||
{% block extra_js %} |
{% block extra_js %} |
||||
<script language="JavaScript"> |
{% if perms|get_add_perm:view %} |
||||
initTinymce(null); |
<script language="JavaScript"> |
||||
</script> |
initTinymce(null); |
||||
|
</script> |
||||
|
<!-- Se nao tiver permissao, o texto rico fica readonly --> |
||||
|
{% else %} |
||||
|
<script language="JavaScript"> |
||||
|
initTinymce(null, true); |
||||
|
</script> |
||||
|
{% endif %} |
||||
{% endblock %} |
{% endblock %} |
||||
|
Loading…
Reference in new issue