chore(nix-pkgs): update to solve django-bulma-forms bug
This commit is contained in:
parent
5220802641
commit
33b158b59f
4 changed files with 6 additions and 76 deletions
|
@ -1,68 +0,0 @@
|
|||
From 43431d9fe3e04903e0df790de0a5e3b828c161ff Mon Sep 17 00:00:00 2001
|
||||
From: catvayor <catvayor@katvayor.net>
|
||||
Date: Thu, 27 Mar 2025 22:59:36 +0100
|
||||
Subject: [PATCH] feat(templates): Support CheckboxSelectMultiple widget
|
||||
|
||||
---
|
||||
src/bulma/templates/bulma/field.html | 2 ++
|
||||
.../templates/bulma/multiple_checkbox.html | 17 +++++++++++++++++
|
||||
src/bulma/templates/bulma/other.html | 7 ++++---
|
||||
3 files changed, 23 insertions(+), 3 deletions(-)
|
||||
create mode 100644 src/bulma/templates/bulma/multiple_checkbox.html
|
||||
|
||||
diff --git a/src/bulma/templates/bulma/field.html b/src/bulma/templates/bulma/field.html
|
||||
index a532fab..7c120e2 100644
|
||||
--- a/src/bulma/templates/bulma/field.html
|
||||
+++ b/src/bulma/templates/bulma/field.html
|
||||
@@ -2,6 +2,8 @@
|
||||
<div class="field">
|
||||
{% if field|is_checkbox %}
|
||||
{% include "bulma/checkbox.html" %}
|
||||
+ {% elif field|is_multiple_checkbox %}
|
||||
+ {% include "bulma/multiple_checkbox.html" %}
|
||||
{% elif field|is_radio %}
|
||||
{% include "bulma/radio.html" %}
|
||||
{% elif field|is_input %}
|
||||
diff --git a/src/bulma/templates/bulma/multiple_checkbox.html b/src/bulma/templates/bulma/multiple_checkbox.html
|
||||
new file mode 100644
|
||||
index 0000000..61c9337
|
||||
--- /dev/null
|
||||
+++ b/src/bulma/templates/bulma/multiple_checkbox.html
|
||||
@@ -0,0 +1,17 @@
|
||||
+{% if field.auto_id %}
|
||||
+ <label class="label {% if field.field.required %}{{ form.required_css_class }}{% endif %}">
|
||||
+ {{ field.label_tag }}
|
||||
+ </label>
|
||||
+{% endif %}
|
||||
+<div class="control">
|
||||
+ <div class="checkboxes">
|
||||
+ {% for choice in field %}
|
||||
+ <label class="checkbox">
|
||||
+ {{ choice.tag }}
|
||||
+ {{ choice.choice_label }}
|
||||
+ </label>
|
||||
+ {% endfor %}
|
||||
+ </div>
|
||||
+ {% for error in field.errors %}<span class="help is-danger {{ form.error_css_class }}">{{ error }}</span>{% endfor %}
|
||||
+ {% if field.help_text %}<p class="help">{{ field.help_text|safe }}</p>{% endif %}
|
||||
+</div>
|
||||
diff --git a/src/bulma/templates/bulma/other.html b/src/bulma/templates/bulma/other.html
|
||||
index 119db9f..28b5f64 100644
|
||||
--- a/src/bulma/templates/bulma/other.html
|
||||
+++ b/src/bulma/templates/bulma/other.html
|
||||
@@ -1,8 +1,9 @@
|
||||
{% if field.auto_id %}
|
||||
-<label class="label {% if field.field.required %}{{ form.required_css_class }}{% endif %}" for="{{ field.auto_id }}">{{
|
||||
- field.label }}</label>
|
||||
+<label class="label {% if field.field.required %}{{ form.required_css_class }}{% endif %}" for="{{ field.auto_id }}">
|
||||
+ {{ field.label }}
|
||||
+</label>
|
||||
{% endif %}
|
||||
-<div class="control {% if field|is_multiple_checkbox %}multiple-checkbox{% endif %}">
|
||||
+<div class="control">
|
||||
{{ field }}
|
||||
{% for error in field.errors %}<span class="help is-danger {{ form.error_css_class }}">{{ error }}</span>{% endfor %}
|
||||
{% if field.help_text %}<p class="help">{{ field.help_text|safe }}</p>{% endif %}
|
||||
--
|
||||
2.48.1
|
||||
|
|
@ -15,12 +15,12 @@
|
|||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "Git",
|
||||
"url": "https://git.hubrecht.ovh/hubrecht/nix-pkgs"
|
||||
"url": "https://git.hubrecht.ovh/hubrecht/nix-pkgs.git"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "ac4ff5a34789ae3398aff9501735b67b6a5a285a",
|
||||
"branch": "dgnum",
|
||||
"revision": "7a0e2e660b26ddd67bb8132beb6b13e3a69003a4",
|
||||
"url": null,
|
||||
"hash": "16n37f74p6h30hhid98vab9w5b08xqj4qcshz2kc1jh67z5n49p6"
|
||||
"hash": "0xx18q7rifpjq00mghqp280y61biyq5cvnyw6wbwa1zg4iywpv6n"
|
||||
},
|
||||
"nixpkgs": {
|
||||
"type": "Channel",
|
||||
|
|
|
@ -5,6 +5,7 @@ channels==3.0.5
|
|||
configparser==7.1.0
|
||||
django-autocomplete-light==3.11.0
|
||||
django-bootstrap-form==3.4
|
||||
django-bulma-forms==0.1.7
|
||||
django-cas-ng==5.0.1
|
||||
django-cors-headers==4.6.0
|
||||
django-djconfig==0.11.0
|
||||
|
|
|
@ -12,6 +12,7 @@ let
|
|||
inherit (nix-pkgs)
|
||||
authens
|
||||
django-bootstrap-form
|
||||
django-bulma-forms
|
||||
django-cas-ng
|
||||
loadcredential
|
||||
;
|
||||
|
@ -22,10 +23,6 @@ let
|
|||
wagtail-modeltranslation
|
||||
wagtailmenus
|
||||
;
|
||||
|
||||
django-bulma-forms = nix-pkgs.django-bulma-forms.overrideAttrs (o: {
|
||||
patches = o.patches or [ ] ++ [ ./bulma_fix.patch ];
|
||||
});
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue