]> wagnertech.de Git - mfinanz.git/blob - templates/design40_webpages/requirement_spec/_form.html
date error in mapping
[mfinanz.git] / templates / design40_webpages / requirement_spec / _form.html
1 [% USE LxERP %]
2 [% USE L %]
3 [% USE HTML %]
4 [% 
5   DEFAULT id_prefix = 'basic_settings_form'
6           submit_as = 'post'
7 %]
8 <form method="post" action="controller.pl" id="[% id_prefix %]"[% UNLESS submit_as == 'post' %] class="edit-basic-settings-context-menu"[% END %]>
9 <div class="wrapper">
10
11 [% L.hidden_tag("id", SELF.requirement_spec.id, id=id_prefix _ '_id') %]
12 [% L.hidden_tag("requirement_spec.is_template", SELF.requirement_spec.is_template, id=id_prefix _ '_is_template') %]
13
14 <table class="tbl-horizontal rs_input_field">
15   <caption>[% LxERP.t8("Edit general settings") %]</caption>
16   <tbody>
17     <tr>
18      <th>[% LxERP.t8("Title") %]</th>
19      <td>[% L.input_tag("requirement_spec.title", SELF.requirement_spec.title, id=id_prefix _ '_title') %]</td>
20     </tr>
21     <tr>
22      <th>[% LxERP.t8("Requirement Spec Type") %]</th>
23      <td>[% L.select_tag("requirement_spec.type_id",  SELF.types, default=SELF.requirement_spec.type_id, title_key="description", id=id_prefix _ '_type_id') %]</td>
24     </tr>
25     [% UNLESS SELF.requirement_spec.is_template %]
26       <tr>
27        <th>[% LxERP.t8("Requirement Spec Status") %]</th>
28        <td>[% L.select_tag("requirement_spec.status_id",  SELF.statuses, default=SELF.requirement_spec.status_id, title_key="description", id=id_prefix _ '_status_id') %]</td>
29       </tr>
30       <tr>
31         <th>[% LxERP.t8("Customer") %]</th>
32         <td>[% 
33             L.select_tag("requirement_spec.customer_id",  SELF.customers, default=SELF.requirement_spec.customer_id, title_key="name", id=id_prefix _ '_customer_id',
34               onchange="kivi.requirement_spec.basic_settings_customer_changed('#" _ id_prefix _ "_customer_id', '#" _ id_prefix _ "_hourly_rate_as_number')") 
35         %]</td>
36       </tr>
37       <tr>
38         <th>[% LxERP.t8("Hourly Rate") %]</th>
39         <td>[% L.input_tag("requirement_spec.hourly_rate_as_number", SELF.requirement_spec.hourly_rate_as_number, id=id_prefix _ '_hourly_rate_as_number') %]</td>
40       </tr>
41     [% END %]
42     [% cvars = SELF.requirement_spec.cvars_by_config %]
43     [% FOREACH var = cvars %]
44       <tr>
45         <th>[% HTML.escape(var.config.description) %]</th>
46         <td>[% INCLUDE 'common/render_cvar_input.html'
47                         cvar_name_prefix = 'cvars.' %]</td>
48       </tr>
49     [% END %]
50   </tbody>
51 </table>
52
53 [% IF SELF.copy_source %]
54   [% L.hidden_tag('copy_source_id', SELF.copy_source.id) %]
55   <p>
56     [% IF SELF.requirement_spec.is_template %]
57       [% LxERP.t8("The new requirement spec template will be a copy of '#1'.", SELF.copy_source.title) %]
58     [% ELSE %]
59       [% LxERP.t8("The new requirement spec will be a copy of '#1' for customer '#2'.", SELF.copy_source.title, SELF.copy_source.customer.name) %]
60     [% END %]
61   </p>
62 [% END %]
63
64 <div class="buttons">
65 [% IF submit_as != 'post' %]
66   [% L.ajax_submit_tag("controller.pl?action=RequirementSpec/update",  "#" _ id_prefix, LxERP.t8("Save"), id=id_prefix _ '_submit') %]
67   <script type="text/javascript"><!--
68   $(function() {
69     $("#[% id_prefix %] INPUT[type=text]").keydown(function(event) {
70       if(event.keyCode == 13) {
71         event.preventDefault();
72         $('#[% id_prefix %]_submit').click();
73         return false;
74       }
75     });
76   });
77 --></script>
78 [% END %]
79  </div><!-- /.buttons -->
80 </div><!-- /.wrapper -->
81 </form>