SM2Gen/Templates/html_controls.html.ep.xml

282 lines
7.3 KiB
XML

<root>
<!-- Todo - add password visibility to password type -->
<Select><![CDATA[
<p><span class=label>
%=l('${prefix}_${Label}')
</span><span class=data>
% my @${Name}_options = ${structure:OptionsInPerl};
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%= select_field '${Name}' => @${Name}_options, class => 'input'
<br></span> </p>
]]></Select>
<Textarea><![CDATA[
<span class=label>
%=l('${prefix}_${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%= text_area '${Name}', cols=>${cols | 40}, rows=>${rows | 10}, Readonly=>'${Readonly | false}'
</span><br>
]]></Textarea>
<Date><![CDATA[
<span class=label>
%=l('${prefix}_${Label}')
</span><span class=data>
%=date_field '${Name}' =>$$${Name}, pattern=>${regexp | .*}
</span><br>
]]></Date>
<Time><![CDATA[
<span class=label>
%=l('${prefix}_${Label}')
</span><span class=data>
%=time_field '${Name}' =>$$${Name}, pattern=>${regexp | .*}
</span><br>
]]></Time>
<Text><![CDATA[
<p><span class=label>
%=l('${prefix}_${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%= text_field '${Name}', size => '${size | 50}', class => 'textinput ${Name}' , pattern=>'${regexp | ".*"}' , placeholder=>'${placeholder | Name}'
<br></span></p>
]]></Text>
<ReadonlyText><![CDATA[
<p><span class=label>
%=l('${prefix}_${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%= text_field '${Name}', size => '${size | 50}', class => 'textinput ${Name}' , pattern=>'${regexp | ".*"}' , placeholder=>'${placeholder | Name}', Readonly=>'true'
<br></span></p>
]]></ReadonlyText>
<SubHeader><![CDATA[
<h2 class='subh${type_serial}'><%=l('${Value}')%></h2>]]>
</SubHeader>
<Header><![CDATA[
<h1 class='head${type_serial}'><%=l('${Value}')%></h1>]]>
</Header>
<Paragraph><![CDATA[
<p class='paragraph para${type_serial}'>
%=l('${Value}')
</p>
]]></Paragraph>
<Submit><![CDATA[
<span class='data'>
%= submit_button l('${Value}'), class => 'action subm${type_serial}'
</span>]]>
</Submit>
<Search><![CDATA[
<p><span class=label>
%=l('${prefix}_${Label}')
</span><span class=data>
%=Search field
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%=search_field '${Name}' , class => 'searc${type_serial}'
</span>span></p>
]]>
</Search>
<Url><![CDATA[
<p><span class=label>
%=l('${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%=URL_field '${Name}' , class => 'url${type_serial}'
</span>span></p>
]]>
</Url>
<Tel><![CDATA[
<p><span class=label>
%=l('${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%=tel_field '${Name}', class => 'tel${type_serial}'
</span>span></p>
]]>
</Tel>
<Email><![CDATA[
<p><span class=label>
%=l('${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%=email_field '${Name}', class => 'emai${type_serial}'
</span></p>
]]>
</Email>
<Password><![CDATA[
<p><span class='label'>
%=l('${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%=password_field '${Name}', class => 'pass${type_serial}'
</span>span></p>
]]>
</Password>
<Timedate><![CDATA[
<p><span class='label'>
%=l('${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%=timedate_field '${Name}', class => 'time${type_serial}'
</span>span></p>
]]>
</Timedate>
<Week><![CDATA[
<p><span class='label'>
%=l('${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%=week_field '${Name}', class => 'week${type_serial}'
</span>span></p>
]]>
</Week>
<Month><![CDATA[
<p><span class='label'>
%=l('${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%=month_field '${Name}', class => 'mont${type_serial}'
</span>span></p>
]]>
</Month>
<Range><![CDATA[
<p><span class='label'>
%=l('${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%=range_field '${Name}', class => 'rang${type_serial}'
</span>span></p>
]]>
</Range>
<Radio><![CDATA[
<p><span class='label'>
%=l('${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%=radio_field '${Name}', class => 'radi${type_serial}'
</span>span></p>
]]>
</Radio>
<Number><![CDATA[
<p><span class='label'>
%=l('${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%=number_field '${Name}', class => 'numb${type_serial}'
</span>span></p>
]]>
</Number>
<File><![CDATA[
<p><span class='label'>
%=l('${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%=file_field '${Name}', class => 'file${type_serial}'
</span>span></p>
]]>
</File>
<Color><![CDATA[
<p><span class='label'>
%=l('${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%=color_field '${Name}', class => 'colo${type_serial}'
</span>span></p>
]]>
</Color>
<Checkbox><![CDATA[
<p><span class='label'>
%=l('${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%=checkbox_field '${Name}', class => 'chec${type_serial}'
</span>span></p>
]]>
</Checkbox>
<Table><![CDATA[
<br /><table class="sme-border TableSort sme-table ${classname} ">
<thead class='${classname}'>
<tr table-head-row><tal:block tal:repeat="ColHead TopHeadings">
<th class='sme-border table-head-col table-head-col-${ColHead} '><%=l('${ColHead}')%></th></tal:block>
</tr>
</thead>
<tbody class='${classname}'>
% my $control_data = $c->stash('${TableControl}');
% foreach my $row (@$control_data) {
<tr class='table-row'><tal:block tal:repeat="ColContent Columns">
<td class='sme-border table-col table-col-${ColContent}'><%=$c->render_to_string(inline=>$row->{'${ColContent}'})%></td></tal:block>
</tr>
%}
</tbody>
</table>
]]>
</Table>
<Preformatted><![CDATA[
<pre class='preformatted pref${type_serial}'>
${Value}
</pre>
]]>
</Preformatted>
<Link><![CDATA[
<a href='${structure:href}' class='link link${type_serial}'>
%= l('${title}')
</a>
%#= link_to l('${title}'), '${structure:href}' , class=>'link link${type_serial}'
]]>
</Link>
<ButtonLink><![CDATA[
<button href='${structure:href}' class='buttonlink buttonlink${type_serial}'>
%= l('${title}')
</button>
%#= button_to l('${title}'), '${structure:href}' , class=>'buttonlink buttonlink${type_serial}'
]]>
</ButtonLink>
<Back><![CDATA[
<span class='data'>
%= submit_button l('${Value}'), class => 'action back', onclick =>'history.back()'
</span>
]]>
</Back>
<Group><![CDATA[
<div ${Value}>
]]>
</Group>
<Endgroup><![CDATA[
</div>
]]>
</Endgroup>
</root>