diff --git a/admin/editapplication.php b/admin/editapplication.php index 45f2fd5c0a..ae75761307 100644 --- a/admin/editapplication.php +++ b/admin/editapplication.php @@ -56,7 +56,7 @@ $t->set_var("lang_app_name",lang_admin("application name")); $t->set_var("lang_app_title",lang_admin("application title")); $t->set_var("lang_enabled",lang_admin("enabled")); - $t->set_var("lang_add",lang_common("add")); + $t->set_var("lang_submit_button",lang_common("edit")); $t->set_var("app_name_value",$phpgw->db->f("app_name")); $t->set_var("app_title_value",$phpgw->db->f("app_title")); diff --git a/admin/lang/en_admin.inc.php b/admin/lang/en_admin.inc.php index 86390ff5b5..0162f9029a 100755 --- a/admin/lang/en_admin.inc.php +++ b/admin/lang/en_admin.inc.php @@ -44,6 +44,12 @@ case "installed applications": $s = "Installed applications"; break; + case "select permissions this group will have": + $s = "Select permissions this group will have"; break; + + case "sorry, that group name has already been taking.": + $s = "Sorry, that group name has already been taking."; break; + case "add new application": $s = "Add new application"; break; diff --git a/admin/newapplication.php b/admin/newapplication.php index 174dd17de5..b31cfcc0fe 100644 --- a/admin/newapplication.php +++ b/admin/newapplication.php @@ -52,7 +52,7 @@ $t->set_var("lang_app_name",lang_admin("application name")); $t->set_var("lang_app_title",lang_admin("application title")); $t->set_var("lang_enabled",lang_admin("enabled")); - $t->set_var("lang_add",lang_common("add")); + $t->set_var("lang_submit_button",lang_common("add")); $t->set_var("app_name_value",""); $t->set_var("app_title_value",""); diff --git a/admin/newgroup.php b/admin/newgroup.php index b5b8cb29c3..189cf92eba 100755 --- a/admin/newgroup.php +++ b/admin/newgroup.php @@ -18,16 +18,19 @@ $phpgw_flags["currentapp"] = "admin"; include("../header.inc.php"); + $t = new Template($phpgw_info["server"]["template_dir"]); + $t->set_file(array("form" => "groups_form.tpl")); + if ($submit) { $phpgw->db->query("select count(*) from groups where group_name='" . $n_group . "'"); $phpgw->db->next_record(); if ($phpgw->db->f(0) != 0) { - $error = "

" . lang_admin("Sorry, that group name has already been taking.") . "
"; + $error = lang_admin("Sorry, that group name has already been taking."); } if (! $error) { - //$phpgw->db->lock(array("accounts","groups")); + $phpgw->db->lock(array("accounts","groups")); $phpgw->db->query("INSERT INTO groups (group_name,group_apps) VALUES " . "('$n_group','" @@ -55,7 +58,7 @@ if (! mkdir ($basedir . $n_group, 0707)) $cd = 37; - //$phpgw->db->unlock(); + $phpgw->db->unlock(); Header("Location: " . $phpgw->link("groups.php","cd=$cd")); exit; @@ -65,66 +68,56 @@ if ($error) { $phpgw->common->header(); $phpgw->common->navbar(); - echo "

$error
"; + $t->set_var("error","

$error
"); + } else { + $t->set_var("error",""); } - ?> -
- - - session->hidden_var() . "'; - $phpgw->db->query("select count(*) from accounts where status !='L'"); - $phpgw->db->next_record(); + $t->set_var("form_action","newgroup.php"); + $t->set_var("hidden_vars",$phpgw->session->hidden_var()); + $t->set_var("lang_group_name",lang_admin("New group name")); + $t->set_var("group_name_value",""); - if ($phpgw->db->f(0) < 5) { - $size = $phpgw->db->f(0); - } else { - $size = 5; - } + $phpgw->db->query("select count(*) from accounts where status !='L'"); + $phpgw->db->next_record(); - echo "\n"; + $phpgw->db->query("SELECT con,firstname,lastname, loginid FROM accounts where " + . "status != 'L' ORDER BY lastname,firstname,loginid asc"); + while ($phpgw->db->next_record()) { + $user_list .= ""; + } + $t->set_var("user_list",$user_list); - for ($i=0; $iset_var("lang_permissions",lang_admin("Select permissions this group will have")); + for ($i=0; $i"; + while ($permission = each($phpgw_info["apps"])) { + if ($permission[1]["enabled"]) { + $permissions_list .= ""; + } + } + $t->set_var("permissions_list",$permissions_list); + $t->set_var("lang_submit_button",lang_admin("Create Group")); - ?> - - - - - -
" . lang_admin("New group name") - . '
" . lang_admin("Select users for inclusion") . " " - . "
" . lang_admin("Select permissions this group will have") . " " - . "
- "> -
- pparse("out","form"); + + include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");