mirror of
				https://github.com/Mibew/java.git
				synced 2025-10-31 18:41:09 +03:00 
			
		
		
		
	Added department description at select department screen
This commit is contained in:
		
							parent
							
								
									2dc674e5d6
								
							
						
					
					
						commit
						f2ab19036a
					
				| @ -330,6 +330,7 @@ function setup_survey($name, $email, $groupid, $info, $referrer) | ||||
| 		$allgroups = get_groups($link, false); | ||||
| 		close_connection($link); | ||||
| 		$val = ""; | ||||
| 		$groupdescriptions = array(); | ||||
| 		foreach ($allgroups as $k) { | ||||
| 			$groupname = $k['vclocalname']; | ||||
| 			if ($k['inumofagents'] == 0) { | ||||
| @ -338,14 +339,18 @@ function setup_survey($name, $email, $groupid, $info, $referrer) | ||||
| 			if ($k['ilastseen'] !== NULL && $k['ilastseen'] < $settings['online_timeout']) { | ||||
| 				if (!$groupid) { | ||||
| 					$groupid = $k['groupid']; // select first online group
 | ||||
| 					$defaultdescription = $k['vclocaldescription']; | ||||
| 				} | ||||
| 			} else { | ||||
| 				$groupname .= " (offline)"; | ||||
| 			} | ||||
| 			$isselected = $k['groupid'] == $groupid; | ||||
| 			$val .= "<option value=\"" . $k['groupid'] . "\"" . ($isselected ? " selected=\"selected\"" : "") . ">$groupname</option>"; | ||||
| 			$groupdescriptions[] = $k['vclocaldescription']; | ||||
| 		} | ||||
| 		$page['groups'] = $val; | ||||
| 		$page['group.descriptions'] = json_encode($groupdescriptions); | ||||
| 		$page['default.department.description'] = empty($defaultdescription)?' ':$defaultdescription; | ||||
| 	} | ||||
| 
 | ||||
| 	$page['showemail'] = $settings["surveyaskmail"] == "1" ? "1" : ""; | ||||
|  | ||||
| @ -396,6 +396,7 @@ permission.viewthreads=View another operator's chat thread | ||||
| permissions.intro=Change restrictions and available features for this operator. | ||||
| permissions.title=Permissions | ||||
| presurvey.department=Choose Department: | ||||
| presurvey.department.description=Department description: | ||||
| presurvey.intro=Thank you for contacting us. Please fill out the form below and click the Start Chat button. | ||||
| presurvey.mail=Email: | ||||
| presurvey.name=Name: | ||||
|  | ||||
| @ -394,6 +394,7 @@ permission.viewthreads= | ||||
| permissions.intro=Здесь вы можете управлять возможностями оператора. | ||||
| permissions.title=Возможности оператора | ||||
| presurvey.department=Выберите отдел: | ||||
| presurvey.department.description=Îïèñàíèå îòäåëà: | ||||
| presurvey.intro=Спасибо, что связались с нами! Заполните, пожалуйста, небольшую форму и нажмите "Начать диалог". | ||||
| presurvey.mail=E-mail: | ||||
| presurvey.name=Ваше имя: | ||||
|  | ||||
| @ -34,7 +34,9 @@ | ||||
| 	text-decoration:none; | ||||
| } | ||||
| </style> | ||||
| 
 | ||||
| ${if:groups} | ||||
| <script type="text/javascript">groupDescriptions = ${page:group.descriptions};</script> | ||||
| ${endif:groups} | ||||
| </head> | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" style="margin:0px;"> | ||||
| <table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| @ -114,9 +116,13 @@ ${if:groups} | ||||
| 			<tr> | ||||
| 				<td class="text">${msg:presurvey.department}</td> | ||||
| 				<td> | ||||
| 				<select name="group" style="min-width:200px;">${page:groups}</select> | ||||
| 				<select name="group" style="min-width:200px;" onchange="document.getElementById('departmentDescription').childNodes.item(0).data = groupDescriptions[this.selectedIndex];">${page:groups}</select> | ||||
| 				</td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 				<td class="text">${msg:presurvey.department.description}</td> | ||||
| 				<td class="text" id="departmentDescription">${page:default.department.description}</td> | ||||
| 			</tr> | ||||
| ${endif:groups} | ||||
| 
 | ||||
| 			<tr> | ||||
|  | ||||
| @ -20,6 +20,9 @@ | ||||
| .isubmit { background-position:0px -39px; width: 40px; height: 35px; } | ||||
| .isubmitrest { background-position:-31px -39px; width: 10px; height: 35px;} | ||||
| </style> | ||||
| ${if:groups} | ||||
| <script type="text/javascript">groupDescriptions = ${page:group.descriptions};</script> | ||||
| ${endif:groups} | ||||
| </head> | ||||
| <body bgcolor="#FFFFFF" style="background-image: url(${tplroot}/images/bg.gif); margin: 0px;" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400"> | ||||
| <table width="100%" style="height: 100%;" cellspacing="0" cellpadding="0" border="0"> | ||||
| @ -75,10 +78,16 @@ ${if:groups} | ||||
| 			<td class="text">${msg:presurvey.department}</td> | ||||
| 			<td width="20"></td> | ||||
| 			<td> | ||||
| 			<select name="group" style="min-width:200px;">${page:groups}</select> | ||||
| 			<select name="group" style="min-width:200px;" onchange="document.getElementById('departmentDescription').childNodes.item(0).data = groupDescriptions[this.selectedIndex];">${page:groups}</select> | ||||
| 			</td> | ||||
| 		</tr> | ||||
| 		<tr><td height="7" colspan="3"></td></tr> | ||||
| 		<tr> | ||||
| 			<td class="text">${msg:presurvey.department.description}</td> | ||||
| 			<td width="20"></td> | ||||
| 			<td class="text" id="departmentDescription">${page:default.department.description}</td> | ||||
| 		</tr> | ||||
| 		<tr><td height="7" colspan="3"></td></tr> | ||||
| ${endif:groups} | ||||
| 
 | ||||
| 		<tr> | ||||
|  | ||||
| @ -4,6 +4,9 @@ | ||||
| 	<title>${msg:presurvey.title}</title> | ||||
| 	<link rel="shortcut icon" href="${webimroot}/images/favicon.ico" type="image/x-icon"/> | ||||
| 	<link rel="stylesheet" type="text/css" href="${tplroot}/chat.css" /> | ||||
| 	${if:groups} | ||||
| 	<script type="text/javascript">groupDescriptions = ${page:group.descriptions};</script> | ||||
| 	${endif:groups} | ||||
| </head> | ||||
| <body class="bgbody"> | ||||
| 	<div id="top2"> | ||||
| @ -53,7 +56,11 @@ | ||||
| 		${if:groups} | ||||
| 			<tr> | ||||
| 				<td><strong>${msg:presurvey.department}</strong></td> | ||||
| 				<td><select name="group">${page:groups}</select></td> | ||||
| 				<td><select name="group" onchange="document.getElementById('departmentDescription').childNodes.item(0).data = groupDescriptions[this.selectedIndex];">${page:groups}</select></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 				<td><strong>${msg:presurvey.department.description}</strong></td> | ||||
| 				<td id="departmentDescription">${page:default.department.description}</td> | ||||
| 			</tr> | ||||
| 		${endif:groups} | ||||
| 			<tr> | ||||
|  | ||||
| @ -4,6 +4,9 @@ | ||||
| <title>${msg:presurvey.title}</title> | ||||
| <link rel="shortcut icon" href="${webimroot}/images/favicon.ico" type="image/x-icon"/> | ||||
| <link rel="stylesheet" type="text/css" href="${tplroot}/chat.css" /> | ||||
| ${if:groups} | ||||
| <script type="text/javascript">groupDescriptions = ${page:group.descriptions};</script> | ||||
| ${endif:groups} | ||||
| </head> | ||||
| <body> | ||||
| <div id="whitebg"> | ||||
| @ -44,7 +47,11 @@ | ||||
| 						${if:groups} | ||||
| 							<tr> | ||||
| 								<td class="text">${msg:presurvey.department}</td> | ||||
| 								<td><select name="group" style="min-width:200px;">${page:groups}</select></td> | ||||
| 								<td><select name="group" style="min-width:200px;" onchange="document.getElementById('departmentDescription').childNodes.item(0).data = groupDescriptions[this.selectedIndex];">${page:groups}</select></td> | ||||
| 							</tr> | ||||
| 							<tr> | ||||
| 								<td class="text">${msg:presurvey.department.description}</td> | ||||
| 								<td class="text" id="departmentDescription">${page:default.department.description}</td> | ||||
| 							</tr> | ||||
| 						${endif:groups} | ||||
| 						<tr> | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user