Merge lp:~felmas/mvhub/add_referer_contact_email into lp:mvhub

Proposed by Ferhat Elmas
Status: Merged
Merged at revision: 571
Proposed branch: lp:~felmas/mvhub/add_referer_contact_email
Merge into: lp:mvhub
Diff against target: 67 lines (+28/-4)
2 files modified
app-mvhub/DocumentRoot/cgi-bin/mvhub/contact_form.pl (+21/-1)
app-mvhub/conf/templates/html/contact_form.tmpl (+7/-3)
To merge this branch: bzr merge lp:~felmas/mvhub/add_referer_contact_email
Reviewer Review Type Date Requested Status
MVHub devs with commit rights Pending
Review via email: mp+66641@code.launchpad.net

Description of the change

improve of contact email with referer

To post a comment you must log in.
Revision history for this message
Dan MacNeil (omacneil) wrote :

Looks like these lines:

58 +
59 + <td><span class="warning">
60 + <!-- tmpl_var error-referer --></span></td>

... are still there.

If FormBuilder requires <!-- tmpl_var error-referer --> , that is fine but no need for the <span></span> which inserts blank line.

This is a really, really microscopic flaw, but it is also very easy to fix.

573. By Ferhat Elmas <ferhat@veteran-linux>

associate with bug 539662 ( improve contact form with referer info )

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'app-mvhub/DocumentRoot/cgi-bin/mvhub/contact_form.pl'
--- app-mvhub/DocumentRoot/cgi-bin/mvhub/contact_form.pl 2010-10-22 19:49:21 +0000
+++ app-mvhub/DocumentRoot/cgi-bin/mvhub/contact_form.pl 2011-07-01 20:06:38 +0000
@@ -31,6 +31,11 @@
31 );31 );
3232
33 $form->field(33 $form->field(
34 name => 'referer',
35 type => 'hidden',
36 required => 1
37 );
38 $form->field(
34 name => 'name',39 name => 'name',
35 size => 45,40 size => 45,
36 label => 'Your name',41 label => 'Your name',
@@ -75,7 +80,7 @@
75 From => $fields->{name} . ' <' . $fields->{liame} . '>',80 From => $fields->{name} . ' <' . $fields->{liame} . '>',
76 To => $cfg->param('NOTIFICATION.admin_email'),81 To => $cfg->param('NOTIFICATION.admin_email'),
77 Subject => $subject,82 Subject => $subject,
78 Data => $fields->{question},83 Data => $fields->{question} . " \nREFERER: " . $fields->{referer},
79 );84 );
80 MVHub::Common::sendmail($mail);85 MVHub::Common::sendmail($mail);
8186
@@ -89,6 +94,21 @@
8994
90 }95 }
91 else {96 else {
97 if ( $ENV{HTTP_REFERER} ) {
98 $form->field(
99 name => 'referer',
100 value => $ENV{HTTP_REFERER},
101 force => 1
102 );
103 }
104 else {
105 $form->field(
106 name => 'referer',
107 value => 'not available, user came to contact directly',
108 force => 1
109 );
110 }
111
92 my $show_nsp_left_menu = 0;112 my $show_nsp_left_menu = 0;
93 if ( $site_code eq 'nsp' ) {113 if ( $site_code eq 'nsp' ) {
94 $show_nsp_left_menu = 1;114 $show_nsp_left_menu = 1;
95115
=== modified file 'app-mvhub/conf/templates/html/contact_form.tmpl'
--- app-mvhub/conf/templates/html/contact_form.tmpl 2010-07-21 20:00:54 +0000
+++ app-mvhub/conf/templates/html/contact_form.tmpl 2011-07-01 20:06:38 +0000
@@ -23,9 +23,13 @@
23 comments, please <strong>fill out the form23 comments, please <strong>fill out the form
24 below</strong>, and we will respond within 224 below</strong>, and we will respond within 2
25 business days.</p><!-- tmpl_var form-start -->25 business days.</p><!-- tmpl_var form-start -->
2626 <!-- tmpl_var field-referer -->
27 <table summary='contact form'>27 <span class="warning">
28 <tr>28 <!-- tmpl_var error-referer --></span>
29
30 <table summary='contact form'>
31
32 <tr>
29 <td><!-- tmpl_var label-name -->:</td>33 <td><!-- tmpl_var label-name -->:</td>
3034
31 <td><!-- tmpl_var field-name --></td>35 <td><!-- tmpl_var field-name --></td>

Subscribers

People subscribed via source and target branches