aboutsummaryrefslogtreecommitdiff
path: root/mod/page.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-05-16 23:27:53 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-05-19 11:44:48 +0300
commit4718a059f842a791c89a1922996bb8f1dbea8f65 (patch)
treea6dcc621f8287d444a699355f89b4a383eafd283 /mod/page.hxx
parente2264d6c34de011753913dd9b447b3d38649619c (diff)
Add filter form to builds page
Diffstat (limited to 'mod/page.hxx')
-rw-r--r--mod/page.hxx49
1 files changed, 49 insertions, 0 deletions
diff --git a/mod/page.hxx b/mod/page.hxx
index 6d18f36..d7c44d6 100644
--- a/mod/page.hxx
+++ b/mod/page.hxx
@@ -108,6 +108,55 @@ namespace brep
const string& value_;
};
+ // Generates table row element, that has the 'label: <input type="text"/>'
+ // layout.
+ //
+ class TR_INPUT
+ {
+ public:
+ TR_INPUT (const string& l,
+ const string& n,
+ const string& v,
+ const string& p = string (),
+ bool a = false)
+ : label_ (l), name_ (n), value_ (v), placeholder_ (p), autofocus_ (a)
+ {
+ }
+
+ void
+ operator() (xml::serializer&) const;
+
+ private:
+ const string& label_;
+ const string& name_;
+ const string& value_;
+ const string& placeholder_;
+ bool autofocus_;
+ };
+
+ // Generates table row element, that has the 'label: <select></select>'
+ // layout. Option elements are represented as a list of value/inner-text
+ // pairs.
+ //
+ class TR_SELECT
+ {
+ public:
+ TR_SELECT (const string& l,
+ const string& n,
+ const string& v,
+ const vector<pair<string, string>>& o)
+ : label_ (l), name_ (n), value_ (v), options_ (o) {}
+
+ void
+ operator() (xml::serializer&) const;
+
+ private:
+ const string& label_;
+ const string& name_;
+ const string& value_;
+ const vector<pair<string, string>>& options_;
+ };
+
// Generates package name element.
//
class TR_NAME