From 62ee0595346e5254c10083e43346be40dbb96d70 Mon Sep 17 00:00:00 2001 From: Sean Fridman Date: Wed, 8 Apr 2015 23:43:35 -0400 Subject: Properly handle and display form errors --- themes/okadmin/templates/partials/errors.liquid | 10 ++++++++++ themes/okadmin/templates/resource.liquid | 2 ++ themes/okadmin/templates/resource_new.liquid | 2 ++ 3 files changed, 14 insertions(+) create mode 100644 themes/okadmin/templates/partials/errors.liquid (limited to 'themes/okadmin') diff --git a/themes/okadmin/templates/partials/errors.liquid b/themes/okadmin/templates/partials/errors.liquid new file mode 100644 index 0000000..cdb0b25 --- /dev/null +++ b/themes/okadmin/templates/partials/errors.liquid @@ -0,0 +1,10 @@ +
+ {% for error in errors %} +
+
{{error.message}}
+
+ Expected {{error.expected}} but got {{error.actual}} +
+
+ {% endfor %} +
diff --git a/themes/okadmin/templates/resource.liquid b/themes/okadmin/templates/resource.liquid index 26d62f2..49ccc7c 100644 --- a/themes/okadmin/templates/resource.liquid +++ b/themes/okadmin/templates/resource.liquid @@ -1,5 +1,7 @@ {% include 'partials/head' %} +{% include 'partials/errors' %} + diff --git a/themes/okadmin/templates/resource_new.liquid b/themes/okadmin/templates/resource_new.liquid index 400d670..c57dd83 100644 --- a/themes/okadmin/templates/resource_new.liquid +++ b/themes/okadmin/templates/resource_new.liquid @@ -1,5 +1,7 @@ {% include 'partials/head' %} +{% include 'partials/errors' %} + -- cgit v1.2.3-70-g09d2