Doc Twig UI blocks

This commit is contained in:
Eric Espie
2022-11-10 13:35:17 +01:00
parent f18962d12a
commit e307d8d19b
417 changed files with 66988 additions and 0 deletions

View File

@@ -0,0 +1,531 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Field &mdash; iTop UI iTop 3.1.0 documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/ui-doc.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../index.html" class="icon icon-home"> iTop UI
<img src="../../../_static/itop-logo.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Twig Base:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../TwigBase/TwigBase.html">Twig Base Presentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../TwigBaseTuto/TwigBaseTuto.html">Twig Base Tutorial</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">iTop UI</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Field</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="field">
<span id="id1"></span><h1>Field<a class="headerlink" href="#field" title="Permalink to this headline"></a></h1>
<p>Class Field</p>
<hr class="docutils" />
<section id="output">
<h2>Output<a class="headerlink" href="#output" title="Permalink to this headline"></a></h2>
<dl class="field-list simple">
<dt class="field-odd">Example Fields</dt>
<dd class="field-odd"><p></p></dd>
</dl>
<img alt="../../../_images/Field.png" src="../../../_images/Field.png" />
</section>
<hr class="docutils" />
<section id="twig-tag">
<h2>Twig Tag<a class="headerlink" href="#twig-tag" title="Permalink to this headline"></a></h2>
<dl class="field-list simple">
<dt class="field-odd">Tag</dt>
<dd class="field-odd"><p><strong>UIField</strong></p>
</dd>
<dt class="field-even">Syntax</dt>
<dd class="field-even"><p></p></dd>
</dl>
<div class="highlight-twig notranslate"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">UIField</span> <span class="p">T</span><span class="nv">ype</span> <span class="o">{</span><span class="p">P</span><span class="nv">arameters</span><span class="o">}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> Content Goes Here</span>
<span class="cp">{%</span> <span class="k">EndUIField</span> <span class="cp">%}</span><span class="x"></span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p></p></dd>
</dl>
<table class="docutils align-default">
<colgroup>
<col style="width: 76%" />
<col style="width: 24%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#fieldfromparams"><span class="std std-ref">FromParams</span></a></p></td>
<td><p>No comment</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#fieldfromobject"><span class="std std-ref">FromObject</span></a></p></td>
<td><p>No comment</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#fieldlarge"><span class="std std-ref">Large</span></a></p></td>
<td><p>No comment</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#fieldsmall"><span class="std std-ref">Small</span></a></p></td>
<td><p>No comment</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#fieldstandard"><span class="std std-ref">Standard</span></a></p></td>
<td><p>No comment</p></td>
</tr>
</tbody>
</table>
<section id="field-fromparams">
<span id="fieldfromparams"></span><h3>Field FromParams<a class="headerlink" href="#field-fromparams" title="Permalink to this headline"></a></h3>
<dl class="field-list simple">
<dt class="field-odd">syntax</dt>
<dd class="field-odd"><p></p></dd>
</dl>
<div class="highlight-twig notranslate"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">UIField</span> <span class="p">F</span><span class="nv">romParams</span> <span class="o">{</span><span class="nv">aParams</span><span class="o">:</span><span class="nv">value</span><span class="o">}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> Content Goes Here</span>
<span class="cp">{%</span> <span class="k">EndUIField</span> <span class="cp">%}</span><span class="x"></span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">parameters</dt>
<dd class="field-odd"><p></p></dd>
</dl>
<table class="docutils align-default">
<colgroup>
<col style="width: 35%" />
<col style="width: 8%" />
<col style="width: 42%" />
<col style="width: 8%" />
<col style="width: 8%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>aParams</p></td>
<td></td>
<td><p>mandatory</p></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</section>
<section id="field-fromobject">
<span id="fieldfromobject"></span><h3>Field FromObject<a class="headerlink" href="#field-fromobject" title="Permalink to this headline"></a></h3>
<dl class="field-list simple">
<dt class="field-odd">syntax</dt>
<dd class="field-odd"><p></p></dd>
</dl>
<div class="highlight-twig notranslate"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">UIField</span> <span class="p">F</span><span class="nv">romObject</span> <span class="o">{</span><span class="nv">sLabel</span><span class="s1">:&#39;value&#39;</span><span class="o">,</span> <span class="nv">oInput</span><span class="o">:</span><span class="nv">value</span><span class="o">,</span> <span class="nv">sLayout</span><span class="s1">:&#39;value&#39;</span><span class="o">}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> Content Goes Here</span>
<span class="cp">{%</span> <span class="k">EndUIField</span> <span class="cp">%}</span><span class="x"></span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">parameters</dt>
<dd class="field-odd"><p></p></dd>
</dl>
<table class="docutils align-default">
<colgroup>
<col style="width: 24%" />
<col style="width: 24%" />
<col style="width: 30%" />
<col style="width: 16%" />
<col style="width: 5%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>sLabel</p></td>
<td><p>string</p></td>
<td><p>mandatory</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p>oInput</p></td>
<td><p>UIBlock</p></td>
<td><p>mandatory</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>sLayout</p></td>
<td><p>string</p></td>
<td><p>optional</p></td>
<td><p>NULL</p></td>
<td></td>
</tr>
</tbody>
</table>
</section>
<section id="field-large">
<span id="fieldlarge"></span><h3>Field Large<a class="headerlink" href="#field-large" title="Permalink to this headline"></a></h3>
<dl class="field-list simple">
<dt class="field-odd">syntax</dt>
<dd class="field-odd"><p></p></dd>
</dl>
<div class="highlight-twig notranslate"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">UIField</span> <span class="p">L</span><span class="nv">arge</span> <span class="o">{</span><span class="nv">sLabel</span><span class="s1">:&#39;value&#39;</span><span class="o">,</span> <span class="nv">sValueHtml</span><span class="s1">:&#39;value&#39;</span><span class="o">}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> Content Goes Here</span>
<span class="cp">{%</span> <span class="k">EndUIField</span> <span class="cp">%}</span><span class="x"></span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">parameters</dt>
<dd class="field-odd"><p></p></dd>
</dl>
<table class="docutils align-default">
<colgroup>
<col style="width: 32%" />
<col style="width: 22%" />
<col style="width: 30%" />
<col style="width: 11%" />
<col style="width: 5%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>sLabel</p></td>
<td><p>string</p></td>
<td><p>mandatory</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p>sValueHtml</p></td>
<td><p>string</p></td>
<td><p>optional</p></td>
<td><p></p></td>
<td></td>
</tr>
</tbody>
</table>
</section>
<section id="field-small">
<span id="fieldsmall"></span><h3>Field Small<a class="headerlink" href="#field-small" title="Permalink to this headline"></a></h3>
<dl class="field-list simple">
<dt class="field-odd">syntax</dt>
<dd class="field-odd"><p></p></dd>
</dl>
<div class="highlight-twig notranslate"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">UIField</span> <span class="p">S</span><span class="nv">mall</span> <span class="o">{</span><span class="nv">sLabel</span><span class="s1">:&#39;value&#39;</span><span class="o">,</span> <span class="nv">sValueHtml</span><span class="s1">:&#39;value&#39;</span><span class="o">}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> Content Goes Here</span>
<span class="cp">{%</span> <span class="k">EndUIField</span> <span class="cp">%}</span><span class="x"></span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">parameters</dt>
<dd class="field-odd"><p></p></dd>
</dl>
<table class="docutils align-default">
<colgroup>
<col style="width: 32%" />
<col style="width: 22%" />
<col style="width: 30%" />
<col style="width: 11%" />
<col style="width: 5%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>sLabel</p></td>
<td><p>string</p></td>
<td><p>mandatory</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p>sValueHtml</p></td>
<td><p>string</p></td>
<td><p>optional</p></td>
<td><p></p></td>
<td></td>
</tr>
</tbody>
</table>
</section>
<section id="field-standard">
<span id="fieldstandard"></span><h3>Field Standard<a class="headerlink" href="#field-standard" title="Permalink to this headline"></a></h3>
<dl class="field-list simple">
<dt class="field-odd">syntax</dt>
<dd class="field-odd"><p></p></dd>
</dl>
<div class="highlight-twig notranslate"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">UIField</span> <span class="p">S</span><span class="nv">tandard</span> <span class="o">{</span><span class="nv">sLabel</span><span class="s1">:&#39;value&#39;</span><span class="o">,</span> <span class="nv">sLayout</span><span class="s1">:&#39;value&#39;</span><span class="o">,</span> <span class="nv">sId</span><span class="s1">:&#39;value&#39;</span><span class="o">}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> Content Goes Here</span>
<span class="cp">{%</span> <span class="k">EndUIField</span> <span class="cp">%}</span><span class="x"></span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">parameters</dt>
<dd class="field-odd"><p></p></dd>
</dl>
<table class="docutils align-default">
<colgroup>
<col style="width: 24%" />
<col style="width: 21%" />
<col style="width: 26%" />
<col style="width: 24%" />
<col style="width: 5%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>sLabel</p></td>
<td><p>string</p></td>
<td><p>optional</p></td>
<td><p></p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>sLayout</p></td>
<td><p>string</p></td>
<td><p>optional</p></td>
<td><p>small</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>sId</p></td>
<td><p>string</p></td>
<td><p>optional</p></td>
<td><p>NULL</p></td>
<td></td>
</tr>
</tbody>
</table>
</section>
<section id="field-common-parameters">
<h3>Field common parameters<a class="headerlink" href="#field-common-parameters" title="Permalink to this headline"></a></h3>
<table class="docutils align-default">
<colgroup>
<col style="width: 29%" />
<col style="width: 10%" />
<col style="width: 61%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>AddCSSClass</p></td>
<td><p>string</p></td>
<td><p>CSS class to add to the generated html block</p></td>
</tr>
<tr class="row-even"><td><p>AddCSSClasses</p></td>
<td><p>array</p></td>
<td><p>like &lt;code&gt;[ibo-is-hidden, ibo-alertbody]&lt;/code&gt;</p></td>
</tr>
<tr class="row-odd"><td><p>AddCssFileRelPath</p></td>
<td><p>string</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>AddDeferredBlock</p></td>
<td><p>iUIBlock</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>AddHtml</p></td>
<td><p>string</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>AddJsFileRelPath</p></td>
<td><p>string</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>AddMultipleCssFilesRelPaths</p></td>
<td><p>array</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>AddMultipleJsFilesRelPaths</p></td>
<td><p>array</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>AddSubBlock</p></td>
<td><p>iUIBlock</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>AttCode</p></td>
<td><p>string</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>AttLabel</p></td>
<td><p>string</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>AttType</p></td>
<td><p>string</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>CSSClasses</p></td>
<td><p>array</p></td>
<td><p>like &lt;code&gt;[ibo-is-hidden, ibo-alertbody]&lt;/code&gt;</p></td>
</tr>
<tr class="row-even"><td><p>Comments</p></td>
<td><p>string</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>DataAttributes</p></td>
<td><p>array</p></td>
<td><p>Array of data attributes in the format [name =&gt; value]</p></td>
</tr>
<tr class="row-even"><td><p>DeferredBlocks</p></td>
<td><p>array</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>HasForcedDiv</p></td>
<td><p>bool</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>InputId</p></td>
<td><p>string</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>InputType</p></td>
<td><p>string</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>IsHidden</p></td>
<td><p>bool</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>IsMandatory</p></td>
<td><p>bool</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>IsReadOnly</p></td>
<td><p>bool</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>IsSlave</p></td>
<td><p>bool</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>Label</p></td>
<td><p>string</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>Layout</p></td>
<td><p>string</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>MustChange</p></td>
<td><p>bool</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>MustPrompt</p></td>
<td><p>bool</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>SubBlocks</p></td>
<td><p>array</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>Value</p></td>
<td><p>UIBlock</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>ValueId</p></td>
<td><p>string</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>ValueRaw</p></td>
<td><p>string</p></td>
<td></td>
</tr>
</tbody>
</table>
<hr class="docutils" />
<dl class="field-list simple">
<dt class="field-odd">Related Tag</dt>
<dd class="field-odd"><p><a class="reference internal" href="../FieldSet/FieldSet.html#fieldset"><span class="std std-ref">FieldSet</span></a></p>
</dd>
</dl>
</section>
</section>
<hr class="docutils" />
<section id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<p>Example to generate a Field</p>
<div class="highlight-twig notranslate"><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">UIField</span> <span class="p">S</span><span class="nv">mall</span> <span class="o">{</span><span class="nv">sLabel</span><span class="o">:</span> <span class="s2">&quot;Product&quot;</span><span class="o">}</span> <span class="cp">%}</span><span class="x"></span>
<span class="x"> iTop</span>
<span class="cp">{%</span> <span class="k">EndUIField</span> <span class="cp">%}</span><span class="x"></span>
</pre></div>
</div>
<p>The result:</p>
<img alt="../../../_images/Field.png" src="../../../_images/Field.png" />
</section>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2022, Combodo.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<!--
~ @copyright Copyright (C) 2010-2022 Combodo SARL
~ @license http://opensource.org/licenses/AGPL-3.0
-->
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Other Versions</span>
v: documentation/3.0
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
<dl>
<dt>Branches</dt>
<dd><a href="Field.html">documentation/3.0</a></dd>
<dd><a href="../../../../latest/generated/Component/Field/Field.html">documentation/latest</a></dd>
</dl>
</div>
</div><script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>