Revision 67ade13c
Von Hans P. Schlaepfer vor etwa 4 Jahren hinzugefügt
templates/webpages/requirement_spec_text_block/_form.html | ||
---|---|---|
3 | 3 |
[% USE HTML %] |
4 | 4 |
[% SET style="width: 500px" %] |
5 | 5 |
[% DEFAULT id_base = 'edit_text_block_' _ SELF.text_block.id %] |
6 |
|
|
6 | 7 |
<form method="post" id="[% id_base %]_form"> |
7 |
<h2> |
|
8 |
[%- IF SELF.text_block.id %] |
|
9 |
[%- SET title = SELF.text_block.title || '(' _ LxERP.t8('No title yet') _ ')' %] |
|
10 |
[%- LxERP.t8("Edit text block '#1'", title) %] |
|
11 |
[%- ELSE %] |
|
12 |
[%- LxERP.t8("Add text block") %] |
|
13 |
[%- END %] |
|
14 |
</h2> |
|
8 |
|
|
15 | 9 |
|
16 | 10 |
[% L.hidden_tag('form_prefix', id_base, id=id_base _ '_form_prefix') %] |
17 | 11 |
[% L.hidden_tag('id', SELF.text_block.id, id=id_base _ '_id') %] |
... | ... | |
22 | 16 |
[% END %] |
23 | 17 |
|
24 | 18 |
<table> |
19 |
<caption> |
|
20 |
[% IF SELF.text_block.id %] |
|
21 |
[% SET title = SELF.text_block.title || '(' _ LxERP.t8('No title yet') _ ')' %] |
|
22 |
[% LxERP.t8("Edit text block '#1'", title) %] |
|
23 |
[% ELSE %] |
|
24 |
[% LxERP.t8("Add text block") %] |
|
25 |
[% END %] |
|
26 |
</caption> |
|
27 |
<tbody> |
|
25 | 28 |
<tr> |
26 |
<th align="right">[%- LxERP.t8("Title") %]:</th>
|
|
29 |
<th>[% LxERP.t8("Title") %]:</th>
|
|
27 | 30 |
<td>[% L.input_tag(id_base _ '.title', SELF.text_block.title, style = style) %]</td> |
28 | 31 |
</tr> |
29 | 32 |
|
30 |
[%- IF SELF.predefined_texts.size %]
|
|
33 |
[% IF SELF.predefined_texts.size %] |
|
31 | 34 |
<tr> |
32 |
<th align="right">[%- LxERP.t8("Pre-defined Texts") %]:</th>
|
|
35 |
<th>[% LxERP.t8("Pre-defined Texts") %]:</th>
|
|
33 | 36 |
<td> |
34 |
[%- L.select_tag(id_base _ '_predefined_text_block', SELF.predefined_texts, title_key='description', style=style) %]
|
|
35 |
<a href="#" onclick="insert_selected_predefined_text()">[%- LxERP.t8("Insert") %]</a>
|
|
37 |
[% L.select_tag(id_base _ '_predefined_text_block', SELF.predefined_texts, title_key='description', style=style) %] |
|
38 |
<a href="#" onclick="insert_selected_predefined_text()">[% LxERP.t8("Insert") %]</a> |
|
36 | 39 |
</td> |
37 | 40 |
</tr> |
38 |
[%- END %]
|
|
41 |
[% END %] |
|
39 | 42 |
|
40 | 43 |
<tr> |
41 |
<th align="right" valign="top">[%- LxERP.t8("Description") %]:</th>
|
|
42 |
<td valign="top">[% L.textarea_tag(id_base _ '.text_as_restricted_html', SELF.text_block.text_as_restricted_html, id = id_base _ '_text', style = style _ '; height: 200px', class='texteditor') %]</td>
|
|
44 |
<th>[% LxERP.t8("Description") %]:</th>
|
|
45 |
<td>[% L.textarea_tag(id_base _ '.text_as_restricted_html', SELF.text_block.text_as_restricted_html, id = id_base _ '_text', style = style _ '; height: 200px', class='texteditor') %]</td> |
|
43 | 46 |
</tr> |
47 |
</tbody> |
|
44 | 48 |
</table> |
45 | 49 |
|
46 | 50 |
<p> |
47 |
[%- L.ajax_submit_tag('controller.pl?action=RequirementSpecTextBlock/ajax_' _ (SELF.text_block.id ? 'update' : 'create'), '#' _ id_base _ '_form', LxERP.t8('Save')) %]
|
|
48 |
<a href="#" onclick="kivi.requirement_spec.cancel_edit_text_block_form('[% id_base %]')">[%- LxERP.t8("Cancel") %]</a>
|
|
51 |
[% L.ajax_submit_tag('controller.pl?action=RequirementSpecTextBlock/ajax_' _ (SELF.text_block.id ? 'update' : 'create'), '#' _ id_base _ '_form', LxERP.t8('Save')) %] |
|
52 |
<a href="#" onclick="kivi.requirement_spec.cancel_edit_text_block_form('[% id_base %]')">[% LxERP.t8("Cancel") %]</a> |
|
49 | 53 |
</p> |
50 | 54 |
|
51 |
[%- IF SELF.predefined_texts.size %]
|
|
55 |
[% IF SELF.predefined_texts.size %] |
|
52 | 56 |
<script type="text/javascript"> |
53 | 57 |
<!-- |
54 | 58 |
[% INCLUDE 'requirement_spec_text_block/_predefined_text_inserter.js' title_ctrl_id='_title' text_ctrl_id='_text' %] |
55 | 59 |
--> |
56 | 60 |
</script> |
57 |
[%- END %]
|
|
61 |
[% END %] |
|
58 | 62 |
</form> |
Auch abrufbar als: Unified diff
Neues Design 2019 Standard-Code templates/webpages/requirement_spec_text_block/_form.html