mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 03:33:49 +00:00
Extensions - Add: Assign a User on create.
This commit is contained in:
@@ -488,6 +488,29 @@ $text['label-user_record']['ru-ru'] = "Запись разговора";
|
||||
$text['label-user_record']['sv-se'] = "Spela In";
|
||||
$text['label-user_record']['uk-ua'] = "Запис розмов";
|
||||
|
||||
$text['label-user']['en-us'] = "User";
|
||||
$text['label-user']['en-gb'] = "User";
|
||||
$text['label-user']['ar-eg'] = "";
|
||||
$text['label-user']['de-at'] = "Benutzer"; //copied from de-de
|
||||
$text['label-user']['de-ch'] = "Benutzer"; //copied from de-de
|
||||
$text['label-user']['de-de'] = "Benutzer";
|
||||
$text['label-user']['el-gr'] = "Χρήστης";
|
||||
$text['label-user']['es-cl'] = "Usuario";
|
||||
$text['label-user']['es-mx'] = "Usuario"; //copied from es-cl
|
||||
$text['label-user']['fr-ca'] = "Utilisateur"; //copied from fr-fr
|
||||
$text['label-user']['fr-fr'] = "Utilisateur";
|
||||
$text['label-user']['he-il'] = "";
|
||||
$text['label-user']['it-it'] = "Utente";
|
||||
$text['label-user']['nl-nl'] = "";
|
||||
$text['label-user']['pl-pl'] = "Użytkownicy";
|
||||
$text['label-user']['pt-br'] = "Usuário";
|
||||
$text['label-user']['pt-pt'] = "Utilizadore";
|
||||
$text['label-user']['ro-ro'] = "";
|
||||
$text['label-user']['ru-ru'] = "Пользователь";
|
||||
$text['label-user']['sv-se'] = "Användare";
|
||||
$text['label-user']['uk-ua'] = "Користувачі";
|
||||
$text['label-user']['tr-tr'] = "Користувачі";
|
||||
|
||||
$text['label-users']['en-us'] = "Users";
|
||||
$text['label-users']['en-gb'] = "Users";
|
||||
$text['label-users']['ar-eg'] = "قائمة المستخدم";
|
||||
@@ -1966,8 +1989,8 @@ $text['description-user_record']['ru-ru'] = "Укажите, следует ли
|
||||
$text['description-user_record']['sv-se'] = "Välj om lokala, inkommande, utgående eller alla samtal skall spelas in.";
|
||||
$text['description-user_record']['uk-ua'] = "";
|
||||
|
||||
$text['description-user_list']['en-us'] = "Assign the users that are assigned to this extension. ";
|
||||
$text['description-user_list']['en-gb'] = "Assign the users that are assigned to this extension. ";
|
||||
$text['description-user_list']['en-us'] = "Assign users to this extension.";
|
||||
$text['description-user_list']['en-gb'] = "Assign users to this extension.";
|
||||
$text['description-user_list']['ar-eg'] = "";
|
||||
$text['description-user_list']['de-at'] = "Weisen Sie dieser Nebenstelle Benutzer zu."; //copied from de-de
|
||||
$text['description-user_list']['de-ch'] = "Weisen Sie dieser Nebenstelle Benutzer zu."; //copied from de-de
|
||||
|
||||
@@ -389,6 +389,14 @@
|
||||
}
|
||||
$array["extensions"][$i]["description"] = $description;
|
||||
|
||||
//assign the user to the extension
|
||||
if (is_uuid($_POST["extension_users"][0]["user_uuid"])) {
|
||||
$array["extension_users"][$i]["extension_user_uuid"] = uuid();
|
||||
$array["extension_users"][$i]["domain_uuid"] = $_SESSION['domain_uuid'];
|
||||
$array["extension_users"][$i]["user_uuid"] = $_POST["extension_users"][0]["user_uuid"];
|
||||
$array["extension_users"][$i]["extension_uuid"] = $extension_uuid;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//add or update voicemail
|
||||
@@ -473,6 +481,7 @@
|
||||
$database->execute($sql, $parameters);
|
||||
unset($sql, $parameters);
|
||||
}
|
||||
|
||||
//update device key label
|
||||
if (strlen($effective_caller_id_name) > 0) {
|
||||
$sql = "update v_device_keys set ";
|
||||
@@ -486,7 +495,8 @@
|
||||
$database->execute($sql, $parameters);
|
||||
unset($sql, $parameters);
|
||||
}
|
||||
//assign the user to the extension
|
||||
|
||||
//assign the user to an existing extension
|
||||
if ($action == "update" && is_uuid($_POST["extension_users"][0]["user_uuid"])) {
|
||||
$array["extension_users"][0]["extension_user_uuid"] = uuid();
|
||||
$array["extension_users"][0]["domain_uuid"] = $_SESSION['domain_uuid'];
|
||||
@@ -558,7 +568,7 @@
|
||||
$message = $database->message;
|
||||
unset($array);
|
||||
|
||||
// reload ACL if allowed
|
||||
//reload acl if allowed
|
||||
if (permission_exists("extension_cidr")) {
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) { event_socket_request($fp, "api reloadacl"); }
|
||||
@@ -937,11 +947,11 @@
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('extension_user_edit') && $action == "update") {
|
||||
if (permission_exists('extension_user_edit')) {
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell' valign='top'>".$text['label-users']."</td>";
|
||||
echo " <td class='vncell' valign='top'>".($action == "update" ? $text['label-users'] : $text['label-user'])."</td>";
|
||||
echo " <td class='vtable'>";
|
||||
if (count($assigned_users) > 0) {
|
||||
if (is_array($assigned_users) && @sizeof($assigned_users) != 0 && $action == "update") {
|
||||
echo " <table width='30%'>\n";
|
||||
foreach($assigned_users as $field) {
|
||||
echo " <tr>\n";
|
||||
@@ -961,7 +971,9 @@
|
||||
echo " <option value='".escape($field['user_uuid'])."'>".escape($field['username'])."</option>\n";
|
||||
}
|
||||
echo " </select>";
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add']]);
|
||||
if ($action == "update") {
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add']]);
|
||||
}
|
||||
echo " <br>\n";
|
||||
echo " ".$text['description-user_list']."\n";
|
||||
echo " <br />\n";
|
||||
|
||||
Reference in New Issue
Block a user