mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-26 10:23:10 -04:00
forms: always include required and disabled fields
This commit is contained in:
@@ -72,15 +72,11 @@ pub const FormField = struct {
|
||||
try jw.write(v);
|
||||
}
|
||||
|
||||
if (self.required) {
|
||||
try jw.objectField("required");
|
||||
try jw.write(true);
|
||||
}
|
||||
try jw.objectField("required");
|
||||
try jw.write(self.required);
|
||||
|
||||
if (self.disabled) {
|
||||
try jw.objectField("disabled");
|
||||
try jw.write(true);
|
||||
}
|
||||
try jw.objectField("disabled");
|
||||
try jw.write(self.disabled);
|
||||
|
||||
if (self.value) |v| {
|
||||
try jw.objectField("value");
|
||||
|
||||
Reference in New Issue
Block a user