mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-05 13:00:14 +01:00
Converted new accounts to work off templates
This commit is contained in:
parent
2753cf9bb7
commit
5008306a5d
@ -11,11 +11,9 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "disable_message_class" => True,
|
||||||
|
"disable_send_class" => True, "currentapp" => "admin");
|
||||||
|
|
||||||
$phpgw_info["flags"]["disable_message_class"] = True;
|
|
||||||
$phpgw_info["flags"]["disable_send_class"] = True;
|
|
||||||
$phpgw_info["flags"]["currentapp"] = "admin";
|
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
if ($submit) {
|
if ($submit) {
|
||||||
$totalerrors = 0;
|
$totalerrors = 0;
|
||||||
@ -93,54 +91,50 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$t = new Template($phpgw_info["server"]["template_dir"]);
|
||||||
|
$t->set_file(array("form" => "account_form.tpl"));
|
||||||
|
|
||||||
$phpgw->common->phpgw_header();
|
$phpgw->common->phpgw_header();
|
||||||
$phpgw->common->navbar();
|
$phpgw->common->navbar();
|
||||||
|
|
||||||
echo "<p><b>" . lang("Add new account") . "</b><hr><br>";
|
$t->set_var("lang_action",lang("Add new account"));
|
||||||
|
|
||||||
if ($totalerrors) {
|
if ($totalerrors) {
|
||||||
echo "<center>" . $phpgw->common->error_list($error) . "</center>";
|
$t->set_var("error_messages","<center>" . $phpgw->common->error_list($error) . "</center>");
|
||||||
|
} else {
|
||||||
|
$t->set_var("error_messages","");
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
$t->set_var("form_action",$phpgw->link("newaccount.php"));
|
||||||
<form method="POST" action="<?php echo $phpgw->link("newaccount.php"); ?>">
|
$t->set_var("lang_loginid",lang("LoginID"));
|
||||||
<center>
|
$t->set_var("n_loginid_value",$n_loginid);
|
||||||
<table border=0 width=65%>
|
|
||||||
<tr>
|
$t->set_var("lang_password",lang("Password"));
|
||||||
<td><?php echo lang("LoginID"); ?></td>
|
$t->set_var("n_passwd_value",$n_passwd);
|
||||||
<td><input name="n_loginid" value="<?php echo $n_loginid; ?>"></td>
|
|
||||||
</tr>
|
$t->set_var("lang_reenter_password",lang("Re-Enter Password"));
|
||||||
<tr>
|
$t->set_var("n_passwd_2_value",$n_passwd_2);
|
||||||
<td><?php echo lang("Password"); ?></td>
|
|
||||||
<td><input type="password" name="n_passwd" value="<?php echo $n_passwd; ?>"></td>
|
$t->set_var("lang_firstname",lang("First Name"));
|
||||||
</tr>
|
$t->set_var("n_firstname_value",$firstname_value);
|
||||||
<tr>
|
|
||||||
<td><?php echo lang("Re-Enter Password"); ?></td>
|
$t->set_var("lang_lastname",lang("Last Name"));
|
||||||
<td><input type="password" name="n_passwd_2" value="<?php echo $n_passwd_2; ?>"></td>
|
$t->set_var("n_lastname_value",$lastname_value);
|
||||||
</tr>
|
|
||||||
<tr>
|
$t->set_var("lang_groups",lang("Groups"));
|
||||||
<td><?php echo lang("First Name"); ?></td>
|
$group_select = '<select name="n_groups[]" multiple>';
|
||||||
<td><input name="n_firstname" value="<?php echo $n_firstname; ?>"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><?php echo lang("Last Name"); ?></td>
|
|
||||||
<td><input name="n_lastname" value="<?php echo $n_lastname; ?>"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><?php echo lang("Groups"); ?></td>
|
|
||||||
<td><select name="n_groups[]" multiple><?php
|
|
||||||
$phpgw->db->query("select * from groups");
|
$phpgw->db->query("select * from groups");
|
||||||
while ($phpgw->db->next_record()) {
|
while ($phpgw->db->next_record()) {
|
||||||
echo "<option value=\"" . $phpgw->db->f("group_id") . "\"";
|
$group_select .= "<option value=\"" . $phpgw->db->f("group_id") . "\"";
|
||||||
if ($n_groups[$phpgw->db->f("group_id")]) {
|
if ($n_groups[$phpgw->db->f("group_id")]) {
|
||||||
echo " selected";
|
$group_select .= " selected";
|
||||||
}
|
}
|
||||||
echo ">" . $phpgw->db->f("group_name") . "</option>";
|
$group_select .= ">" . $phpgw->db->f("group_name") . "</option>";
|
||||||
}
|
}
|
||||||
?>
|
$group_select .= "</select>";
|
||||||
</select></td>
|
$t->set_var("groups_select",$group_select);
|
||||||
</tr>
|
|
||||||
<?php
|
$t->set_var("","");
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($permission = each($phpgw_info["apps"])) {
|
while ($permission = each($phpgw_info["apps"])) {
|
||||||
if ($permission[1]["enabled"]) {
|
if ($permission[1]["enabled"]) {
|
||||||
@ -153,37 +147,31 @@
|
|||||||
for ($i=0;$i<200;) { // The $i<200 is only used for a brake
|
for ($i=0;$i<200;) { // The $i<200 is only used for a brake
|
||||||
if (! $perm_display[$i][1]) break;
|
if (! $perm_display[$i][1]) break;
|
||||||
|
|
||||||
echo '<tr><td>' . lang($perm_display[$i][1]) . '</td>'
|
$perms_html .= '<tr><td>' . lang($perm_display[$i][1]) . '</td>'
|
||||||
. '<td><input type="checkbox" name="new_permissions['
|
. '<td><input type="checkbox" name="new_permissions['
|
||||||
. $perm_display[$i][0] . ']" value="True"';
|
. $perm_display[$i][0] . ']" value="True"';
|
||||||
if ($new_permissions[$perm_display[$i][0]]) {
|
if ($new_permissions[$perm_display[$i][0]]) {
|
||||||
echo " checked";
|
$perms_html .= " checked";
|
||||||
}
|
}
|
||||||
echo "></td>";
|
$perms_html .= "></td>";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
if (! $perm_display[$i][1]) break;
|
if (! $perm_display[$i][1]) break;
|
||||||
|
|
||||||
echo '<td>' . lang($perm_display[$i][1]) . '</td>'
|
$perms_html .= '<td>' . lang($perm_display[$i][1]) . '</td>'
|
||||||
. '<td><input type="checkbox" name="new_permissions['
|
. '<td><input type="checkbox" name="new_permissions['
|
||||||
. $perm_display[$i][0] . ']" value="True"';
|
. $perm_display[$i][0] . ']" value="True"';
|
||||||
if ($new_permissions[$perm_display[$i][0]]) {
|
if ($new_permissions[$perm_display[$i][0]]) {
|
||||||
echo " checked";
|
$perms_html .= " checked";
|
||||||
}
|
}
|
||||||
echo "></td></tr>";
|
$perms_html .= "></td></tr>";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
?>
|
$t->set_var("permissions_list",$perms_html);
|
||||||
<tr>
|
|
||||||
<td colspan=2>
|
$t->set_var("lang_button",Lang("Add"));
|
||||||
<input type="submit" name="submit" value="<?php echo lang("submit"); ?>">
|
$t->pparse("out","form");
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</center>
|
|
||||||
</form>
|
|
||||||
<?php
|
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user