Revision 1579
Added by Dietmar almost 13 years ago
branches/2.8.x/CHANGELOG | ||
---|---|---|
11 | 11 |
! = Update/Change |
12 | 12 |
|
13 | 13 |
=========================== add small Features 2.8.2 ========================== |
14 |
16 Jan-2012 Build 1579 Dietmar Woellbrink (Luisehahne) |
|
15 |
- remove unneeded input fields in form settings |
|
14 | 16 |
16 Jan-2012 Build 1578 Dietmar Woellbrink (Luisehahne) |
15 | 17 |
# fixed warning in domain independend image links |
16 | 18 |
16 Jan-2012 Build 1577 Dietmar Woellbrink (Luisehahne) |
branches/2.8.x/wb/admin/interface/version.php | ||
---|---|---|
52 | 52 |
|
53 | 53 |
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled) |
54 | 54 |
if(!defined('VERSION')) define('VERSION', '2.8.2'); |
55 |
if(!defined('REVISION')) define('REVISION', '1578');
|
|
55 |
if(!defined('REVISION')) define('REVISION', '1579');
|
|
56 | 56 |
if(!defined('SP')) define('SP', 'SP2'); |
branches/2.8.x/wb/modules/form/modify_settings.php | ||
---|---|---|
53 | 53 |
$setting['email_to'] = ($setting['email_to'] != '' ? $setting['email_to'] : emailAdmin()); |
54 | 54 |
$setting['email_subject'] = ($setting['email_subject'] != '') ? $setting['email_subject'] : ''; |
55 | 55 |
$setting['success_email_subject'] = ($setting['success_email_subject'] != '') ? $setting['success_email_subject'] : ''; |
56 |
$setting['success_email_from'] = ($setting['success_email_from'] != '' ? $setting['success_email_from'] : SERVER_EMAIL);
|
|
56 |
$setting['success_email_from'] = $admin->add_slashes(SERVER_EMAIL);
|
|
57 | 57 |
$setting['success_email_fromname'] = ($setting['success_email_fromname'] != '' ? $setting['success_email_fromname'] : WBMAILER_DEFAULT_SENDERNAME); |
58 | 58 |
$setting['success_email_subject'] = ($setting['success_email_subject'] != '') ? $setting['success_email_subject'] : ''; |
59 | 59 |
} |
... | ... | |
141 | 141 |
<input type="text" name="email_to" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['email_to'])); ?>" /> |
142 | 142 |
</td> |
143 | 143 |
</tr> |
144 |
|
|
144 | 145 |
<tr> |
145 |
<td class="frm-setting_name"><?php echo $TEXT['EMAIL'].' '.$MOD_FORM['FROM']; ?>:</td> |
|
146 |
<td class="frm-setting_value"> |
|
147 |
<select name="email_from_field" style="width: 98%;"> |
|
148 |
<option value="" onclick="javascript: document.getElementById('email_from').style.display = 'block';"><?php echo $TEXT['CUSTOM']; ?>:</option> |
|
149 |
<?php |
|
150 |
$selected = false; |
|
151 |
$email_from_value = str_replace($raw, $friendly, ($setting['email_from'])); |
|
152 |
// $query_email_fields = $database->query("SELECT field_id,title FROM ".TABLE_PREFIX."mod_form_fields WHERE section_id = '$section_id' AND ( type = 'textfield' OR type = 'email' ) ORDER BY position ASC"); |
|
153 |
$sql = 'SELECT `field_id`, `title` FROM `'.TABLE_PREFIX.'mod_form_fields` '; |
|
154 |
$sql .= 'WHERE `section_id` = '.(int)$section_id.' '; |
|
155 |
$sql .= ' AND ( `type` = \'textfield\' OR `type` = \'email\' )'; |
|
156 |
$sql .= 'ORDER BY `position` ASC '; |
|
157 |
if($query_email_fields = $database->query($sql)) { |
|
158 |
if($query_email_fields->numRows() > 0) { |
|
159 |
while($field = $query_email_fields->fetchRow(MYSQL_ASSOC)) { |
|
160 |
?> |
|
161 |
<option value="field<?php echo $field['field_id']; ?>"<?php if($email_from_value == 'field'.$field['field_id']) { echo ' selected'; $selected = true; } ?> onclick="javascript: document.getElementById('email_from').style.display = 'none';"> |
|
162 |
<?php echo $TEXT['FIELD'].': '.$field['title']; ?> |
|
163 |
</option> |
|
164 |
<?php |
|
165 |
} |
|
166 |
} |
|
167 |
} |
|
168 |
?> |
|
169 |
</select> |
|
170 |
<input type="text" name="email_from" id="email_from" style="width: 98%; display: <?php if(isset($selected) AND $selected == true) { echo 'none'; } else { echo 'block'; } ?>;" maxlength="255" value="<?php if(substr($email_from_value, 0, 5) != 'field') { echo $email_from_value; } ?>" /> |
|
171 |
</td> |
|
172 |
</tr> |
|
173 |
<tr> |
|
174 | 146 |
<td class="frm-setting_name"><?php echo $TEXT['DISPLAY_NAME']; ?>:</td> |
175 | 147 |
<td class="frm-setting_value"> |
176 |
<select name="email_fromname_field" style="width: 98%;"> |
|
177 |
<option value="" onclick="javascript: document.getElementById('email_fromname').style.display = 'block';" ><?php echo $TEXT['CUSTOM']; ?>:</option> |
|
178 |
<?php |
|
179 |
$selected = false; |
|
180 |
$email_fromname_value = str_replace($raw, $friendly, ($setting['email_fromname'])); |
|
181 |
if($query_email_fields->rewind()) { |
|
182 |
if($query_email_fields->numRows() > 0) { |
|
183 |
//!-- LOOP email_from_name --> |
|
184 |
while($fieldFrom = $query_email_fields->fetchRow(MYSQL_ASSOC)) { |
|
185 |
?> |
|
186 |
<option value="field<?php echo $fieldFrom['field_id']; ?>"<?php if($email_fromname_value == 'field'.$fieldFrom['field_id']) { echo ' selected'; $selected = true; } ?> onclick="javascript: document.getElementById('email_fromname').style.display = 'none';"> |
|
187 |
<?php echo $TEXT['FIELD'].': '.$fieldFrom['title']; ?> |
|
188 |
</option> |
|
189 |
<?php |
|
190 |
} |
|
191 |
//!-- ENDLOOP --> |
|
192 |
} |
|
193 |
} |
|
194 |
?> |
|
195 |
</select> |
|
196 |
<input type="text" name="email_fromname" id="email_fromname" style="width: 98%; display: <?php if(isset($selected) AND $selected == true) { echo 'none'; } else { echo 'block'; } ?>;" maxlength="255" value="<?php if(substr($email_fromname_value, 0, 5) != 'field') { echo $email_fromname_value; } ?>" /> |
|
148 |
<input type="text" name="email_fromname" id="email_fromname" style="width: 98%; ?>;" maxlength="255" value="<?php echo $setting['success_email_fromname']; ?>" /> |
|
197 | 149 |
</td> |
198 | 150 |
</tr> |
199 | 151 |
<tr> |
... | ... | |
221 | 173 |
$success_email_to = str_replace($raw, $friendly, ($setting['success_email_to'])); |
222 | 174 |
$sql = 'SELECT `field_id`, `title` FROM `'.TABLE_PREFIX.'mod_form_fields` '; |
223 | 175 |
$sql .= 'WHERE `section_id` = '.(int)$section_id.' '; |
224 |
$sql .= ' AND ( `type` = \'textfield\' OR `type` = \'email\' )';
|
|
176 |
$sql .= ' AND ( `type` = \'email\' AND required = \'1\' )';
|
|
225 | 177 |
$sql .= 'ORDER BY `position` ASC '; |
226 | 178 |
if($query_email_fields = $database->query($sql)) { |
227 | 179 |
if($query_email_fields->numRows() > 0) { |
... | ... | |
238 | 190 |
</select> |
239 | 191 |
</td> |
240 | 192 |
</tr> |
193 |
|
|
241 | 194 |
<tr> |
242 |
<td class="frm-setting_name"><?php echo $TEXT['EMAIL'].' '.$MOD_FORM['FROM']; ?>:</td> |
|
243 |
<td class="frm-setting_value"> |
|
244 |
<input type="text" name="success_email_from" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['success_email_from'])); ?>" /> |
|
245 |
</td> |
|
246 |
</tr> |
|
247 |
<tr> |
|
248 | 195 |
<td class="frm-setting_name"><?php echo $TEXT['DISPLAY_NAME']; ?>:</td> |
249 | 196 |
<td class="frm-setting_value"> |
250 | 197 |
<?php $setting['success_email_fromname'] = ($setting['success_email_fromname'] != '' ? $setting['success_email_fromname'] : WBMAILER_DEFAULT_SENDERNAME); ?> |
branches/2.8.x/wb/modules/form/view.php | ||
---|---|---|
287 | 287 |
|
288 | 288 |
// $email_to = $fetch_settings['email_to']; |
289 | 289 |
$email_to = (($fetch_settings['email_to'] != '') ? $fetch_settings['email_to'] : emailAdmin()); |
290 |
$email_from = $fetch_settings['email_from']; |
|
290 |
$email_from = $admin->add_slashes(SERVER_EMAIL); |
|
291 |
/* |
|
291 | 292 |
if(substr($email_from, 0, 5) == 'field') { |
292 | 293 |
// Set the email from field to what the user entered in the specified field |
293 | 294 |
$email_from = htmlspecialchars($wb->add_slashes($_POST[$email_from])); |
294 | 295 |
} |
296 |
*/ |
|
295 | 297 |
$email_fromname = $fetch_settings['email_fromname']; |
296 | 298 |
if(substr($email_fromname, 0, 5) == 'field') { |
297 | 299 |
// Set the email_fromname to field to what the user entered in the specified field |
... | ... | |
304 | 306 |
// Set the success_email to field to what the user entered in the specified field |
305 | 307 |
$success_email_to = htmlspecialchars($wb->add_slashes($_POST[$success_email_to])); |
306 | 308 |
} |
307 |
$success_email_from = $fetch_settings['success_email_from'];
|
|
309 |
$success_email_from = $admin->add_slashes(SERVER_EMAIL);
|
|
308 | 310 |
$success_email_fromname = $fetch_settings['success_email_fromname']; |
309 | 311 |
$success_email_text = htmlspecialchars($wb->add_slashes($fetch_settings['success_email_text'])); |
310 | 312 |
$success_email_text = (($success_email_text != '') ? $success_email_text : $MOD_FORM['SUCCESS_EMAIL_TEXT']); |
... | ... | |
442 | 444 |
$success_email_text = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "", $success_email_text ); |
443 | 445 |
if($success_email_to != '') { |
444 | 446 |
if($success_email_from != '') { |
445 |
if($wb->mail($success_email_from,$success_email_to,$success_email_subject,($success_email_text).$MOD_FORM['SUCCESS_EMAIL_TEXT_GENERATED'],$success_email_fromname)) {
|
|
447 |
if($wb->mail(SERVER_EMAIL,$success_email_to,$success_email_subject,($success_email_text).$MOD_FORM['SUCCESS_EMAIL_TEXT_GENERATED'],$success_email_fromname)) {
|
|
446 | 448 |
$success = true; |
447 | 449 |
} |
448 | 450 |
} else { |
branches/2.8.x/wb/modules/form/README.de.txt | ||
---|---|---|
7 | 7 |
E-Mail Optionen in Formular Einstellungen |
8 | 8 |
----------------------------------------- |
9 | 9 |
E-Mail Empfänger: wenn leer dann wird automatisch mit Superadmin (user_id==1) E-Mail vorbelegt |
10 |
E-Mail Absender: Benutzerdefiniert oder Field E-Mail Adresse ( depecrated ) |
|
11 |
Angezeigter Name: Benutzerdefiniert oder Field Name |
|
12 |
E-Mail Betreff: wenn leer dann senden mit $MOD_FORM['EMAIL_SUBJECT'] |
|
10 |
Angezeigter Name: Benutzerdefiniert oder WBMAILER_DEFAULT_SENDERNAME |
|
11 |
E-Mail Betreff: Benutzerdefiniert oder wenn leer dann senden mit $MOD_FORM['EMAIL_SUBJECT'] |
|
13 | 12 |
|
14 | 13 |
E-Mail Bestätigung in Formular Einstellungen |
15 | 14 |
-------------------------------------------- |
16 |
E-Mail Empfänger: wenn leer dann keine Bestätigungs E-Mail an Sender |
|
17 |
E-Mail Absender: wenn leer dann Vorbelegung mit SERVER_EMAIL (Eintrag unter Optionen Maileinstellungen) |
|
18 |
Angezeigter Name: wenn leer dann Vorbelegung mit WBMAILER_DEFAULT_SENDERNAME (Eintrag unter Optionen Maileinstellungen) |
|
19 |
E-Mail Betreff: wenn leer dann senden mit $MOD_FORM['SUCCESS_EMAIL_SUBJECT'] |
|
20 |
E-Mail Text: wenn leer dann senden mit $MOD_FORM['SUCCESS_EMAIL_TEXT'].$MOD_FORM['SUCCESS_EMAIL_TEXT_GENERATED'] |
|
15 |
E-Mail Empfänger: wenn Auswahl "keine"" dann keine Bestätigungs E-Mail an Sender |
|
16 |
Angezeigter Name: Benutzerdefiniert oder WBMAILER_DEFAULT_SENDERNAME (Eintrag unter Optionen Maileinstellungen) |
|
17 |
E-Mail Betreff: Benutzerdefiniert oder wenn leer dann senden mit $MOD_FORM['SUCCESS_EMAIL_SUBJECT'] |
|
18 |
E-Mail Text: Benutzerdefiniert oder wenn leer dann senden mit $MOD_FORM['SUCCESS_EMAIL_TEXT'].$MOD_FORM['SUCCESS_EMAIL_TEXT_GENERATED'] |
|
21 | 19 |
|
branches/2.8.x/wb/modules/form/save_settings.php | ||
---|---|---|
57 | 57 |
$footer = $admin->add_slashes($_POST['footer']); |
58 | 58 |
$email_to = $admin->add_slashes($_POST['email_to']); |
59 | 59 |
$email_to = ($email_to != '' ? $email_to : emailAdmin()); |
60 |
$email_from = $admin->add_slashes(SERVER_EMAIL); |
|
60 | 61 |
$use_captcha = $admin->add_slashes($_POST['use_captcha']); |
61 |
|
|
62 |
/* |
|
62 | 63 |
if( isset($_POST['email_from_field']) && ($_POST['email_from_field'] != '')) { |
63 | 64 |
$email_from = $admin->add_slashes($_POST['email_from_field']); |
64 | 65 |
} else { |
65 | 66 |
$email_from = $admin->add_slashes($_POST['email_from']); |
66 | 67 |
} |
67 |
|
|
68 |
*/ |
|
68 | 69 |
if( isset($_POST['email_fromname_field']) && ($_POST['email_fromname_field'] != '')) { |
69 | 70 |
$email_fromname = $admin->add_slashes($_POST['email_fromname_field']); |
70 | 71 |
} else { |
... | ... | |
75 | 76 |
$email_subject = (($email_subject != '') ? $email_subject : ''); |
76 | 77 |
$success_page = $admin->add_slashes($_POST['success_page']); |
77 | 78 |
$success_email_to = $admin->add_slashes($_POST['success_email_to']); |
78 |
$success_email_from = $admin->add_slashes($_POST['success_email_from']);
|
|
79 |
$success_email_from = $admin->add_slashes(SERVER_EMAIL);
|
|
79 | 80 |
$success_email_fromname = $admin->add_slashes($_POST['success_email_fromname']); |
80 | 81 |
$success_email_fromname = ($success_email_fromname != '' ? $success_email_fromname : WBMAILER_DEFAULT_SENDERNAME); |
81 | 82 |
$success_email_text = $admin->add_slashes($_POST['success_email_text']); |
Also available in: Unified diff
remove unneeded input fields in form settings