2 # Ordering form of 'My::Project::hotelgate'
3 # Copyright (C) 2005 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; exactly version 2 of June 1991 is required
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 package product::hotelgate::Order;
20 require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway
21 our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
27 use Hash::Util qw(lock_hash);
31 "email_missing"=>"Your e-mail address is required, please fill it in.",
32 "type_missing"=>"Please fill in the {Device casing type} field.",
33 "ok"=>"Order has been accepted. Please wait to be contacted.",
38 my($self,$keyword)=@_;
40 my $trash=$error{$keyword}; # existence check;
46 Wrequire 'product::hotelgate::Lib';
47 my $W=product::hotelgate::Lib->init(
48 "title"=>"HotelGate: Order Form",
49 "css_push"=>"./Order.css",
50 "js_push"=>"./Order.js",
57 <h1>HotelGate Order</h1>
59 <p>Price offer will be provided according to your order specification.
60 You may also contact us directly at the e-mail address:
61 @{[ a_href 'mailto:hotelgate@jankratochvil.net' ]}</p>
64 if (my $error=$W->{"args"}{"error"}) {
66 <p align="center" class="error" id="error">@{[ $error{$error} ]}</p>
71 <form action="OrderSubmit.pm" @{[ form_method "post" ]} onsubmit="return Order_validate(this);">
72 <table border="1" class="order">
74 Your e-mail contact address (required).
76 <input type="text" size="@{[ $COLS ]}" name="email" value="@{[ escapeHTML($W->{"args"}{"email"}||"") ]}" />
79 Contact person, shipping address.
81 <input type="text" size="@{[ $COLS ]}" name="address" value="@{[ escapeHTML($W->{"args"}{"address"}||"") ]}" />
84 Installation location - leave empty if you install the device on your own.<br />
85 European facility installations provided by @{[ a_href 'http://www.jklabs.cz/','JK Labs' ]}.
87 <input type="text" size="@{[ $COLS ]}" name="location" value="@{[ escapeHTML($W->{"args"}{"location"}||"") ]}" />
90 Device casing type and available ports:
94 { "case"=>"1U","internal"=>1 },
95 { "case"=>"4U","internal"=>1 },
96 { "case"=>"4U","internal"=>2 },
97 { "case"=>"4U","internal"=>3 },
98 { "case"=>"4U","internal"=>4 },
102 <input type="radio" name="type" value="@{[ $_->{"case"} ]}-1+@{[ $_->{"internal"} ]}"
103 @{[ ($W->{"args"}{"type"}||"") ne $_->{"case"} ? '' : 'checked="checked"' ]}
105 Rack mountable @{[ $_->{"case"} ]}; ethernet ports: 1 external + @{[ $_->{"internal"} ]} internal
112 Required internal network port(s).<br />
113 Please specify any WiFi 802.11b or 802.11g access points to bundle with.
115 <textarea rows="4" cols="@{[ $COLS ]}" name="downlink">@{[ escapeHTML($W->{"args"}{"downlink"}||"") ]}</textarea>
118 Available type of the uplink (public Internet) connection:
120 <textarea rows="2" cols="@{[ $COLS ]}" name="uplink">@{[ escapeHTML($W->{"args"}{"uplink"}||"") ]}</textarea>
125 <textarea rows="8" cols="@{[ $COLS ]}" name="comment">@{[ escapeHTML($W->{"args"}{"comment"}||"") ]}</textarea>
127 <tr><td align="center"><input type="submit" value="Send Order" /></td></tr>