Added cancel edition hotkey
[fa-stable.git] / admin / users.php
index 941129fb817c0fd51a80f48a77bb1eca0bdd0db1..775cc813e52684efce278629d9945bdb3b52d368 100644 (file)
@@ -1,13 +1,13 @@
 <?php
 /**********************************************************************
     Copyright (C) FrontAccounting, LLC.
-       Released under the terms of the GNU Affero General Public License,
-       AGPL, as published by the Free Software Foundation, either version 
-       of the License, or (at your option) any later version.
+       Released under the terms of the GNU General Public License, GPL, 
+       as published by the Free Software Foundation, either version 3 
+       of the License, or (at your option) any later version.
     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
-    See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 $page_security=15;
 $path_to_root="..";
@@ -77,6 +77,15 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
                                $_POST['phone'], $_POST['email'], $_POST['Access'], $_POST['language'],
                                $_POST['profile'], check_value('rep_popup'), $_POST['pos']);
 
+                       // use current user display preferences as start point for new user
+                       update_user_display_prefs($_POST['user_id'], 
+                               user_price_dec(), user_qty_dec(), user_exrate_dec(), 
+                               user_percent_dec(), user_show_gl_info(), user_show_codes(), 
+                               user_date_format(), user_date_sep(), user_tho_sep(), 
+                               user_dec_sep(), user_theme(), user_pagesize(), user_hints(), 
+                               $_POST['profile'], check_value('rep_popup'), user_query_size(), 
+                               user_graphic_links(), $_POST['language']);
+
                        display_notification_centered(_("A new user has been added."));
        }
                $Mode = 'RESET';
@@ -125,7 +134,7 @@ while ($myrow = db_fetch($result))
        label_cell($myrow["user_id"]);
        label_cell($myrow["real_name"]);
        label_cell($myrow["phone"]);
-       label_cell("<a href=mailto:" . $myrow["email"]. ">" . $myrow["email"]. "</a>");
+       email_cell($myrow["email"]);
        label_cell($last_visit_date, "nowrap");
        label_cell($security_headings[$myrow["full_access"]]);
        edit_button_cell("Edit".$myrow["user_id"], _("Edit"));
@@ -173,7 +182,10 @@ if ($selected_id != '')
 else 
 { //end of if $selected_id only do the else when a new record is being entered
        text_row(_("User Login:"), "user_id",  null, 22, 20);
-       $_POST['rep_popup'] = 1;
+       $_POST['language'] = user_language();
+       $_POST['profile'] = user_print_profile();
+       $_POST['rep_popup'] = user_rep_popup();
+       $_POST['pos'] = user_pos();
 }
 $_POST['password'] = "";
 start_row();
@@ -190,7 +202,7 @@ text_row_ex(_("Full Name").":", 'real_name',  50);
 
 text_row_ex(_("Telephone No.:"), 'phone', 30);
 
-text_row_ex("<a href='Mailto:".$_POST['email']."'>" . _("Email Address:") . "</a>", 'email', 50);
+email_row_ex(_("Email Address:"), 'email', 50);
 
 security_headings_list_row(_("Access Level:"), 'Access', null); 
 
@@ -206,7 +218,7 @@ check_row(_("Use popup window for reports:"), 'rep_popup', $_POST['rep_popup'],
 
 end_table(1);
 
-submit_add_or_update_center($selected_id == '', '', true);
+submit_add_or_update_center($selected_id == '', '', 'both');
 
 end_form();
 end_page();