]> saetta.ns0.it Git - rust/zakform/commitdiff
Taking into account value for buttons.
authorAndrea Zagli <azagli@libero.it>
Tue, 11 Nov 2025 10:59:34 +0000 (11:59 +0100)
committerAndrea Zagli <azagli@libero.it>
Tue, 11 Nov 2025 10:59:34 +0000 (11:59 +0100)
src/fields.rs

index e3f691a32e18aa512b3d97ae6e262bab894aef1e..885921276ea82b4b7ffdddeac190e2cd69b6c1a9 100644 (file)
@@ -1281,7 +1281,7 @@ impl FieldButton {
                f.field.to_render = true;
 
                match f.field.tmpl.add_raw_template("field", r#"<button class="btn{% if class %} {{ class }}{% endif %}" type="submit" name="{{ name }}" id="{{ name }}"
-{% if form %}form="{{ form }}"{% endif %}>{{ label }}</button>"#) {
+{% if form %}form="{{ form }}"{% endif %} {% if value %} value="{{ value | replace(from='"', to="&quot;") }}" {% endif %}>{{ label }}</button>"#) {
 Err(e) => { println!("{:?}", e) },
 _ => {},
 };