-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(admin_tenders): Rediriger vers la section structures après la va…
…lidation des DDB (#1111) * add id html to Django admin template * redirect to structures after save * add comment to explain
- Loading branch information
1 parent
5880917
commit e29a3d4
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{% comment %} | ||
This page is an enhanced version of the original template found at | ||
https://github.com/django/django/blob/main/django/contrib/admin/templates/admin/includes/fieldset.html. | ||
We've updated it to include unique IDs for section titles, enabling direct navigation to specific sections. | ||
This modification makes it easier for users to quickly find the information they need by allowing direct links to jump to different parts of the page. | ||
{% endcomment %} | ||
<fieldset class="module aligned {{ fieldset.classes }}"> | ||
{% if fieldset.name %}<h2 id="{{fieldset.name|slugify}}">{{ fieldset.name }}</h2>{% endif %} | ||
{% if fieldset.description %} | ||
<div class="description">{{ fieldset.description|safe }}</div> | ||
|
||
{% endif %} | ||
{% for line in fieldset %} | ||
<div class="form-row{% if line.fields|length == 1 and line.errors %} errors{% endif %}{% if not line.has_visible_field %} hidden{% endif %}{% for field in line %}{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% endfor %}"> | ||
{% if line.fields|length == 1 %}{{ line.errors }}{% else %}<div class="flex-container form-multiline">{% endif %} | ||
{% for field in line %} | ||
<div> | ||
{% if not line.fields|length == 1 and not field.is_readonly %}{{ field.errors }}{% endif %} | ||
<div class="flex-container{% if not line.fields|length == 1 %} fieldBox{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}{% elif field.is_checkbox %} checkbox-row{% endif %}"> | ||
{% if field.is_checkbox %} | ||
{{ field.field }}{{ field.label_tag }} | ||
{% else %} | ||
{{ field.label_tag }} | ||
{% if field.is_readonly %} | ||
<div class="readonly">{{ field.contents }}</div> | ||
{% else %} | ||
{{ field.field }} | ||
{% endif %} | ||
{% endif %} | ||
</div> | ||
{% if field.field.help_text %} | ||
<div class="help"{% if field.field.id_for_label %} id="{{ field.field.id_for_label }}_helptext"{% endif %}> | ||
<div>{{ field.field.help_text|safe }}</div> | ||
</div> | ||
{% endif %} | ||
</div> | ||
{% endfor %} | ||
{% if not line.fields|length == 1 %}</div>{% endif %} | ||
</div> | ||
{% endfor %} | ||
</fieldset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters