]> wagnertech.de Git - mfinanz.git/blob - templates/design40_webpages/admin/edit_group.html
date error in mapping
[mfinanz.git] / templates / design40_webpages / admin / edit_group.html
1 [% USE HTML %]
2 [% USE L %]
3 [% USE LxERP %]
4
5 [% INCLUDE 'common/flash.html' %]
6
7 <h1>[% HTML.escape(title) %]</h1>
8
9
10 <form method="post" action="controller.pl" id="form">
11 [% L.hidden_tag("group.id", SELF.group.id) %]
12 [% L.hidden_tag("action", "") %]
13
14 <div class="wrapper">
15
16 <div class="col wi-wide">
17 <h2>[% LxERP.t8("Settings") %]</h2>
18
19 <table class="tbl-horizontal">
20   <tbody>
21     <tr>
22       <th>[% LxERP.t8('Name') %]</th>
23       <td>[% L.input_tag("group.name", SELF.group.name, class="initial_focus") %]</td>
24     </tr>
25     <tr>
26       <th>[% LxERP.t8('Description') %]</th>
27       <td>[% L.input_tag("group.description", SELF.group.description) %]</td>
28     </tr>
29   </tbody>
30 </table>
31
32 <h2>[% LxERP.t8("Access rights") %]</h2>
33
34 [% SET granted_rights = SELF.group.rights_map %]
35
36 [% FOREACH section = SELF.all_rights %]
37 [% SET section_number = loop.count %]
38 [% SET num_checked = 0 %]
39 [% FOREACH right = section.rights %]
40   [% SET name = right.name %]
41   [% IF granted_rights.$name %][% SET num_checked = num_checked + 1 %][% END %]
42 [% END %]
43
44 <div class="boxes">
45 <h3 title="[% LxERP.t8('Select/Deselect all') %]">[% L.checkbox_tag('dummy' _ section_number, label=LxERP.t8('Section "#1"', section.description), checkall='.checkallgroup' _ section_number, checked=(num_checked == section.rights.size), title=LxERP.t8("Select/Deselect")) %]</h3>
46    [% FOREACH right = section.rights %]
47     [% SET name = right.name %]
48     <div>[% L.checkbox_tag("group.rights_map." _ name, label=right.description, checked=granted_rights.$name, class="checkallgroup" _ section_number) %]</div>
49      [% END %]
50   </div>
51  [% END %]
52
53 </div><!-- /.col -->
54
55 <div class="col">
56 <h2>[% LxERP.t8("Group membership") %]</h2>
57
58 [% IF SELF.all_users.size %]
59 <div class="ms2side">
60   <p>[% LxERP.t8("The following users are a member of this group") %]:</p>
61   <!-- vormals:.clearfix -->
62   [% L.select_tag("group.users[]", SELF.all_users, id="group_users", title_key="login", default=SELF.group.users, default_value_key='id', multiple=1) %]
63   [% L.multiselect2side("group_users", labelsx => LxERP.t8("All users"), labeldx => LxERP.t8("Users that are a member in this group")) %]
64 </div>
65 [% ELSE %]
66   <p>[% LxERP.t8("No users have been created yet.") %]</p>
67 [% END %]
68
69
70 <h2>[% LxERP.t8("Client assignment") %]</h2>
71
72 [% IF SELF.all_clients.size %]
73 <div class="ms2side">
74   <p>[% LxERP.t8("This group is valid for the following clients") %]:</p>
75   <!-- vormals:.clearfix -->
76   [% L.select_tag("group.clients[]", SELF.all_clients, id="group_clients", title_key="name", default=SELF.group.clients, default_value_key='id', multiple=1) %]
77   [% L.multiselect2side("group_clients", labelsx => LxERP.t8("All clients"), labeldx => LxERP.t8("Clients this Group is valid for")) %]
78 </div>
79
80 [% ELSE %]
81   <p>[% LxERP.t8("No clients have been created yet.") %]</p>
82 [% END %]
83
84
85 <div class="buttons">
86   [% L.link(SELF.url_for(action="show"), LxERP.t8("Back"), class="button neutral") %]
87
88   [% L.button_tag("submit_with_action('save_group')", LxERP.t8("Save")) %]
89   [% IF SELF.group.id %]
90     [% L.button_tag("save_as_new()", LxERP.t8("Save as new")) %]
91     [% L.button_tag("submit_with_action('delete_group')", LxERP.t8("Delete"), confirm=LxERP.t8("Are you sure?")) %]
92   [% END %]
93 </div>
94
95 </div><!-- /.col -->
96
97 </div><!-- /.wrapper -->
98 </form>
99
100 <script type="text/javascript">
101  <!--
102   function submit_with_action(action) {
103     $("#action").val("Admin/" + action);
104     $("#form").submit();
105   }
106
107   function save_as_new() {
108     var new_group_name = prompt("[% LxERP.t8("Please enter the name for the new group.") %]", "");
109     if (!new_group_name)
110       return;
111
112     $("#group_name").val(new_group_name);
113     $("#group_id").val("");
114     submit_with_action("save_group");
115   }
116    -->
117 </script>