summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Sarajarvi <tony.sarajarvi@digia.com>2013-03-20 13:47:21 +0200
committerSergio Ahumada <sergio.ahumada@digia.com>2013-04-04 09:29:11 +0200
commit7de0e30043246b6d85ce52ab1be044ea8af173e7 (patch)
treef9950507b539a3d6c078e5ee783170dbd85d1f13
parent202be8d6286ea33ea4a5b46dbdf07c4662dc78cf (diff)
Update form date to ISO standardHEADmaster
Change-Id: I32d6a6658cd657d6e2465a0c872e364ee253fa50 Reviewed-by: Arto Kanninen Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
-rwxr-xr-xindex.pl11
-rw-r--r--reltest-form.conf8
2 files changed, 13 insertions, 6 deletions
diff --git a/index.pl b/index.pl
index 4a59893..01f59eb 100755
--- a/index.pl
+++ b/index.pl
@@ -34,8 +34,15 @@ sub meaning
return $result;
}
+my $toptext = "Sanity Test Guidelines can be found here: \
+<a href=http://qt-project.org/wiki/Sanity-Test-Guidelines> \
+http://qt-project.org/wiki/Sanity-Test-Guidelines</a><br> \
+Feel free to update them during your test to make them reusable \
+and helpful for other testers.";
+
# First create our form
-my $form = CGI::FormBuilder->new(source => 'reltest-form.conf');
+my $form = CGI::FormBuilder->new(source => 'reltest-form.conf',
+ text => $toptext);
# Check to see if we're submitted and valid
if ($form->submitted && $form->validate) {
@@ -62,7 +69,7 @@ if ($form->submitted && $form->validate) {
} else {
# Auto-fill with today's date
- my $now = strftime("%m/%d/%Y", localtime);
+ my $now = strftime("%Y-%m-%d", localtime);
$form->field(name => 'report_date',
value => $now);
$form->field(name => 'package_date',
diff --git a/reltest-form.conf b/reltest-form.conf
index 26b2eaa..d359f79 100644
--- a/reltest-form.conf
+++ b/reltest-form.conf
@@ -16,8 +16,8 @@ fields:
type: date
size: 10
required: 1
- validate: DATE
- comment: <i>MM/DD/YYYY</i>
+ validate: /^[0-9]{4}-?(0?[1-9]|1[0-2])-?(0?[1-9]|[1-2][0-9]|3[0-1])$/
+ comment: <i>YYYY-MM-DD</i>
report_name:
label: Reporters Name
@@ -30,8 +30,8 @@ fields:
type: date
size: 10
required: 1
- validate: DATE
- comment: <i>MM/DD/YYYY</i>
+ validate: /^[0-9]{4}-?(0?[1-9]|1[0-2])-?(0?[1-9]|[1-2][0-9]|3[0-1])$/
+ comment: <i>YYYY-MM-DD</i>
package_name:
label: Package name