Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Becker <halfdan@xnorfz.de>2013-04-06 16:12:28 +0400
committerFabian Becker <halfdan@xnorfz.de>2013-04-06 16:12:28 +0400
commitd381d9821a9639339dda3080e111b5dbe4d96d65 (patch)
tree281979c6e9562209f1a9bbf141128b77f62c2a19
parent1fe5921df39eac77615d9b14b801aab69c3408a4 (diff)
Converted parts of Installation
Added new function to Twig.php Converted genericForm
-rw-r--r--core/Twig.php9
-rwxr-xr-xplugins/Annotations/templates/annotations.twig (renamed from plugins/Annotations/templates/annotations.tpl)24
-rw-r--r--plugins/Installation/Controller.php22
-rw-r--r--plugins/Installation/View.php9
-rw-r--r--plugins/Installation/templates/allSteps.tpl11
-rw-r--r--plugins/Installation/templates/allSteps.twig11
-rw-r--r--plugins/Installation/templates/databaseCheck.tpl34
-rw-r--r--plugins/Installation/templates/databaseCheck.twig34
-rw-r--r--plugins/Installation/templates/structure.twig (renamed from plugins/Installation/templates/structure.tpl)42
-rw-r--r--plugins/Installation/templates/welcome.tpl43
-rw-r--r--plugins/Installation/templates/welcome.twig45
-rw-r--r--plugins/Zeitgeist/theme/genericForm.tpl36
-rw-r--r--plugins/Zeitgeist/theme/genericForm.twig36
13 files changed, 176 insertions, 180 deletions
diff --git a/core/Twig.php b/core/Twig.php
index 4bf72c3bff..6bea6f21e2 100644
--- a/core/Twig.php
+++ b/core/Twig.php
@@ -41,7 +41,6 @@ class Piwik_Twig
$this->twig = new Twig_Environment($chainLoader,
array(
//'cache' => PIWIK_DOCUMENT_ROOT . '/tmp/templates_c',
- 'debug' => true,
)
);
$this->twig->clearTemplateCache();
@@ -101,8 +100,12 @@ class Piwik_Twig
});
$this->twig->addFunction($sparklineFunction);
- // ToDo REMOVE THIS CRAP
- $this->twig->addExtension(new Twig_Extension_Debug());
+ $postEventFunction = new Twig_SimpleFunction('postEvent', function($eventName) {
+ $str = '';
+ Piwik_PostEvent($eventName, $str);
+ return $str;
+ });
+ $this->twig->addFunction($postEventFunction);
}
/**
diff --git a/plugins/Annotations/templates/annotations.tpl b/plugins/Annotations/templates/annotations.twig
index 26c1f708f1..72f5c93ca5 100755
--- a/plugins/Annotations/templates/annotations.tpl
+++ b/plugins/Annotations/templates/annotations.twig
@@ -1,28 +1,28 @@
<div class="annotations">
- {if empty($annotations)}
- <div class="empty-annotation-list">{'Annotations_NoAnnotations'|translate}</div>
- {/if}
+ {% if annotations is empty %}
+ <div class="empty-annotation-list">{{ 'Annotations_NoAnnotations'|translate }}</div>
+ {% endif %}
<table>
- {foreach from=$annotations item=annotation}
- {include file="Annotations/templates/annotation.tpl"}
- {/foreach}
- <tr class="new-annotation-row" style="display:none" data-date="{$startDate}">
+ {% for annotation in annotations %}
+ {% include "@Annotations/annotation.twig" %}
+ {% endfor %}
+ <tr class="new-annotation-row" style="display:none" data-date="{{ startDate }}">
<td class="annotation-meta">
<div class="annotation-star">&nbsp;</div>
<div class="annotation-period-edit">
- <a href="#">{$startDate}</a>
+ <a href="#">{{ startDate }}</a>
<div class="datepicker" style="display:none"/>
</div>
</td>
<td class="annotation-value">
- <input type="text" value="" class="new-annotation-edit" placeholder="{'Annotations_EnterAnnotationText'|translate}"/><br/>
- <input type="button" class="submit new-annotation-save" value="{'General_Save'|translate}"/>
- <input type="button" class="submit new-annotation-cancel" value="{'General_Cancel'|translate}"/>
+ <input type="text" value="" class="new-annotation-edit" placeholder="{{ 'Annotations_EnterAnnotationText'|translate }}"/><br/>
+ <input type="button" class="submit new-annotation-save" value="{{ 'General_Save'|translate }}"/>
+ <input type="button" class="submit new-annotation-cancel" value="{{ 'General_Cancel'|translate }}"/>
</td>
- <td class="annotation-user-cell"><span class="annotation-user">{$userLogin}</span></td>
+ <td class="annotation-user-cell"><span class="annotation-user">{{ userLogin }}</span></td>
</tr>
</table>
diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php
index 153991a5d3..cc45c10b18 100644
--- a/plugins/Installation/Controller.php
+++ b/plugins/Installation/Controller.php
@@ -29,8 +29,6 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
'finished' => 'Installation_Congratulations',
);
- protected $pathView = 'Installation/templates/';
-
protected $session;
public function __construct()
@@ -74,7 +72,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
Piwik::deleteAllCacheOnUpdate();
$view = new Piwik_Installation_View(
- $this->pathView . 'welcome.tpl',
+ '@Installation/welcome',
$this->getInstallationSteps(),
__FUNCTION__
);
@@ -94,7 +92,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
$this->checkPreviousStepIsValid(__FUNCTION__);
$view = new Piwik_Installation_View(
- $this->pathView . 'systemCheck.tpl',
+ '@Installation/systemCheck',
$this->getInstallationSteps(),
__FUNCTION__
);
@@ -138,7 +136,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
);
$view = new Piwik_Installation_View(
- $this->pathView . 'databaseSetup.tpl',
+ '@Installation/databaseSetup',
$this->getInstallationSteps(),
__FUNCTION__
);
@@ -174,7 +172,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
{
$this->checkPreviousStepIsValid(__FUNCTION__);
$view = new Piwik_Installation_View(
- $this->pathView . 'databaseCheck.tpl',
+ '@Installation/databaseCheck',
$this->getInstallationSteps(),
__FUNCTION__
);
@@ -233,7 +231,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
$this->checkPreviousStepIsValid(__FUNCTION__);
$view = new Piwik_Installation_View(
- $this->pathView . 'tablesCreation.tpl',
+ '@Installation/tablesCreation',
$this->getInstallationSteps(),
__FUNCTION__
);
@@ -299,7 +297,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
$this->checkPreviousStepIsValid(__FUNCTION__);
$view = new Piwik_Installation_View(
- $this->pathView . 'generalSetup.tpl',
+ '@Installation/generalSetup',
$this->getInstallationSteps(),
__FUNCTION__
);
@@ -356,7 +354,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
$this->checkPreviousStepIsValid(__FUNCTION__);
$view = new Piwik_Installation_View(
- $this->pathView . 'firstWebsiteSetup.tpl',
+ '@Installation/firstWebsiteSetup',
$this->getInstallationSteps(),
__FUNCTION__
);
@@ -406,7 +404,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
$this->checkPreviousStepIsValid(__FUNCTION__);
$view = new Piwik_Installation_View(
- $this->pathView . 'displayJavascriptCode.tpl',
+ '@Installation/displayJavascriptCode',
$this->getInstallationSteps(),
__FUNCTION__
);
@@ -445,7 +443,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
$this->checkPreviousStepIsValid(__FUNCTION__);
$view = new Piwik_Installation_View(
- $this->pathView . 'finished.tpl',
+ '@Installation/finished',
$this->getInstallationSteps(),
__FUNCTION__
);
@@ -475,7 +473,7 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin
{
Piwik::checkUserIsSuperUser();
- $view = Piwik_View::factory('systemCheckPage');
+ $view = new Piwik_View('@Installation/systemCheckPage');
$this->setBasicVariablesView($view);
$view->menu = Piwik_GetAdminMenu();
diff --git a/plugins/Installation/View.php b/plugins/Installation/View.php
index 1bd4866ab0..e2db289eb1 100644
--- a/plugins/Installation/View.php
+++ b/plugins/Installation/View.php
@@ -15,20 +15,17 @@
*/
class Piwik_Installation_View extends Piwik_View
{
- protected $mainTemplate = 'Installation/templates/structure.tpl';
-
- function __construct($subtemplatePath, $installationSteps, $currentStepName)
+ public function __construct($subtemplatePath, $installationSteps, $currentStepName)
{
- parent::__construct($this->mainTemplate);
+ parent::__construct($subtemplatePath);
- $this->subTemplateToLoad = $subtemplatePath;
$this->steps = array_keys($installationSteps);
$this->allStepsTitle = array_values($installationSteps);
$this->currentStepName = $currentStepName;
$this->showNextStep = false;
}
- function render()
+ public function render()
{
// prepare the all steps templates
$this->currentStepId = array_search($this->currentStepName, $this->steps);
diff --git a/plugins/Installation/templates/allSteps.tpl b/plugins/Installation/templates/allSteps.tpl
deleted file mode 100644
index fa4bcf0063..0000000000
--- a/plugins/Installation/templates/allSteps.tpl
+++ /dev/null
@@ -1,11 +0,0 @@
-<ul>
- {foreach from=$allStepsTitle key=stepId item=stepName}
- {if $currentStepId > $stepId}
- <li class="pastStep">{$stepName|translate}</li>
- {elseif $currentStepId == $stepId}
- <li class="actualStep">{$stepName|translate}</li>
- {else}
- <li class="futureStep">{$stepName|translate}</li>
- {/if}
- {/foreach}
-</ul>
diff --git a/plugins/Installation/templates/allSteps.twig b/plugins/Installation/templates/allSteps.twig
new file mode 100644
index 0000000000..7f5f8ba54b
--- /dev/null
+++ b/plugins/Installation/templates/allSteps.twig
@@ -0,0 +1,11 @@
+<ul>
+ {% for stepId,stepName in allStepsTitle %}
+ {% if currentStepId > stepId %}
+ <li class="pastStep">{{ stepName|translate }}</li>
+ {% elseif currentStepId == stepId %}
+ <li class="actualStep">{{ stepName|translate }}</li>
+ {% else %}
+ <li class="futureStep">{{ stepName|translate }}</li>
+ {% endif %}
+ {% endfor %}
+</ul>
diff --git a/plugins/Installation/templates/databaseCheck.tpl b/plugins/Installation/templates/databaseCheck.tpl
deleted file mode 100644
index 3f0309f1ee..0000000000
--- a/plugins/Installation/templates/databaseCheck.tpl
+++ /dev/null
@@ -1,34 +0,0 @@
-{assign var=ok value="<img src='themes/default/images/ok.png' />"}
-{assign var=error value="<img src='themes/default/images/error.png' />"}
-{assign var=warning value="<img src='themes/default/images/warning.png' />"}
-{assign var=link value="<img src='themes/default/images/link.gif' />"}
-
-<h2>{'Installation_DatabaseCheck'|translate}</h2>
-
-<table class="infosServer">
- <tr>
- <td class="label">{'Installation_DatabaseServerVersion'|translate}</td>
- <td>{if isset($databaseVersionOk)}{$ok}{else}{$error}{/if}</td>
- </tr>
- <tr>
- <td class="label">{'Installation_DatabaseClientVersion'|translate}</td>
- <td>{if isset($clientVersionWarning)}{$warning}{else}{$ok}{/if}</td>
- </tr>
- {if isset($clientVersionWarning)}
- <tr>
- <td colspan="2">
- <small>
- <span style="color:#FF7F00">{$clientVersionWarning}</span>
- </small>
- </td>
- </tr>
- {/if}
- <tr>
- <td class="label">{'Installation_DatabaseCreation'|translate}</td>
- <td>{if isset($databaseCreated)}{$ok}{else}{$error}{/if}</td>
- </tr>
-</table>
-
-<p>
- {$link} <a href="?module=Proxy&action=redirect&url=http://piwik.org/docs/requirements/" target="_blank">{'Installation_Requirements'|translate}</a>
-</p>
diff --git a/plugins/Installation/templates/databaseCheck.twig b/plugins/Installation/templates/databaseCheck.twig
new file mode 100644
index 0000000000..3be6f56ab6
--- /dev/null
+++ b/plugins/Installation/templates/databaseCheck.twig
@@ -0,0 +1,34 @@
+{% set ok %}<img src='themes/default/images/ok.png' />{% endset %}
+{% set error %}<img src='themes/default/images/error.png' />{% endset %}
+{% set warning %}<img src='themes/default/images/warning.png' />{% endset %}
+{% set link %}<img src='themes/default/images/link.gif' />{% endset %}
+
+<h2>{{ 'Installation_DatabaseCheck'|translate }}</h2>
+
+<table class="infosServer">
+ <tr>
+ <td class="label">{{ 'Installation_DatabaseServerVersion'|translate }}</td>
+ <td>{% if databaseVersionOk is defined %}{{ ok }}{% else %}{{ error }}{% endif %}</td>
+ </tr>
+ <tr>
+ <td class="label">{{ 'Installation_DatabaseClientVersion'|translate }}</td>
+ <td>{% if clientVersionWarning is defined %}{{ warning }}{% else %}{{ ok }}{% endif %}</td>
+ </tr>
+ {% if clientVersionWarning is defined %}
+ <tr>
+ <td colspan="2">
+ <small>
+ <span style="color:#FF7F00">{{ clientVersionWarning }}</span>
+ </small>
+ </td>
+ </tr>
+ {% endif %}
+ <tr>
+ <td class="label">{{ 'Installation_DatabaseCreation'|translate }}</td>
+ <td>{% if databaseCreated is defined %}{{ ok }}{% else %}{{ error }}{% endif %}</td>
+ </tr>
+</table>
+
+<p>
+ {{ link }} <a href="?module=Proxy&action=redirect&url=http://piwik.org/docs/requirements/" target="_blank">{{ 'Installation_Requirements'|translate }}</a>
+</p>
diff --git a/plugins/Installation/templates/structure.tpl b/plugins/Installation/templates/structure.twig
index 6760c60c12..ee1f5b069f 100644
--- a/plugins/Installation/templates/structure.tpl
+++ b/plugins/Installation/templates/structure.twig
@@ -2,64 +2,60 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>Piwik &rsaquo; {'Installation_Installation'|translate}</title>
+ <title>Piwik &rsaquo; {{ 'Installation_Installation'|translate }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="themes/default/common.css"/>
<link rel="stylesheet" type="text/css" href="libs/jquery/themes/base/jquery-ui.css"/>
- <link rel="stylesheet" type="text/css" href="themes/default/styles.css"/>
+ <link rel="stylesheet" type="text/css" href="plugins/Zeitgeist/theme/styles.css"/>
<link rel="shortcut icon" href="plugins/CoreHome/templates/images/favicon.ico"/>
<script type="text/javascript" src="libs/jquery/jquery.js"></script>
<script type="text/javascript" src="libs/jquery/jquery-ui.js"></script>
- {literal}
<script type="text/javascript">
$(document).ready(function () {
$('#toFade').fadeOut(4000, function () { $(this).show().css({visibility: 'hidden'}); });
$('input:first').focus();
$('#progressbar').progressbar({
- {/literal}
- value: {$percentDone}
- {literal}
+ value: {{ percentDone }}
});
});
</script>
- {/literal}
<link rel="stylesheet" type="text/css" href="plugins/Installation/templates/install.css"/>
- {if 'General_LayoutDirection'|translate =='rtl'}
- <link rel="stylesheet" type="text/css" href="themes/default/rtl.css"/>
- {/if}
+ {% if 'General_LayoutDirection'|translate =='rtl' %}
+ <link rel="stylesheet" type="text/css" href="plugins/Zeitgeist/theme/rtl.css"/>
+ {% endif %}
</head>
<body>
<div id="main">
<div id="content">
<div id="logo">
- <img id="title" width='160' src="themes/default/images/logo.png"/> &nbsp;&nbsp;&nbsp;<span
- id="subtitle"># {'General_OpenSourceWebAnalytics'|translate}</span>
+ <img id="title" width='160' src="plugins/Zeitgeist/theme/images/logo.png"/> &nbsp;&nbsp;&nbsp;<span
+ id="subtitle"># {{ 'General_OpenSourceWebAnalytics'|translate }}</span>
</div>
<div style="float:right" id="topRightBar">
<br/>
- {postEvent name="template_topBar"}
+ {{ postEvent('template_topBar')|raw }}
</div>
<div class="both"></div>
<div id="generalInstall">
- {include file="Installation/templates/allSteps.tpl"}
+ {% include "@Installation/allSteps.twig" %}
</div>
<div id="detailInstall">
- {if isset($showNextStepAtTop) && $showNextStepAtTop}
+ {% if showNextStepAtTop is defined and showNextStepAtTop %}
<p class="nextStep">
- <a class="submit" href="{url action=$nextModuleName}">{'General_Next'|translate} &raquo;</a>
+ <a class="submit" href="{{ url({'action':'nextModuleName'}) }}">{{ 'General_Next'|translate }} &raquo;</a>
</p>
- {/if}
- {include file="$subTemplateToLoad"}
- {if $showNextStep}
+ {% endif %}
+ {% block content %}{% endblock %}
+ {% if showNextStep %}
<p class="nextStep">
- <a class="submit" href="{url action=$nextModuleName}">{'General_Next'|translate} &raquo;</a>
+ <a class="submit" href="{{ url({'action':'nextModuleName'}) }}">{{ 'General_Next'|translate }} &raquo;</a>
</p>
- {/if}
+ {% endif %}
</div>
<div class="both"></div>
@@ -67,10 +63,10 @@
<br/>
<br/>
- <h3>{'Installation_InstallationStatus'|translate}</h3>
+ <h3>{{ 'Installation_InstallationStatus'|translate }}</h3>
<div id="progressbar"></div>
- {'Installation_PercentDone'|translate:$percentDone}
+ {{ 'Installation_PercentDone'|translate(percentDone) }}
</div>
</div>
</body>
diff --git a/plugins/Installation/templates/welcome.tpl b/plugins/Installation/templates/welcome.tpl
deleted file mode 100644
index b1fecd42dc..0000000000
--- a/plugins/Installation/templates/welcome.tpl
+++ /dev/null
@@ -1,43 +0,0 @@
-<h2>{'Installation_Welcome'|translate}</h2>
-
-{if $newInstall}
- {'Installation_WelcomeHelp'|translate:$totalNumberOfSteps}
-{else}
- <p>{'Installation_ConfigurationHelp'|translate}</p>
- <br/>
- <div class="error">
- {$errorMessage}
- </div>
-{/if}
-
-{literal}
- <script type="text/javascript">
- <!--
- $(function () {
- // client-side test for https to handle the case where the server is behind a reverse proxy
- if (document.location.protocol === 'https:') {
- $('p.nextStep a').attr('href', $('p.nextStep a').attr('href') + '&clientProtocol=https');
- }
-
- // client-side test for broken tracker (e.g., mod_security rule)
- $('p.nextStep').hide();
- $.ajax({
- url: 'piwik.php',
- data: 'url=http://example.com',
- complete: function () {
- $('p.nextStep').show();
- },
- error: function (req) {
- $('p.nextStep a').attr('href', $('p.nextStep a').attr('href') + '&trackerStatus=' + req.status);
- }
- });
- });
- //-->
- </script>
-{/literal}
-
-{if !$showNextStep}
- <p class="nextStep">
- <a href="{url}">{'General_Refresh'|translate} &raquo;</a>
- </p>
-{/if}
diff --git a/plugins/Installation/templates/welcome.twig b/plugins/Installation/templates/welcome.twig
new file mode 100644
index 0000000000..7eafe56e91
--- /dev/null
+++ b/plugins/Installation/templates/welcome.twig
@@ -0,0 +1,45 @@
+{% extends '@Installation/structure.twig' %}
+
+{% block content %}
+<h2>{{ 'Installation_Welcome'|translate }}</h2>
+
+{% if newInstall %}
+ {{ 'Installation_WelcomeHelp'|translate(totalNumberOfSteps)|raw }}
+{% else %}
+ <p>{{ 'Installation_ConfigurationHelp'|translate }}</p>
+ <br/>
+ <div class="error">
+ {{ errorMessage }}
+ </div>
+{% endif %}
+
+<script type="text/javascript">
+ <!--
+ $(function () {
+ // client-side test for https to handle the case where the server is behind a reverse proxy
+ if (document.location.protocol === 'https:') {
+ $('p.nextStep a').attr('href', $('p.nextStep a').attr('href') + '&clientProtocol=https');
+ }
+
+ // client-side test for broken tracker (e.g., mod_security rule)
+ $('p.nextStep').hide();
+ $.ajax({
+ url: 'piwik.php',
+ data: 'url=http://example.com',
+ complete: function () {
+ $('p.nextStep').show();
+ },
+ error: function (req) {
+ $('p.nextStep a').attr('href', $('p.nextStep a').attr('href') + '&trackerStatus=' + req.status);
+ }
+ });
+ });
+ //-->
+</script>
+
+{% if not showNextStep %}
+ <p class="nextStep">
+ <a href="{url}">{{ 'General_Refresh'|translate }} &raquo;</a>
+ </p>
+{% endif %}
+{% endblock %} \ No newline at end of file
diff --git a/plugins/Zeitgeist/theme/genericForm.tpl b/plugins/Zeitgeist/theme/genericForm.tpl
deleted file mode 100644
index 1b1a8693b5..0000000000
--- a/plugins/Zeitgeist/theme/genericForm.tpl
+++ /dev/null
@@ -1,36 +0,0 @@
-{if $form_data.errors}
- <div class="warning">
- <img src="themes/default/images/warning_medium.png">
- <strong>{'Installation_PleaseFixTheFollowingErrors'|translate}:</strong>
- <ul>
- {foreach from=$form_data.errors item=data}
- <li>{$data}</li>
- {/foreach}
- </ul>
- </div>
-{/if}
-
-<form {$form_data.attributes}>
- <div class="centrer">
- <table class="centrer">
- {foreach from=$element_list item=fieldname}
- {if $form_data.$fieldname.type== 'checkbox'}
- <tr>
- <td colspan=2>{$form_data.$fieldname.html}</td>
- </tr>
- {elseif $form_data.$fieldname.label}
- <tr>
- <td>{$form_data.$fieldname.label}</td>
- <td>{$form_data.$fieldname.html}</td>
- </tr>
- {elseif $form_data.$fieldname.type == 'hidden'}
- <tr>
- <td colspan=2>{$form_data.$fieldname.html}</td>
- </tr>
- {/if}
- {/foreach}
- </table>
- </div>
-
- {$form_data.submit.html}
-</form>
diff --git a/plugins/Zeitgeist/theme/genericForm.twig b/plugins/Zeitgeist/theme/genericForm.twig
new file mode 100644
index 0000000000..b47319e475
--- /dev/null
+++ b/plugins/Zeitgeist/theme/genericForm.twig
@@ -0,0 +1,36 @@
+{% if form_data.errors %}
+ <div class="warning">
+ <img src="plugins/Zeitgeist/theme/images/warning_medium.png">
+ <strong>{{ 'Installation_PleaseFixTheFollowingErrors'|translate }}:</strong>
+ <ul>
+ {% for data in form_data.errors %}
+ <li>{{ data }}</li>
+ {% endfor %}
+ </ul>
+ </div>
+{% endif %}
+
+<form {{ form_data.attributes|raw }}>
+ <div class="centrer">
+ <table class="centrer">
+ {% for fieldname in element_list %}
+ {% if form_data[fieldname].type == 'checkbox' %}
+ <tr>
+ <td colspan=2>{{ form_data[fieldname].html|raw }}</td>
+ </tr>
+ {% elseif form_data[fieldname].label %}
+ <tr>
+ <td>{{ form_data[fieldname].label|raw }}</td>
+ <td>{{ form_data[fieldname].html|raw }}</td>
+ </tr>
+ {% elseif form_data[fieldname].type == 'hidden' %}
+ <tr>
+ <td colspan=2>{{ form_data[fieldname].html|raw }}</td>
+ </tr>
+ {% endif %}
+ {% endfor %}
+ </table>
+ </div>
+
+ {{ form_data.submit.html|raw }}
+</form>