Reintegrated changes 3058 to 3060 (prerequisiste for templates into the portal) from trunk

SVN:2.0.2[3073]
This commit is contained in:
Romain Quetiez
2014-02-05 16:33:29 +00:00
parent f8b36a47a6
commit 1ad81260ae
11 changed files with 14 additions and 8 deletions

View File

@@ -253,7 +253,6 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
'Portal:ShowServices' => 'Service-Katalog',
'Portal:SelectRequestType' => 'Wählen Sie den Typ der Anfrage',
'Portal:SelectServiceElementFrom_Service' => 'Wählen Sie ein Service-Element für %1$s',
'Portal:SelectRequestTemplate' => 'Wählen Sie eine Template für %1$s',
'Portal:ListServices' => 'Liste der Services',
'Portal:TitleDetailsFor_Service' => 'Details für Service',
'Portal:Button:CreateRequestFromService' => 'EIne Benutzeranfrage betreffend dieses Diensts erzeugen',

View File

@@ -275,7 +275,6 @@ Dict::Add('EN US', 'English', 'English', array(
'Portal:ShowServices' => 'Service catalogue',
'Portal:SelectRequestType' => 'Select a type of request',
'Portal:SelectServiceElementFrom_Service' => 'Select a service element for %1$s',
'Portal:SelectRequestTemplate' => 'Select a template for %1$s',
'Portal:ListServices' => 'List of services',
'Portal:TitleDetailsFor_Service' => 'Details for Service',
'Portal:Button:CreateRequestFromService' => 'Create a Request for this service',

View File

@@ -279,7 +279,6 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
'Portal:ShowServices' => 'Catálogo de Servicios',
'Portal:SelectRequestType' => 'Seleccione un Tipo de Solicitud',
'Portal:SelectServiceElementFrom_Service' => 'Seleccione un Elemento de Servicio para %1$s',
'Portal:SelectRequestTemplate' => 'Seleccione una Plantilla para %1$s',
'Portal:ListServices' => 'Lista de Servicios',
'Portal:TitleDetailsFor_Service' => 'Detalles para el Servicio',
'Portal:Button:CreateRequestFromService' => 'Crear una Solicitud para este Servicio',

View File

@@ -264,7 +264,6 @@ Dict::Add('FR FR', 'French', 'Français', array(
'Portal:ShowServices' => 'Catalogue de service',
'Portal:SelectRequestType' => 'Sélectionnez un type de requête',
'Portal:SelectServiceElementFrom_Service' => 'Sélectionnez un élément de service pour %1$s',
'Portal:SelectRequestTemplate' => 'Sélectionnez un modèle de requête pour %1$s',
'Portal:ListServices' => 'Liste des services',
'Portal:TitleDetailsFor_Service' => 'Détail d\'un service',
'Portal:Button:CreateRequestFromService' => 'Créer une requête pour ce service',

View File

@@ -250,7 +250,6 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
'Portal:ShowServices' => 'サービスカタログ',
'Portal:SelectRequestType' => '要求のタイプを選択',
'Portal:SelectServiceElementFrom_Service' => '%1$s のサービス要素を選択',
'Portal:SelectRequestTemplate' => 'Select a template for %1$s のテンプレートを選択',
'Portal:ListServices' => 'サービスのリスト',
'Portal:TitleDetailsFor_Service' => 'サービスの詳細',
'Portal:Button:CreateRequestFromService' => 'このサービスへの要求を作成',

View File

@@ -810,6 +810,7 @@ Wenn Aktionen mit Trigger verknüpft sind, bekommt jede Aktion eine Auftragsnumm
'Portal:AddAttachment' => ' Attachment hinzufügen',
'Portal:RemoveAttachment' => 'Attachment entfernen',
'Portal:Attachment_No_To_Ticket_Name' => 'Attachment #%1$d an %2$s (%3$s)',
'Portal:SelectRequestTemplate' => 'Wählen Sie eine Template für %1$s',
'Enum:Undefined' => 'Nicht definiert',
'UI:DurationForm_Days_Hours_Minutes_Seconds' => '%1$s Tage %2$s Stunden %3$s Minuten %4$s Sekunden',
'UI:ModifyAllPageTitle' => 'Alle modifizieren',

View File

@@ -996,6 +996,7 @@ When associated with a trigger, each action is given an "order" number, specifyi
'Portal:AddAttachment' => ' Add Attachment ',
'Portal:RemoveAttachment' => ' Remove Attachment ',
'Portal:Attachment_No_To_Ticket_Name' => 'Attachment #%1$d to %2$s (%3$s)',
'Portal:SelectRequestTemplate' => 'Select a template for %1$s',
'Enum:Undefined' => 'Undefined',
'UI:DurationForm_Days_Hours_Minutes_Seconds' => '%1$s Days %2$s Hours %3$s Minutes %4$s Seconds',
'UI:ModifyAllPageTitle' => 'Modify All',

View File

@@ -995,6 +995,7 @@ Cuando se asocien con un disparador, cada acción recibe un número de "orden",
'Portal:AddAttachment' => 'Agregar Anexo',
'Portal:RemoveAttachment' => 'Borrar Anexo',
'Portal:Attachment_No_To_Ticket_Name' => 'Anexo #%1$d to %2$s (%3$s)',
'Portal:SelectRequestTemplate' => 'Seleccione una Plantilla para %1$s',
'Enum:Undefined' => 'No Definido',
'UI:DurationForm_Days_Hours_Minutes_Seconds' => '%1$s Días %2$s Hrs. %3$s Mins. %4$s Segs.',
'UI:ModifyAllPageTitle' => 'Modificar Todos',

View File

@@ -839,6 +839,7 @@ Lors de l\'association à un déclencheur, on attribue à chaque action un numé
'Portal:AddAttachment' => ' Ajouter une pièce jointe ',
'Portal:RemoveAttachment' => ' Enlever la pièce jointe ',
'Portal:Attachment_No_To_Ticket_Name' => 'Pièce jointe #%1$d à %2$s (%3$s)',
'Portal:SelectRequestTemplate' => 'Sélectionnez un modèle de requête pour %1$s',
'Enum:Undefined' => 'Non défini',
'UI:DurationForm_Days_Hours_Minutes_Seconds' => '%1$s J %2$s H %3$s min %4$s s',
'UI:ModifyAllPageTitle' => 'Modification par lots',

View File

@@ -816,6 +816,7 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
'Portal:AddAttachment' => ' 添付を追加 ',
'Portal:RemoveAttachment' => ' 添付を削除 ',
'Portal:Attachment_No_To_Ticket_Name' => '$2$s ($3$s)への添付 #%1$d',
'Portal:SelectRequestTemplate' => 'Select a template for %1$s のテンプレートを選択',
'Enum:Undefined' => '未定義',
'UI:DurationForm_Days_Hours_Minutes_Seconds' => '%1$s 日 %2$s 時 %3$s 分 %4$s 秒',
'UI:ModifyAllPageTitle' => '全てを修正',

View File

@@ -481,7 +481,7 @@ function RequestCreationForm($oP, $oUserOrg, $iSvcId = null, $iSubSvcId = null,
$sValue = "<span id=\"field_{$sInputId}\">".$oRequest->GetFormElementForField($oP, $sClass, $sAttCode, $oAttDef, $value, '', 'attr_'.$sAttCode, '', $iFlags, $aArgs).'</span>';
$aDetails[] = array('label' => $oAttDef->GetLabel(), 'value' => $sValue);
}
$aHidden = array();
if (!empty($aTemplateFields))
{
foreach ($aTemplateFields as $sAttCode => $oField)
@@ -536,7 +536,11 @@ EOF
}
}
}
if (isset($aParameters['template_id']) && ($aParameters['template_id'] != 0))
{
$oP->add("<input type=\"hidden\" name=\"attr_template_id\" value=\"{$aParameters['template_id']}\">");
}
$oP->add(implode("\n", $aHidden));
$oAttPlugin = new AttachmentPlugIn();
$oAttPlugin->OnDisplayRelations($oRequest, $oP, true /* edit */);
@@ -610,9 +614,11 @@ function DoCreateRequest($oP, $oUserOrg)
$sClass = ComputeClass($oServiceSubCategory->GetKey());
$oRequest = MetaModel::NewObject($sClass);
$aAttList = array_merge(explode(',', GetConstant($sClass, 'FORM_ATTRIBUTES')), array('service_id', 'servicesubcategory_id'));
$oRequest->UpdateObjectFromPostedForm('' /* form prefix */, $aAttList);
$oRequest->Set('org_id', $oUserOrg->GetKey());
$oRequest->Set('caller_id', UserRights::GetContactId());
$oRequest->UpdateObjectFromPostedForm();
if (isset($aParameters['moreinfo']))
{
// There is a template, insert it into the description