{*
// +---------------------------------------------------------------------------+
// | Nitro :: Defaults :: Templates :: Form |
// +---------------------------------------------------------------------------+
// | Copyright (c) 2004 June Systems BV |
// +---------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or modify it |
// | under the terms of the GNU Lesser General Public License as published by |
// | the Free Software Foundation; either version 2.1 of the License, or (at |
// | your option) any later version. |
// | |
// | This library is distributed in the hope that it will be useful, but |
// | WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser |
// | General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public License |
// | along with this library; if not, write to the Free Software Foundation, |
// | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
// +---------------------------------------------------------------------------+
// | Authors: Siggi Oskarsson <hide@address.com> |
// +---------------------------------------------------------------------------+
//
// $Id: Form.tpl 229 2008-04-17 09:20:31Z oli $
//
// Nitro's default Form template
//
*}
<FORM NAME="{$Name}" ID="{$Name}" METHOD="{$Method}" ACTION="{$Action}" ENCTYPE="{$encType}" onChange="alert('onsubmit');return false;">
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="5">
{* Include for default editor -> HTMLArea *}
{*{literal}
<script type="text/javascript">_editor_url = "/htmlarea/";</script>
<script language="Javascript1.2">
var HTMLAreas = new Array();
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
document.write(' language="Javascript1.2"></scr' + 'ipt>');
} else {
document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>');
}
//htmlarea v2.03 specific
var config = new Object();
config.toolbar = [
['fontname'],
['fontsize'],
['fontstyle'],
['bold','italic','underline','separator'],
//['strikethrough','subscript','superscript','separator'],
['justifyleft','justifycenter','justifyright','separator'],
['OrderedList','UnOrderedList','Outdent','Indent','separator'],
['forecolor','backcolor','separator'],
['HorizontalRule','Createlink','InsertImage','InsertTable','htmlmode','custom1']
//['about','help','popupeditor'],
];
config.fontstyles = [
{
name: "Inhoudstitel",
className: "Daphnekoptekst",
classStyle: "font-family: arial; font-size: 11px; font-weight: bold; color: #234B86;"
},{
name: "Inhoud",
className: "Daphneplattetekst",
classStyle: "font-family: arial; font-size: 11px; font-weight: normal; color: #333333;"
},{
name: "Uitleg tekst",
className: "MessageBlock",
classStyle: "font-family: verdana; font-size: 8pt; background-color: #707A86; color:#FFFFFF; text-align: left;"
},{
name: "Header tekst (v5.0)",
className: "Daphne_HomepageHeader",
classStyle: "font-family: Tahoma; color: #234B86; font-weight: normal; font-size: 12px;"
}
];
</script>
{/literal}*}
{foreach from=$Options item=Option key=Key}
{if $Option.WidgetType eq 'HIDDEN'}
{$Option.Controls}
{elseif $Option.WidgetType eq 'LABLE'}
{$Option.Lable}
{else}
<TR>
{if $Option.Lable && $Option.Lable != "__FALSE"}<TD VALIGN="TOP">{$Option.Lable}{if $Option.Lable neq ' '}:{/if} {if $Option.Help}{$Option.Help}{/if} </TD>{/if}
<TD VALIGN="TOP"{if !$Option.Lable} COLSPAN="2"{/if}>{$Option.Controls}</TD>
</TR>
{/if}
{/foreach}
<TR><TD></TD><TD>
{foreach from=$Buttons item=Button key=Name}
{if $Button.Type eq "IMAGE"}
<INPUT TYPE=IMAGE NAME="{$Name}" ID="{$Button.ID|default:$Name}" SRC="{$Button.Src}"{if $Button.onClick} onClick="{$Button.onClick}"{/if}{if $Button.Script}{foreach from=$Button.Script item=JS} {$JS}{/foreach}{/if}>
{else}
<INPUT TYPE="{$Button.Type}" NAME="{$Name}" ID="{$Button.ID|default:$Name}" VALUE="{$Button.Value}"{if $Button.onClick} onClick="{$Button.onClick}"{/if}{if $Button.Script}{foreach from=$Button.Script item=JS} {$JS}{/foreach}{/if}>
{/if}
{/foreach}
</TD></TR>
</TABLE>
</FORM>
{*{literal}
<script language="JavaScript1.2" defer>
function generateHTMLAreas()
{
for (var i in HTMLAreas) {
editor_generate(HTMLAreas[i],config);
}
}
window.setTimeout('generateHTMLAreas()', 300);
</script>
{/literal}*}