36 |
36 |
37 if (isset($_POST['commit'])) { |
37 if (isset($_POST['commit'])) { |
38 update_perm_templ_details($_POST); |
38 update_perm_templ_details($_POST); |
39 } |
39 } |
40 |
40 |
41 $templ_details = get_permission_template_details($id); |
41 $templ = get_permission_template_details($id); |
42 $perms_templ = get_permissions_by_template_id($id); |
42 $perms_templ = get_permissions_by_template_id($id); |
43 $perms_avail = get_permissions_by_template_id(); |
43 $perms_avail = get_permissions_by_template_id(); |
44 |
44 |
45 echo " <h2>" . _('Edit permission template') . "</h2>\n"; |
45 echo " <h2>" . _('Edit permission template') . "</h2>\n"; |
46 echo " <form method=\"post\">\n"; |
46 echo " <form method=\"post\">\n"; |
47 echo " <input type=\"hidden\" name=\"templ_id\" value=\"" . $id . "\">\n"; |
47 echo " <input type=\"hidden\" name=\"templ_id\" value=\"" . $id . "\">\n"; |
48 |
48 |
49 foreach ($templ_details as $templ) { |
49 echo " <table>\n"; |
50 echo " <table>\n"; |
50 echo " <tr>\n"; |
51 echo " <tr>\n"; |
51 echo " <th>" . _('Name') . "</th>\n"; |
52 echo " <th>" . _('Name') . "</th>\n"; |
52 echo " <td><input class=\"wide\" type=\"text\" name=\"templ_name\" value=\"" . $templ['name'] . "\"></td>\n"; |
53 echo " <td><input class=\"wide\" type=\"text\" name=\"templ_name\" value=\"" . $templ['name'] . "\"></td>\n"; |
53 echo " </tr>\n"; |
54 echo " </tr>\n"; |
54 echo " <tr>\n"; |
55 echo " <tr>\n"; |
55 echo " <th>" . _('Description') . "</th>\n"; |
56 echo " <th>" . _('Description') . "</th>\n"; |
56 echo " <td><input class=\"wide\" type=\"text\" name=\"templ_descr\" value=\"" . $templ['descr'] . "\"></td>\n"; |
57 echo " <td><input class=\"wide\" type=\"text\" name=\"templ_descr\" value=\"" . $templ['descr'] . "\"></td>\n"; |
57 echo " </tr>\n"; |
58 echo " </tr>\n"; |
58 echo " </table>\n"; |
59 echo " </table>\n"; |
|
60 } |
|
61 |
59 |
62 echo " <table>\n"; |
60 echo " <table>\n"; |
63 echo " <tr>\n"; |
61 echo " <tr>\n"; |
64 echo " <th> </th>\n"; |
62 echo " <th> </th>\n"; |
65 echo " <th>" . _('Name') . "</th>\n"; |
63 echo " <th>" . _('Name') . "</th>\n"; |