This repository has been archived on 2025-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
lwb6/legacyworlds-web-main/Content/Raw/WEB-INF/fm/layout/form.ftl

98 lines
2.4 KiB
Text
Raw Normal View History

2018-10-23 09:38:02 +02:00
<#macro form action name="" hash="">
<div class="form-container">
<form action="${action?url}.action<#if hash != "">#${hash?url}</#if>" method="post">
<table>
<#nested>
</table>
</form>
</div>
</#macro>
<#macro form_field_line label id>
<tr class="form-field">
<th><label for="ff-${id?xhtml}">${label?xhtml}:</label></th>
<td><#nested></td>
</tr>
</#macro>
<#macro form_text label name value id="" maxLength=0 multiline=false>
<#if id = "">
<#local id = name>
</#if>
<@form_field_line label=label id=id>
<#if multiline>
<textarea class="input" rows="${maxLength}" id="ff-${id}" name="${name}" cols="60" style="height:auto">${value?xhtml}</textarea>
<#else>
<@ff_text id=id name=name maxLength=maxLenth value=value />
</#if>
</@form_field_line>
</#macro>
<#macro form_checkbox label name value id="" checked=false>
<#if id = "">
<#local id = name>
</#if>
<@form_field_line label=label id=id>
<@ff_checkbox id=id name=name value=value checked=checked />
</@form_field_line>
</#macro>
<#macro form_pwd label name id="">
<#if id = "">
<#local id = name>
</#if>
<@form_field_line label=label id=id>
<@ff_pwd id=id name=name />
</@form_field_line>
</#macro>
<#macro form_select label name id="">
<#if id = "">
<#local id = name>
</#if>
<@form_field_line label=label id=id>
<@ff_select id=id name=name>
<#nested>
</@ff_select>
</@form_field_line>
</#macro>
<#macro form_part title>
<tr class="form-part">
<th colspan="2">${title}</th>
</tr>
</#macro>
<#macro form_extra>
<tr class="form-extra">
<td colspan="2"><#nested></td>
</tr>
</#macro>
<#macro form_error>
<tr class="form-error">
<td colspan="2"><#nested></td>
</tr>
</#macro>
<#macro standalone_error>
<div class="form-container">
<table>
<tr class="form-error">
<td colspan="2"><#nested></td>
</tr>
</table>
</div>
</#macro>
<#macro form_submit label extraClass="">
<tr class="form-submit">
<th>&nbsp;</th>
<td><@ff_submit label=label extraClass=extraClass /></td>
</tr>
</#macro>
<#macro form_extended_submit label extraClass="">
<tr class="form-submit">
<th>&nbsp;</th>
<td><@ff_submit label=label extraClass=extraClass /><#nested /></td>
</tr>
</#macro>
<#macro lineform action name="" hash="">
<div class="form-container">
<form action="${action?url}.action<#if hash != "">#${hash?url}</#if>" method="post">
<table>
<tr><td><#nested></td></tr>
</table>
</form>
</div>
</#macro>