summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xform.cgi48
1 files changed, 23 insertions, 25 deletions
diff --git a/form.cgi b/form.cgi
index 005fd5e..16242c3 100755
--- a/form.cgi
+++ b/form.cgi
@@ -5,14 +5,14 @@ use CGI::FormBuilder;
my $build_path = '../build';
# TODO: check if protocol-agnostic URL works
-my $webroot = 'http://bynu.biks.dk/feedback/';
-my $req_path = $build_path . '/html/feedback/index.html';
-my $ack_path = $build_path . '/html/feedback/tak/index.html';
+my $webroot = 'https://omni-presence.dk/contact/';
+my $req_path = $build_path . '/html/contact/index.html';
+my $ack_path = $build_path . '/html/contact/thanks/index.html';
-my $webmaster = 'info@byvandring.nu';
-#my $frontdesk = 'info@byvandring.nu';
-my $frontdesk = 'siri@jones.dk';
-my $helpdesk = 'siri@jones.dk';
+my $webmaster = 'webmaster@couchdesign.dk';
+#my $frontdesk = 'info@omni-presence.dk';
+my $frontdesk = 'anniqalewis@gmail.com';
+my $helpdesk = 'dr@jones.dk';
# Set this to 1 for a separate confirmation page
my ($confirm) = 1;
@@ -21,39 +21,37 @@ my ($confirm) = 1;
my $valid_email = '/^[+_A-Za-z0-9-]+(\.[+_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[_A-Za-z0-9-]+)$/';
my $form = CGI::FormBuilder->new(
- lang => 'da',
- title => 'Feedback til Byvandring.nu',
+ lang => 'en',
+ title => 'Omni-presence contact form',
method => 'POST',
fields => [qw/
- kommentar
- postnr
+ comment
+ zip
email
/],
validate => {
- postnr => INT,
+ zip => INT,
email => $valid_email,
_email => $valid_email, #fake check to silence warning of variable used only once
},
required => [qw/
- kommentar
+ comment
/],
- messages => ':da_DK',
- submit => ['Send oplysningerne'],
+ messages => ':en_US',
+ submit => ['Send the info'],
action => $webroot, #avoids loosing submitted values when redirected from other site
);
$form->field(
- name => 'postnr',
- label => 'Postnummer',
+ name => 'zip',
+ label => 'Postal nummer',
size => 5,
- comment => '(hvis du har lyst)'
);
$form->field(
name => 'email',
- comment => '(hvis du vil kontaktes igen)'
);
$form->field(
- name => 'kommentar',
+ name => 'comment',
type => 'textarea',
rows => 3,
);
@@ -63,14 +61,14 @@ my ($mail_from) = $webmaster;
my ($mail_to, $mail_subject);
if ($form->submitted) {
- $infostring = "Tak for din feedback!";
+ $infostring = "Thanks for your interest in omni-presence!";
if ($form->validate) {
$mail_to = $frontdesk;
- $mail_subject = 'Feedback til Byvandring.nu';
+ $mail_subject = 'Omni-presence contact form';
} else {
$mail_to = "$frontdesk, $helpdesk";
- $mail_subject = 'FEJL ved feedback til Byvandring.nu';
- $infostring .= "\n<P>OBS! Der var fejl i et eller flere af felterne. Informationerne er sendt uanset, men det anbefales at gå tilbage, checke at alle felter er udfyldt korrekt, og derefter sende igen.";
+ $mail_subject = 'ERROR in omni-presence contact form';
+ $infostring .= "\n<P>NB! There was an error in one or more of the fields. The info was sent anyway, but you are afviced to go back, check that all fields are properly filed out, and then send again.";
$confirm = 0;
};
# Abuse subject to add additional headers
@@ -82,7 +80,7 @@ if ($form->submitted) {
subject => "$mail_subject",
);
if ($confirm) {
- $infostring .= "\n<P>Følgende informationer er blevet sendt:";
+ $infostring .= "\n<P>The following info has been submitted:";
$form->{opt}{messages}{form_confirm_text} = "$infostring";
print $form->confirm(
header => 1,