From 3560ade37614f43b6549d72e8619405acc4a3267 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 7 Jun 2012 11:33:52 +0000
Subject: [PATCH] Implemented: FS#1875 - Change select field for recipient in
 email catchall to input field

---
 interface/web/mail/form/mail_domain_catchall.tform.php     | 4 +++-
 interface/web/mail/lib/lang/de_mail_domain_catchall.lng    | 3 ++-
 interface/web/mail/lib/lang/en_mail_domain_catchall.lng    | 3 ++-
 interface/web/mail/templates/mail_domain_catchall_edit.htm | 4 +---
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/interface/web/mail/form/mail_domain_catchall.tform.php b/interface/web/mail/form/mail_domain_catchall.tform.php
index b2a40fe258..b308ed6c9c 100644
--- a/interface/web/mail/form/mail_domain_catchall.tform.php
+++ b/interface/web/mail/form/mail_domain_catchall.tform.php
@@ -90,13 +90,15 @@ $form["tabs"]['catchall'] = array (
 		),
 		'destination' => array (
 			'datatype'	=> 'VARCHAR',
-			'formtype'	=> 'SELECT',
+			'formtype'	=> 'TEXT',
 			'default'	=> '',
+			/*
 			'datasource'	=> array ( 	'type'			=> 'SQL',
 										'querystring' 	=> 'SELECT email FROM mail_user WHERE {AUTHSQL} ORDER BY email',
 										'keyfield'		=> 'email',
 										'valuefield'	=> 'email'
 									 ),
+			*/
 			'validators'	=> array ( 	0 => array (	'type'	=> 'ISEMAIL',
 														'errmsg'=> 'destination_error_isemail'),
 									),
diff --git a/interface/web/mail/lib/lang/de_mail_domain_catchall.lng b/interface/web/mail/lib/lang/de_mail_domain_catchall.lng
index 3ce4662d4b..68ea670b55 100644
--- a/interface/web/mail/lib/lang/de_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/de_mail_domain_catchall.lng
@@ -1,10 +1,11 @@
 <?php
 $wb['domain_txt'] = 'Domain';
-$wb['destination_txt'] = 'Ziel';
+$wb['destination_txt'] = 'Ziel Email';
 $wb['active_txt'] = 'Aktiv';
 $wb['domain_error_unique'] = 'Es besteht bereits ein Catchall-Eintrag für diese Domain.';
 $wb['no_domain_perm'] = 'Sie haben keine Berechtigung für diese Domain.';
 $wb['domain_error_regex'] = 'Ungültiger Domainname oder ungültige Zeichen im Domainnamen.';
 $wb['limit_mailcatchall_txt'] = 'Die maximale Anzahl an Catchall-Einträgen für ihr Konto wurde erreicht.';
 $wb["source_txt"] = 'Quelle';
+$wb['destination_error_isemail'] = 'Das Ziel ist keine gültige Emailadresse.';
 ?>
diff --git a/interface/web/mail/lib/lang/en_mail_domain_catchall.lng b/interface/web/mail/lib/lang/en_mail_domain_catchall.lng
index c8348a9671..1f1726e540 100644
--- a/interface/web/mail/lib/lang/en_mail_domain_catchall.lng
+++ b/interface/web/mail/lib/lang/en_mail_domain_catchall.lng
@@ -1,6 +1,6 @@
 <?php
 $wb["domain_txt"] = 'Domain';
-$wb["destination_txt"] = 'Destination';
+$wb["destination_txt"] = 'Destination Email';
 $wb["active_txt"] = 'Active';
 $wb["domain_error_unique"] = "There is already a Catchall record for this domain.";
 $wb["no_domain_perm"] = "You have no permission for this domain.";
@@ -8,4 +8,5 @@ $wb["domain_error_regex"] = 'Invalid domain name od domain contains invalid char
 $wb["limit_mailcatchall_txt"] = 'The max. number of email catchall accounts for your account is reached.';
 $wb['domain_txt'] = 'Domain';
 $wb["source_txt"] = 'Source';
+$wb['destination_error_isemail'] = 'Destination is no valid email address.';
 ?>
diff --git a/interface/web/mail/templates/mail_domain_catchall_edit.htm b/interface/web/mail/templates/mail_domain_catchall_edit.htm
index 90b8af7b44..d76dcfbce1 100644
--- a/interface/web/mail/templates/mail_domain_catchall_edit.htm
+++ b/interface/web/mail/templates/mail_domain_catchall_edit.htm
@@ -14,9 +14,7 @@
       </div>
       <div class="ctrlHolder">
       	<label for="destination">{tmpl_var name='destination_txt'}</label>
-        <select name="destination" id="destination" class="selectInput">
-					{tmpl_var name='destination'}
-				</select>
+        <input name="destination" id="destination" value="{tmpl_var name='destination'}" size="30" maxlength="255" type="text" class="textInput" />
       </div>
       <div class="ctrlHolder">
 				<p class="label">{tmpl_var name='active_txt'}</p>
-- 
GitLab