Not passed class and placeholder to template rendering.
authorAndrea Zagli <azagli@libero.it>
Wed, 27 Sep 2023 14:59:50 +0000 (16:59 +0200)
committerAndrea Zagli <azagli@libero.it>
Wed, 27 Sep 2023 14:59:50 +0000 (16:59 +0200)
src/fields.rs

index be1f9cabfcd644fd951a5c76962f5eb5a3b8c024..d0332554c5bca85a7acbefe98bd2d5114404a7f0 100644 (file)
@@ -197,6 +197,8 @@ impl TField for FieldText {
                context.insert("disabled", &self.field.disabled);
                context.insert("invisible", &self.field.invisible);
                context.insert("help", &self.field.help);
+               context.insert("class", &self.field.class);
+               context.insert("placeholder", &self.placeholder);
                context.insert("value", &self.field.value);
                s.push_str(self.field.tmpl.render("field", &context).unwrap().as_str());
 
@@ -370,6 +372,7 @@ impl TField for FieldTextArea {
                context.insert("disabled", &self.field.disabled);
                context.insert("invisible", &self.field.invisible);
                context.insert("help", &self.field.help);
+               context.insert("class", &self.field.class);
                context.insert("value", &self.field.value);
                s.push_str(self.field.tmpl.render("field", &context).unwrap().as_str());
 
@@ -549,6 +552,7 @@ impl TField for FieldRadio {
                context.insert("disabled", &self.field.disabled);
                context.insert("invisible", &self.field.invisible);
                context.insert("help", &self.field.help);
+               context.insert("class", &self.field.class);
                context.insert("value", &self.field.value);
                context.insert("options", &self.options);
                s.push_str(self.field.tmpl.render("field", &context).unwrap().as_str());
@@ -758,6 +762,7 @@ impl TField for FieldSelect {
                context.insert("disabled", &self.field.disabled);
                context.insert("invisible", &self.field.invisible);
                context.insert("help", &self.field.help);
+               context.insert("class", &self.field.class);
                context.insert("value", &self.field.value);
                context.insert("options", &self.options);
                s.push_str(self.field.tmpl.render("field", &context).unwrap().as_str());
@@ -932,6 +937,7 @@ impl TField for FieldCheck {
                context.insert("disabled", &self.field.disabled);
                context.insert("invisible", &self.field.invisible);
                context.insert("help", &self.field.help);
+               context.insert("class", &self.field.class);
                context.insert("value", &self.field.value);
                s.push_str(self.field.tmpl.render("field", &context).unwrap().as_str());
 
@@ -1086,6 +1092,7 @@ impl TField for FieldButton {
                context.insert("disabled", &self.field.disabled);
                context.insert("invisible", &self.field.invisible);
                context.insert("help", &self.field.help);
+               context.insert("class", &self.field.class);
                context.insert("value", &self.field.value);
                context.insert("form", &self.form);
                s.push_str(self.field.tmpl.render("field", &context).unwrap().as_str());