mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01:00
ticketregeln added adresse
This commit is contained in:
parent
2cb1f91a43
commit
088ad4555c
@ -285,6 +285,7 @@ class TicketImportHelper
|
|||||||
tr.dsgvo AS `is_gdpr_relevant`,
|
tr.dsgvo AS `is_gdpr_relevant`,
|
||||||
tr.prio AS `priority`,
|
tr.prio AS `priority`,
|
||||||
tr.persoenlich AS `is_private`,
|
tr.persoenlich AS `is_private`,
|
||||||
|
tr.adresse,
|
||||||
tr.warteschlange AS `queue_id`
|
tr.warteschlange AS `queue_id`
|
||||||
FROM `ticket_regeln` AS `tr`
|
FROM `ticket_regeln` AS `tr`
|
||||||
WHERE
|
WHERE
|
||||||
@ -464,7 +465,7 @@ class TicketImportHelper
|
|||||||
$status = 'neu';
|
$status = 'neu';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "UPDATE `ticket` SET `dsgvo` = '".$rule['is_gdpr_relevant']."', `privat` = '".$rule['is_private']."', `prio` = '".$rule['priority']."', `warteschlange` = '".$rule['queue_id']."', `status` = '".$status."' WHERE `id` = '".$ticketId."'";
|
$sql = "UPDATE `ticket` SET `dsgvo` = '".$rule['is_gdpr_relevant']."', `privat` = '".$rule['is_private']."', `prio` = '".$rule['priority']."',`adresse` = '".$rule['adresse']."', `warteschlange` = '".$rule['queue_id']."', `status` = '".$status."' WHERE `id` = '".$ticketId."'";
|
||||||
|
|
||||||
$this->logger->debug('ticket rule sql',['sql' => $sql]);
|
$this->logger->debug('ticket rule sql',['sql' => $sql]);
|
||||||
|
|
||||||
|
@ -104771,6 +104771,17 @@
|
|||||||
"Privileges": "select,insert,update,references",
|
"Privileges": "select,insert,update,references",
|
||||||
"Comment": ""
|
"Comment": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Field": "adresse",
|
||||||
|
"Type": "int",
|
||||||
|
"Collation": null,
|
||||||
|
"Null": "NO",
|
||||||
|
"Key": "",
|
||||||
|
"Default": "0",
|
||||||
|
"Extra": "",
|
||||||
|
"Privileges": "select,insert,update,references",
|
||||||
|
"Comment": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Field": "warteschlange",
|
"Field": "warteschlange",
|
||||||
"Type": "text",
|
"Type": "text",
|
||||||
|
@ -23,10 +23,12 @@
|
|||||||
<tr><td>{|E-Mail Verfasser|}:</td><td><input type="text" name="sender_email" value="[SENDER_EMAIL]" size="40"></td></tr>
|
<tr><td>{|E-Mail Verfasser|}:</td><td><input type="text" name="sender_email" value="[SENDER_EMAIL]" size="40"></td></tr>
|
||||||
<tr><td>{|Verfasser Name|}:</td><td><input type="text" name="name" value="[NAME]" size="40"></td></tr>
|
<tr><td>{|Verfasser Name|}:</td><td><input type="text" name="name" value="[NAME]" size="40"></td></tr>
|
||||||
<tr><td>{|Betreff|}:</td><td><input type="text" name="betreff" value="[BETREFF]" size="40"></td></tr>
|
<tr><td>{|Betreff|}:</td><td><input type="text" name="betreff" value="[BETREFF]" size="40"></td></tr>
|
||||||
|
<tr><td colspan="2"><hr style="border-style:solid; border-width:1px"></td></tr>
|
||||||
<tr><td>{|Papierkorb|}:</td><td><input type="checkbox" name="spam" value="1" [SPAM] size="40"></td></tr>
|
<tr><td>{|Papierkorb|}:</td><td><input type="checkbox" name="spam" value="1" [SPAM] size="40"></td></tr>
|
||||||
<tr><td>{|Persönlich|}:</td><td><input type="checkbox" name="persoenlich" value="1" [PERSOENLICH] size="40"></td></tr>
|
<tr><td>{|Persönlich|}:</td><td><input type="checkbox" name="persoenlich" value="1" [PERSOENLICH] size="40"></td></tr>
|
||||||
<tr><td>{|Prio|}:</td><td><input type="checkbox" name="prio" value="1" [PRIO] size="40"></td></tr>
|
<tr><td>{|Prio|}:</td><td><input type="checkbox" name="prio" value="1" [PRIO] size="40"></td></tr>
|
||||||
<tr><td>{|DSGVO|}:</td><td><input type="checkbox" name="dsgvo" value="1" [DSGVO] size="40"></td></tr>
|
<tr><td>{|DSGVO|}:</td><td><input type="checkbox" name="dsgvo" value="1" [DSGVO] size="40"></td></tr>
|
||||||
|
<tr><td>{|Adresse|}:</td><td><input type="text" name="adresse" id="adresse" value="[ADRESSE]" size="40"></td></tr>
|
||||||
<tr><td>{|Verantwortliche Warteschlange|}:</td><td><input type="text" name="warteschlange" id="warteschlange" value="[WARTESCHLANGE]" size="40"></td></tr>
|
<tr><td>{|Verantwortliche Warteschlange|}:</td><td><input type="text" name="warteschlange" id="warteschlange" value="[WARTESCHLANGE]" size="40"></td></tr>
|
||||||
<tr><td>{|Aktiv|}:</td><td><input type="checkbox" name="aktiv" value="1" [AKTIV] size="40"></td></tr>
|
<tr><td>{|Aktiv|}:</td><td><input type="checkbox" name="aktiv" value="1" [AKTIV] size="40"></td></tr>
|
||||||
|
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
<div id="tabs-1">
|
<div id="tabs">
|
||||||
[MESSAGE]
|
<ul>
|
||||||
[TAB1]
|
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||||
[TAB1NEXT]
|
</ul>
|
||||||
|
<div id="tabs-1">
|
||||||
|
[MESSAGE]
|
||||||
|
[TAB1]
|
||||||
|
[TAB1NEXT]
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,18 +30,36 @@ class Ticketregeln {
|
|||||||
switch ($name) {
|
switch ($name) {
|
||||||
case "ticketregeln_list":
|
case "ticketregeln_list":
|
||||||
$allowed['ticketregeln_list'] = array('list');
|
$allowed['ticketregeln_list'] = array('list');
|
||||||
$heading = array('E-Mail Empfänger', 'E-Mail Verfasser', 'Verfasser Name', 'Betreff', 'Papierkorb', 'Persönlich', 'Prio', 'DSGVO', 'Verantw.', 'Aktiv', 'Menü');
|
$heading = array('E-Mail Empfänger', 'E-Mail Verfasser', 'Verfasser Name', 'Betreff', 'Papierkorb', 'Persönlich', 'Prio', 'DSGVO','Adresse', 'Verantw.', 'Aktiv', 'Menü');
|
||||||
$width = array('10%'); // Fill out manually later
|
$width = array('10%'); // Fill out manually later
|
||||||
|
|
||||||
$findcols = array('t.empfaenger_email', 't.sender_email', 't.name', 't.betreff', 't.spam', 't.persoenlich', 't.prio', 't.dsgvo', 't.warteschlange', 't.aktiv');
|
$findcols = array('t.empfaenger_email', 't.sender_email', 't.name', 't.betreff', 't.spam', 't.persoenlich', 't.prio', 't.dsgvo', 'a.name', 't.warteschlange', 't.aktiv');
|
||||||
$searchsql = array('t.empfaenger_email', 't.sender_email', 't.name', 't.betreff', 't.spam', 't.persoenlich', 't.prio', 't.dsgvo', 't.warteschlange', 't.aktiv');
|
$searchsql = array('t.empfaenger_email', 't.sender_email', 't.name', 't.betreff', 't.spam', 't.persoenlich', 't.prio', 't.dsgvo', 'a.name', 't.warteschlange', 't.aktiv');
|
||||||
|
|
||||||
$defaultorder = 1;
|
$defaultorder = 1;
|
||||||
$defaultorderdesc = 0;
|
$defaultorderdesc = 0;
|
||||||
|
|
||||||
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=ticketregeln&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a> <a href=\"#\" onclick=DeleteDialog(\"index.php?module=ticketregeln&action=delete&id=%value%\");>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a>" . "</td></tr></table>";
|
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=ticketregeln&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a> <a href=\"#\" onclick=DeleteDialog(\"index.php?module=ticketregeln&action=delete&id=%value%\");>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a>" . "</td></tr></table>";
|
||||||
|
|
||||||
$sql = "SELECT SQL_CALC_FOUND_ROWS t.id, t.empfaenger_email, t.sender_email, t.name, t.betreff, t.spam, t.persoenlich, t.prio, t.dsgvo, w.warteschlange, t.aktiv, t.id FROM ticket_regeln t LEFT JOIN warteschlangen w ON t.warteschlange = w.label";
|
$sql = "SELECT SQL_CALC_FOUND_ROWS t.id,
|
||||||
|
t.empfaenger_email,
|
||||||
|
t.sender_email,
|
||||||
|
t.name,
|
||||||
|
t.betreff,
|
||||||
|
t.spam,
|
||||||
|
t.persoenlich,
|
||||||
|
t.prio,
|
||||||
|
t.dsgvo,
|
||||||
|
a.name,
|
||||||
|
w.warteschlange,
|
||||||
|
t.aktiv,
|
||||||
|
t.id
|
||||||
|
FROM
|
||||||
|
ticket_regeln t
|
||||||
|
LEFT JOIN warteschlangen w ON t.warteschlange = w.label
|
||||||
|
LEFT JOIN adresse a ON t.adresse = a.id
|
||||||
|
|
||||||
|
";
|
||||||
|
|
||||||
$where = "1";
|
$where = "1";
|
||||||
$count = "SELECT count(DISTINCT id) FROM ticket_regeln WHERE $where";
|
$count = "SELECT count(DISTINCT id) FROM ticket_regeln WHERE $where";
|
||||||
@ -111,6 +129,7 @@ class Ticketregeln {
|
|||||||
n.mail,
|
n.mail,
|
||||||
t.quelle,
|
t.quelle,
|
||||||
t.warteschlange,
|
t.warteschlange,
|
||||||
|
t.adresse,
|
||||||
".$this->app->erp->FormatDateTimeShort('n.zeit','zeit').",
|
".$this->app->erp->FormatDateTimeShort('n.zeit','zeit').",
|
||||||
".$this->app->erp->FormatDateTimeShort('n.zeitausgang','zeitausgang').",
|
".$this->app->erp->FormatDateTimeShort('n.zeitausgang','zeitausgang').",
|
||||||
n.versendet,
|
n.versendet,
|
||||||
@ -130,6 +149,7 @@ class Ticketregeln {
|
|||||||
$input['sender_email'] = $last_message['mail'];
|
$input['sender_email'] = $last_message['mail'];
|
||||||
$input['name'] = $last_message['verfasser'];
|
$input['name'] = $last_message['verfasser'];
|
||||||
$input['betreff'] = $last_message['betreff'];
|
$input['betreff'] = $last_message['betreff'];
|
||||||
|
$input['adresse'] = $last_message['adresse'];
|
||||||
$input['warteschlange'] = $last_message['warteschlange'];
|
$input['warteschlange'] = $last_message['warteschlange'];
|
||||||
|
|
||||||
$from_ticket = true;
|
$from_ticket = true;
|
||||||
@ -139,6 +159,7 @@ class Ticketregeln {
|
|||||||
'sender_email' => $last_message['mail'],
|
'sender_email' => $last_message['mail'],
|
||||||
'name' => $last_message['verfasser'],
|
'name' => $last_message['verfasser'],
|
||||||
'betreff' => $last_message['betreff'],
|
'betreff' => $last_message['betreff'],
|
||||||
|
'adresse' => $last_message['adresse'],
|
||||||
'warteschlange' => $last_message['warteschlange'],
|
'warteschlange' => $last_message['warteschlange'],
|
||||||
'aktiv' => 1
|
'aktiv' => 1
|
||||||
);
|
);
|
||||||
@ -156,6 +177,7 @@ class Ticketregeln {
|
|||||||
|
|
||||||
// Add checks here
|
// Add checks here
|
||||||
$input['warteschlange'] = explode(" ",$input['warteschlange'])[0]; // Just the label
|
$input['warteschlange'] = explode(" ",$input['warteschlange'])[0]; // Just the label
|
||||||
|
$input['adresse'] = $this->app->erp->ReplaceAdresse(true,$input['adresse'],true); // Parameters: Target db?, value, from form?
|
||||||
|
|
||||||
$columns = "id, ";
|
$columns = "id, ";
|
||||||
$values = "$id, ";
|
$values = "$id, ";
|
||||||
@ -193,7 +215,22 @@ class Ticketregeln {
|
|||||||
|
|
||||||
|
|
||||||
// Load values again from database
|
// Load values again from database
|
||||||
$result = $this->app->DB->SelectArr("SELECT t.id, t.empfaenger_email, t.sender_email, t.name, t.betreff, t.spam, t.persoenlich, t.prio, t.dsgvo, CONCAT(w.label,' ',w.warteschlange) as warteschlange, t.aktiv, t.id FROM ticket_regeln t LEFT JOIN warteschlangen w on t.warteschlange = w.label WHERE t.id=$id")[0];
|
$result = $this->app->DB->SelectArr("SELECT t.id,
|
||||||
|
t.empfaenger_email,
|
||||||
|
t.sender_email,
|
||||||
|
t.name,
|
||||||
|
t.betreff,
|
||||||
|
t.spam,
|
||||||
|
t.persoenlich,
|
||||||
|
t.prio,
|
||||||
|
t.dsgvo,
|
||||||
|
t.adresse,
|
||||||
|
CONCAT(w.label,' ',w.warteschlange) as warteschlange,
|
||||||
|
t.aktiv,
|
||||||
|
t.id
|
||||||
|
FROM ticket_regeln t
|
||||||
|
LEFT JOIN warteschlangen w on t.warteschlange = w.label
|
||||||
|
WHERE t.id=$id")[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -206,12 +243,16 @@ class Ticketregeln {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$this->app->Tpl->Set('PRIO', $result['prio']==1?"checked":"");
|
$this->app->Tpl->Set('PRIO', $result['prio']==1?"checked":"");
|
||||||
$this->app->Tpl->Set('SPAM', $result['spam']==1?"checked":"");
|
$this->app->Tpl->Set('SPAM', $result['spam']==1?"checked":"");
|
||||||
$this->app->Tpl->Set('PERSOENLICH', $result['persoenlich']==1?"checked":"");
|
$this->app->Tpl->Set('PERSOENLICH', $result['persoenlich']==1?"checked":"");
|
||||||
$this->app->Tpl->Set('DSGVO', $result['dsgvo']==1?"checked":"");
|
$this->app->Tpl->Set('DSGVO', $result['dsgvo']==1?"checked":"");
|
||||||
$this->app->Tpl->Set('AKTIV', $result['aktiv']==1?"checked":"");
|
$this->app->Tpl->Set('AKTIV', $result['aktiv']==1?"checked":"");
|
||||||
|
|
||||||
|
$this->app->Tpl->Set('ADRESSE', $this->app->erp->ReplaceAdresse(false,$result['adresse'],false));
|
||||||
|
$this->app->YUI->AutoComplete("adresse","adresse");
|
||||||
$this->app->YUI->AutoComplete("warteschlange","warteschlangename");
|
$this->app->YUI->AutoComplete("warteschlange","warteschlangename");
|
||||||
|
|
||||||
// $this->SetInput($input);
|
// $this->SetInput($input);
|
||||||
@ -226,15 +267,16 @@ class Ticketregeln {
|
|||||||
//$input['EMAIL'] = $this->app->Secure->GetPOST('email');
|
//$input['EMAIL'] = $this->app->Secure->GetPOST('email');
|
||||||
|
|
||||||
$input['empfaenger_email'] = $this->app->Secure->GetPOST('empfaenger_email');
|
$input['empfaenger_email'] = $this->app->Secure->GetPOST('empfaenger_email');
|
||||||
$input['sender_email'] = $this->app->Secure->GetPOST('sender_email');
|
$input['sender_email'] = $this->app->Secure->GetPOST('sender_email');
|
||||||
$input['name'] = $this->app->Secure->GetPOST('name');
|
$input['name'] = $this->app->Secure->GetPOST('name');
|
||||||
$input['betreff'] = $this->app->Secure->GetPOST('betreff');
|
$input['betreff'] = $this->app->Secure->GetPOST('betreff');
|
||||||
$input['spam'] = $this->app->Secure->GetPOST('spam');
|
$input['spam'] = $this->app->Secure->GetPOST('spam');
|
||||||
$input['persoenlich'] = $this->app->Secure->GetPOST('persoenlich');
|
$input['persoenlich'] = $this->app->Secure->GetPOST('persoenlich');
|
||||||
$input['prio'] = $this->app->Secure->GetPOST('prio');
|
$input['prio'] = $this->app->Secure->GetPOST('prio');
|
||||||
$input['dsgvo'] = $this->app->Secure->GetPOST('dsgvo');
|
$input['dsgvo'] = $this->app->Secure->GetPOST('dsgvo');
|
||||||
$input['warteschlange'] = $this->app->Secure->GetPOST('warteschlange');
|
$input['adresse'] = $this->app->Secure->GetPOST('adresse');
|
||||||
$input['aktiv'] = $this->app->Secure->GetPOST('aktiv');
|
$input['warteschlange'] = $this->app->Secure->GetPOST('warteschlange');
|
||||||
|
$input['aktiv'] = $this->app->Secure->GetPOST('aktiv');
|
||||||
|
|
||||||
|
|
||||||
return $input;
|
return $input;
|
||||||
|
Loading…
Reference in New Issue
Block a user