-
Notifications
You must be signed in to change notification settings - Fork 0
/
amelinium.web.taggers.html
37 lines (37 loc) · 39.3 KB
/
amelinium.web.taggers.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>amelinium.web.taggers documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script><link rel="stylesheet" type="text/css" href="css/randomseed.css" /></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Amelinium</span> <span class="project-version">1.0.1</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="10_introduction.html"><div class="inner"><span>Introduction</span></div></a></li><li class="depth-1 "><a href="20_hypermedia.html"><div class="inner"><span>Hypermedia-driven</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><a href="amelinium.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>amelinium</span></div></a></li><li class="depth-2 branch"><a href="amelinium.admin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>admin</span></div></a></li><li class="depth-2"><a href="amelinium.api.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>api</span></div></a></li><li class="depth-3"><a href="amelinium.api.controller.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>controller</span></div></a></li><li class="depth-4"><a href="amelinium.api.controller.user.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>user</span></div></a></li><li class="depth-3"><a href="amelinium.api.url.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>url</span></div></a></li><li class="depth-2 branch"><a href="amelinium.app.html"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>app</span></div></a></li><li class="depth-2"><a href="amelinium.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>algo</span></div></div></li><li class="depth-4 branch"><a href="amelinium.auth.algo.append.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>append</span></div></a></li><li class="depth-4 branch"><a href="amelinium.auth.algo.fail.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fail</span></div></a></li><li class="depth-4 branch"><a href="amelinium.auth.algo.pbkdf2.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pbkdf2</span></div></a></li><li class="depth-4"><a href="amelinium.auth.algo.scrypt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scrypt</span></div></a></li><li class="depth-3 branch"><a href="amelinium.auth.pwd.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>pwd</span></div></a></li><li class="depth-3"><a href="amelinium.auth.specs.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>specs</span></div></a></li><li class="depth-2"><a href="amelinium.common.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>common</span></div></a></li><li class="depth-3 branch"><a href="amelinium.common.controller.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>controller</span></div></a></li><li class="depth-3"><a href="amelinium.common.oplog.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>oplog</span></div></a></li><li class="depth-4"><a href="amelinium.common.oplog.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3 branch"><a href="amelinium.common.populators.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>populators</span></div></a></li><li class="depth-3"><a href="amelinium.common.swagger.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swagger</span></div></a></li><li class="depth-2 branch"><a href="amelinium.core.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="amelinium.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-3"><a href="amelinium.db.sql.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sql</span></div></a></li><li class="depth-2 branch"><a href="amelinium.errors.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>errors</span></div></a></li><li class="depth-2"><a href="amelinium.http.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>http</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>client</span></div></div></li><li class="depth-4"><a href="amelinium.http.client.twilio.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twilio</span></div></a></li><li class="depth-3 branch"><a href="amelinium.http.handler.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>handler</span></div></a></li><li class="depth-3"><a href="amelinium.http.middleware.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>middleware</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.coercion.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>coercion</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.content.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>content</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.debug.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>debug</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.format.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>format</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.headers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>headers</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.language.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>language</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.lazy-req.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy-req</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.populators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>populators</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.remote-ip.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>remote-ip</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.roles.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>roles</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.session.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>session</span></div></a></li><li class="depth-4"><a href="amelinium.http.middleware.validators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validators</span></div></a></li><li class="depth-3 branch"><a href="amelinium.http.router.html"><div class="inner"><span class="tree" style="top: -424px;"><span class="top" style="height: 433px;"></span><span class="bottom"></span></span><span>router</span></div></a></li><li class="depth-3"><a href="amelinium.http.server.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>server</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.server.jetty.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>jetty</span></div></a></li><li class="depth-4"><a href="amelinium.http.server.undertow.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>undertow</span></div></a></li><li class="depth-2"><a href="amelinium.i18n.html"><div class="inner"><span class="tree" style="top: -672px;"><span class="top" style="height: 681px;"></span><span class="bottom"></span></span><span>i18n</span></div></a></li><li class="depth-3"><a href="amelinium.i18n.pluralizers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pluralizers</span></div></a></li><li class="depth-2 branch"><a href="amelinium.identity.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-2 branch"><a href="amelinium.locale.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>locale</span></div></a></li><li class="depth-2 branch"><a href="amelinium.logging.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>logging</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>model</span></div></div></li><li class="depth-3 branch"><a href="amelinium.model.confirmation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>confirmation</span></div></a></li><li class="depth-3"><a href="amelinium.model.user.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>user</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>proto</span></div></div></li><li class="depth-3 branch"><a href="amelinium.proto.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3 branch"><a href="amelinium.proto.errors.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>errors</span></div></a></li><li class="depth-3 branch"><a href="amelinium.proto.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="amelinium.proto.session.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>session</span></div></a></li><li class="depth-3"><a href="amelinium.proto.twilio.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twilio</span></div></a></li><li class="depth-2 branch"><a href="amelinium.schemas.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>schemas</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>server</span></div></div></li><li class="depth-3"><a href="amelinium.server.ssl.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ssl</span></div></a></li><li class="depth-2 branch"><a href="amelinium.system.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>system</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></div></li><li class="depth-3 branch"><a href="amelinium.types.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.errors.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>errors</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.session.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>session</span></div></a></li><li class="depth-3"><a href="amelinium.types.twilio.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twilio</span></div></a></li><li class="depth-2 branch"><a href="amelinium.utils.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-2"><a href="amelinium.web.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>web</span></div></a></li><li class="depth-3"><a href="amelinium.web.controller.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>controller</span></div></a></li><li class="depth-4 branch"><a href="amelinium.web.controller.admin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>admin</span></div></a></li><li class="depth-4"><a href="amelinium.web.controller.user.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>user</span></div></a></li><li class="depth-3 branch"><a href="amelinium.web.js.html"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>js</span></div></a></li><li class="depth-3 branch current"><a href="amelinium.web.taggers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>taggers</span></div></a></li><li class="depth-3"><a href="amelinium.web.url.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>url</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="amelinium.web.taggers.html#var-ad-hoc-id"><div class="inner"><span>ad-hoc-id</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-add-taggers"><div class="inner"><span>add-taggers</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-anti-spam-code"><div class="inner"><span>anti-spam-code</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-args-.3Emap"><div class="inner"><span>args->map</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-assignments-.3Ekw-map"><div class="inner"><span>assignments->kw-map</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-assignments-.3Emap"><div class="inner"><span>assignments->map</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-form-field"><div class="inner"><span>form-field</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-form-fields"><div class="inner"><span>form-fields</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-form-submit"><div class="inner"><span>form-submit</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-form-submit-session"><div class="inner"><span>form-submit-session</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-get-field-value"><div class="inner"><span>get-field-value</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-get-form-action"><div class="inner"><span>get-form-action</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-get-lang"><div class="inner"><span>get-lang</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-get-lang-id"><div class="inner"><span>get-lang-id</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-html-add-attrs"><div class="inner"><span>html-add-attrs</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-html-esc"><div class="inner"><span>html-esc</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-init"><div class="inner"><span>init</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-kw-param.3F"><div class="inner"><span>kw-param?</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-lang-url"><div class="inner"><span>lang-url</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-last-char"><div class="inner"><span>last-char</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-param-try-tr"><div class="inner"><span>param-try-tr</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-parse-args"><div class="inner"><span>parse-args</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-parse-assigments"><div class="inner"><span>parse-assigments</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-render-assignment-value"><div class="inner"><span>render-assignment-value</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-tr"><div class="inner"><span>tr</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-tr-sub"><div class="inner"><span>tr-sub</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-translator"><div class="inner"><span>translator</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-translator-sub"><div class="inner"><span>translator-sub</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-url-enc"><div class="inner"><span>url-enc</span></div></a></li><li class="depth-1"><a href="amelinium.web.taggers.html#var-url-esc"><div class="inner"><span>url-esc</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">amelinium.web.taggers</h1><h4 class="added">added in 1.0.0</h4><div class="doc"><div class="markdown"><p>amelinium service, Selmer taggers.</p>
</div></div><div class="public anchor" id="var-ad-hoc-id"><h3>ad-hoc-id</h3><div class="usage"><code>(ad-hoc-id a)</code><code>(ad-hoc-id a b)</code><code>(ad-hoc-id a b c)</code><code>(ad-hoc-id a b c d)</code><code>(ad-hoc-id a b c d e)</code><code>(ad-hoc-id a b c d e & more)</code></div><div class="doc"><div class="markdown"><p>Generates ad-hoc ID (a numeric string) on a basis of values passed as arguments.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L207">view source</a></div></div><div class="public anchor" id="var-add-taggers"><h3>add-taggers</h3><div class="usage"><code>(add-taggers router language translations-fn validators js-config)</code></div><div class="doc"><div class="markdown"><p>Registers taggers in a global repository. To be changed to a pure fn some day.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L546">view source</a></div></div><div class="public anchor" id="var-anti-spam-code"><h3>anti-spam-code</h3><div class="usage"><code>(anti-spam-code config)</code><code>(anti-spam-code config num)</code><code>(anti-spam-code config num rng)</code></div><div class="doc"><div class="markdown"><p>Generates anti-spam HTML string containing randomly selected fields and values using <code>validators/gen-required</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L180">view source</a></div></div><div class="public anchor" id="var-args-.3Emap"><h3>args->map</h3><div class="usage"><code>(args->map args)</code></div><div class="doc"><div class="markdown"><p>Transforms the given sequence of arguments <code>args</code> to a map by taking each consecutive pair and changing its first element into a keyword (using <code>amelinium.utils/keyword-from-param</code>) to become a key associated with its paired value.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L167">view source</a></div></div><div class="public anchor" id="var-assignments-.3Ekw-map"><h3>assignments->kw-map</h3><div class="usage"><code>(assignments->kw-map s ctx)</code><code>(assignments->kw-map s)</code></div><div class="doc"><div class="markdown"><p>Parses a string <code>s</code> with key=value assignments and returns a map with keys as keywords. Variables are resolved if they have <code>[[</code> and <code>]]</code> around.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L148">view source</a></div></div><div class="public anchor" id="var-assignments-.3Emap"><h3>assignments->map</h3><div class="usage"><code>(assignments->map s ctx)</code><code>(assignments->map s)</code></div><div class="doc"><div class="markdown"><p>Parses a string <code>s</code> with key=value assignments and returns a map with keys as strings. Variables are resolved if they have <code>[[</code> and <code>]]</code> around.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L132">view source</a></div></div><div class="public anchor" id="var-form-field"><h3>form-field</h3><div class="usage"><code>(form-field args tr-sub errors params)</code><code>(form-field args tr-sub errors params props)</code></div><div class="doc"><div class="markdown"><p>Helper to generate HTML for the <code>form-field</code> tag.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L404">view source</a></div></div><div class="public anchor" id="var-form-fields"><h3>form-fields</h3><div class="usage"><code>(form-fields args tr-sub errors params)</code></div><div class="doc"><div class="markdown"><p>Helper to generate HTML for the <code>form-fields</code> tag.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L480">view source</a></div></div><div class="public anchor" id="var-form-submit"><h3>form-submit</h3><div class="usage"><code>(form-submit label args tr-sub validators)</code><code>(form-submit label args tr-sub validators html)</code></div><div class="doc"><div class="markdown"><p>Helper to generate HTML for the <code>form-submit</code> tag.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L506">view source</a></div></div><div class="public anchor" id="var-form-submit-session"><h3>form-submit-session</h3><div class="usage"><code>(form-submit-session label args tr-sub session-field session-id validators)</code><code>(form-submit-session label args tr-sub session-field session-id validators html)</code></div><div class="doc"><div class="markdown"><p>Helper to generate HTML for the <code>form-submit</code> tag.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L488">view source</a></div></div><div class="public anchor" id="var-get-field-value"><h3>get-field-value</h3><div class="usage"><code>(get-field-value ctx v)</code></div><div class="doc"><div class="markdown"><p>Retrieves value of a field <code>v</code> from <code>:params</code> map of <code>:form/errors</code> key of the given <code>ctx</code> map. If there is no entry or value is <code>nil</code> or <code>false</code>, it looks it up directly in <code>ctx</code>. Returns a value or an empty string.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L63">view source</a></div></div><div class="public anchor" id="var-get-form-action"><h3>get-form-action</h3><div class="usage"><code>(get-form-action args ctx)</code></div><div class="doc"><div class="markdown"><p>Prepares default form action attribute by removing <code>form-errors</code> from a query string for current page if the <code>:action</code> in <code>args</code> is not present. If the <code>:action</code> is present`, it is returned as is.</p>
<p>If the action is missing and there are no query params, <code>nil</code> is returned. If there is no <code>form-errors</code> in query params, <code>nil</code> is returned too.</p>
<p>This function takes care about a corner case where leaving form action empty on a rendered form would cause current form errors encoded in a query parameter string to be sent again to the same page, giving possibly misleading information about the form errors.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L523">view source</a></div></div><div class="public anchor" id="var-get-lang"><h3>get-lang</h3><div class="usage"><code>(get-lang ctx)</code></div><div class="doc"><div class="markdown"><p>Obtains a language string from a context map <code>ctx</code> by trying the following keys: <code>:language/str</code>, <code>:lang</code>, <code>:language</code> and <code>:language/default</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L217">view source</a></div></div><div class="public anchor" id="var-get-lang-id"><h3>get-lang-id</h3><div class="usage"><code>(get-lang-id ctx)</code></div><div class="doc"><div class="markdown"><p>Obtains a language identifier (as keyword) from a context map <code>ctx</code> by trying the following keys: <code>:language/str</code>, <code>:lang</code>, <code>:language</code> and <code>:language/default</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L226">view source</a></div></div><div class="public anchor" id="var-html-add-attrs"><h3>html-add-attrs</h3><div class="usage"><code>(html-add-attrs args)</code><code>(html-add-attrs args to-remove)</code></div><div class="doc"><div class="markdown"><p>Generates HTML attribute list in a form of <code>name= "value"</code> from the given <code>args</code> map. Returns a string with each pair separated by a single space and the whole string prefixed with a single space (if it is not empty).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L387">view source</a></div></div><div class="public anchor" id="var-html-esc"><h3>html-esc</h3><div class="usage"><code>(html-esc s)</code></div><div class="doc"><div class="markdown"><p>Escapes string <code>s</code> to be used in HTML using Selmer’s <code>selmer.filter-parser/escape-html*</code> function.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L57">view source</a></div></div><div class="public anchor" id="var-init"><h3>init</h3><div class="usage"><code>(init {:keys [enabled? router language translations validators js-config], :or {enabled? true}})</code></div><div class="doc"><div class="markdown"><p>Initializes Selmer taggers.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L839">view source</a></div></div><div class="public anchor" id="var-kw-param.3F"><h3>kw-param?</h3><div class="usage"><code>(kw-param? v)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> if the given value is a keyword or a string expressing a keyword (with <code>:</code> symbol as its first character).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L340">view source</a></div></div><div class="public anchor" id="var-lang-url"><h3>lang-url</h3><div class="usage"><code>(lang-url router ctx path-or-name lang localized? path-params query-params)</code><code>(lang-url router ctx path-or-name lang localized? path-params)</code><code>(lang-url router ctx path-or-name lang localized?)</code><code>(lang-url router ctx path-or-name lang)</code><code>(lang-url router ctx path-or-name)</code><code>(lang-url router ctx)</code><code>(lang-url router ctx path-or-name lang localized? path-params query-params lang-param)</code></div><div class="doc"><div class="markdown"><p>Transforms the given URI (a path expressed as a string) or a route name (a keyword) to a localized path using the detected (or given) language. Calls <code>amelinium.common/lang-url</code>. Tries to be very optimistic: if a path was given and there was no success in transforming it into localized variant, it will return it.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L235">view source</a></div></div><div class="public anchor" id="var-last-char"><h3>last-char</h3><div class="usage"><code>(last-char s)</code></div><div class="doc"><div class="markdown"><p>Returns last character of the given string <code>s</code> or <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L95">view source</a></div></div><div class="public anchor" id="var-param-try-tr"><h3>param-try-tr</h3><div class="usage"><code>(param-try-tr tr-sub-fn v)</code><code>(param-try-tr tr-sub-fn k v)</code><code>(param-try-tr tr-sub-fn k v a)</code><code>(param-try-tr tr-sub-fn k v a b)</code><code>(param-try-tr tr-sub-fn k v a b & more)</code></div><div class="doc"><div class="markdown"><p>Tries to translate tag parameters <code>k</code> and <code>v</code> using the given <code>tr-sub-fn</code> function (which should be a result of calling <code>translator-sub</code>). If the value of <code>v</code> is not a keyword or keyworded string (<code>kw-param?</code> applied to <code>v</code> does not return <code>true</code>) then a string of <code>v</code> is returned without calling a translation function. Any additional arguments are passed to a translation function as additional arguments.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L349">view source</a></div></div><div class="public anchor" id="var-parse-args"><h3>parse-args</h3><div class="usage"><code>(parse-args args)</code></div><div class="doc"><div class="markdown"><p>Parses arguments using <code>selmer.filter-parser/fix-filter-args</code> function.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L162">view source</a></div></div><div class="public anchor" id="var-parse-assigments"><h3>parse-assigments</h3><div class="usage"><code>(parse-assigments fk fv coll)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L128">view source</a></div></div><div class="public anchor" id="var-render-assignment-value"><h3>render-assignment-value</h3><div class="usage"><code>(render-assignment-value ctx v)</code></div><div class="doc"><div class="markdown"><p>Interpolates values enclosed within <code>[[</code> and <code>]]</code> tokens by getting values associated with the obtained keys in <code>ctx</code> map. Additionally, parses form field values enclosed within <code>[-</code> and <code>-]</code> tokens by replacing them with default values transferred from propagated error data or, if there was no error, with values associated with keys in <code>ctx</code> map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L76">view source</a></div></div><div class="public anchor" id="var-tr"><h3>tr</h3><div class="usage"><code>(tr args ctx)</code><code>(tr args ctx translations-fn)</code></div><div class="doc"><div class="markdown"><p>Translation function. Creates a translator by calling <code>translator</code> and prepares arguments from a template tag to be passed to it (the first being converted to a keyword). Returns a string or <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L309">view source</a></div></div><div class="public anchor" id="var-tr-sub"><h3>tr-sub</h3><div class="usage"><code>(tr-sub args ctx)</code><code>(tr-sub args ctx translations-fn)</code></div><div class="doc"><div class="markdown"><p>Translation function. Creates a translator by calling <code>translator-sub</code> and prepares arguments from a template tag to be passed to it (the first and second being converted to keywords). Returns a string or <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L323">view source</a></div></div><div class="public anchor" id="var-translator"><h3>translator</h3><div class="usage"><code>(translator ctx)</code><code>(translator ctx translations-fn)</code></div><div class="doc"><div class="markdown"><p>For the given context map <code>ctx</code> and optional translation function <code>translations-fn</code> it returns a translation function with predefined language, taking a translation key <code>k</code> and optional arguments.</p>
<p>The value of <code>translations-fn</code> argument is used as fallback when there is no <code>:i18n/translator</code> nor <code>:i18n/translator-nd</code> key found in a context map. It should be a function returned by the <code>amelinium.i18n/translation-fn</code>. If <code>translations-fn</code> is <code>nil</code> or <code>false</code>, it will fall back to a generic, globally initialized <code>amelinium.i18n/translations</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L259">view source</a></div></div><div class="public anchor" id="var-translator-sub"><h3>translator-sub</h3><div class="usage"><code>(translator-sub ctx)</code><code>(translator-sub ctx translations-fn)</code></div><div class="doc"><div class="markdown"><p>For the given context map <code>ctx</code> and optional translation function <code>translations-fn</code> it returns a translation function with predefined language, taking a translation key <code>k</code> and optional arguments. If the first optional argument is present and it is not <code>nil</code> nor <code>false</code> then its value will become a name and the value of <code>k</code> will become a namespace for a translation key.</p>
<p>The value of <code>translations-fn</code> argument is used as fallback when there is no <code>:i18n/translator-sub</code> nor <code>:i18n/translator-sub-nd</code> key found in a context map. It should be a function returned by the <code>amelinium.i18n/translation-fn</code>. If <code>translations-fn</code> is <code>nil</code> or <code>false</code>, it will fall back to a generic, globally initialized <code>amelinium.i18n/translations</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L283">view source</a></div></div><div class="public anchor" id="var-url-enc"><h3>url-enc</h3><div class="usage"><code>(url-enc s)</code></div><div class="doc"><div class="markdown"><p>Encodes URL given as a string <code>s</code> using Java’s <code>URLEncoder/encode</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L33">view source</a></div></div><div class="public anchor" id="var-url-esc"><h3>url-esc</h3><div class="usage"><code>(url-esc s)</code></div><div class="doc"><div class="markdown"><p>Escapes certain characters (<code><</code>, <code>></code>, <code>"</code> and <code>'</code>) in the given string <code>s</code> by replacing them with character codes prefixed with <code>%</code> symbol.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/taggers.clj#L38">view source</a></div></div></div></body></html>