From d24afba75c28753ddb9c6060697f11a7d1455bc8 Mon Sep 17 00:00:00 2001 From: Brandon Dyck Date: Wed, 29 May 2019 20:01:37 -0600 Subject: [PATCH] Added formmethod attribute helper --- CHANGELOG.md | 17 ++++++++++++++--- attribute/generated.go | 8 ++++++++ defs.json | 1 + 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f43a596..6f010b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [unreleased] + +- `attribute.Formmethod` helper function + +### Changed + +- Formatted code identifiers in Changelog + ## [0.0.4] - 2019-05-27 ### Added @@ -9,22 +17,25 @@ ### Changed - Element and attribute specs can define custom function doc comments. -- element.A and attribute.Accept specs have comments. +- `element.A` and `attribute.Accept` specs have comments. ## [0.0.3] - 2019-05-11 ### Added + - Benchmark against `html/template` ## [0.0.2] - 2019-04-28 ### Added + - Changelog - `hatmill.Terms` type for representing lists of nodes ### Changed -- Attrib.WriteTo replaces special characters in Value with HTML entities. -- Text.WriteTo replaces special characters with HTML entities. + +- `Attrib.WriteTo` replaces special characters in `Value` with HTML entities. +- `Text.WriteTo` replaces special characters with HTML entities. ## [0.0.1] - 2019-04-28 diff --git a/attribute/generated.go b/attribute/generated.go index a505102..a7f92a8 100644 --- a/attribute/generated.go +++ b/attribute/generated.go @@ -270,6 +270,14 @@ func Formaction(value string) hatmill.Attrib { } } +// Formmethod creates a "formmethod" attribute +func Formmethod(value string) hatmill.Attrib { + return hatmill.Attrib{ + Key: "formmethod", + Value: value, + } +} + // Headers creates a "headers" attribute func Headers(value string) hatmill.Attrib { return hatmill.Attrib{ diff --git a/defs.json b/defs.json index 65d5568..e5ea8dc 100644 --- a/defs.json +++ b/defs.json @@ -34,6 +34,7 @@ {"name": "for", "type": "string"}, {"name": "form", "type": "string"}, {"name": "formaction", "type": "string"}, + {"name": "formmethod", "type": "string"}, {"name": "headers", "type": "string"}, {"name": "height", "type": "int"}, {"name": "hidden", "type": "bool"},