| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | # -*- perl -*- | 
| 2 |  |  |  |  |  |  | # | 
| 3 |  |  |  |  |  |  | # | 
| 4 |  |  |  |  |  |  | #   Wizard - A Perl package for implementing system administration | 
| 5 |  |  |  |  |  |  | #            applications in the style of Windows wizards. | 
| 6 |  |  |  |  |  |  | # | 
| 7 |  |  |  |  |  |  | # | 
| 8 |  |  |  |  |  |  | #   This module is | 
| 9 |  |  |  |  |  |  | # | 
| 10 |  |  |  |  |  |  | #           Copyright (C) 1999     Jochen Wiedmann | 
| 11 |  |  |  |  |  |  | #                                  Am Eisteich 9 | 
| 12 |  |  |  |  |  |  | #                                  72555 Metzingen | 
| 13 |  |  |  |  |  |  | #                                  Germany | 
| 14 |  |  |  |  |  |  | # | 
| 15 |  |  |  |  |  |  | #                                  Email: joe@ispsoft.de | 
| 16 |  |  |  |  |  |  | #                                  Phone: +49 7123 14887 | 
| 17 |  |  |  |  |  |  | # | 
| 18 |  |  |  |  |  |  | #                          and     Amarendran R. Subramanian | 
| 19 |  |  |  |  |  |  | #                                  Grundstr. 32 | 
| 20 |  |  |  |  |  |  | #                                  72810 Gomaringen | 
| 21 |  |  |  |  |  |  | #                                  Germany | 
| 22 |  |  |  |  |  |  | # | 
| 23 |  |  |  |  |  |  | #                                  Email: amar@ispsoft.de | 
| 24 |  |  |  |  |  |  | #                                  Phone: +49 7072 920696 | 
| 25 |  |  |  |  |  |  | # | 
| 26 |  |  |  |  |  |  | #   All Rights Reserved. | 
| 27 |  |  |  |  |  |  | # | 
| 28 |  |  |  |  |  |  | #   You may distribute under the terms of either the GNU General Public | 
| 29 |  |  |  |  |  |  | #   License or the Artistic License, as specified in the Perl README file. | 
| 30 |  |  |  |  |  |  | # | 
| 31 |  |  |  |  |  |  |  | 
| 32 | 1 |  |  | 1 |  | 594 | use strict; | 
|  | 1 |  |  |  |  | 11 |  | 
|  | 1 |  |  |  |  | 31 |  | 
| 33 |  |  |  |  |  |  |  | 
| 34 | 1 |  |  | 1 |  | 5 | use Wizard (); | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 14 |  | 
| 35 | 1 |  |  | 1 |  | 523 | use Wizard::Form::HTML (); | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 183 |  | 
| 36 |  |  |  |  |  |  |  | 
| 37 |  |  |  |  |  |  |  | 
| 38 |  |  |  |  |  |  | =pod | 
| 39 |  |  |  |  |  |  |  | 
| 40 |  |  |  |  |  |  | =head1 NAME | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | Wizard::HTML - A subclass for running Wizard applications in HTML::EP. | 
| 43 |  |  |  |  |  |  |  | 
| 44 |  |  |  |  |  |  |  | 
| 45 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 46 |  |  |  |  |  |  |  | 
| 47 |  |  |  |  |  |  | # Create a new HTML wizard | 
| 48 |  |  |  |  |  |  | use Wizard::HTML; | 
| 49 |  |  |  |  |  |  | my $wiz = Wizard::Shell->new('form' => $form, 'ep' => $ep) | 
| 50 |  |  |  |  |  |  |  | 
| 51 |  |  |  |  |  |  |  | 
| 52 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 53 |  |  |  |  |  |  |  | 
| 54 |  |  |  |  |  |  | The HTML wizard is a subclass of Wizard, that is used by HTML::EP sites. | 
| 55 |  |  |  |  |  |  | The input will be read from the associated CGI-Object and the output | 
| 56 |  |  |  |  |  |  | as HTML code will be built by the elements of the form. | 
| 57 |  |  |  |  |  |  |  | 
| 58 |  |  |  |  |  |  | =cut | 
| 59 |  |  |  |  |  |  |  | 
| 60 |  |  |  |  |  |  | package Wizard::HTML; | 
| 61 |  |  |  |  |  |  |  | 
| 62 |  |  |  |  |  |  | @Wizard::HTML::ISA = qw(Wizard); | 
| 63 |  |  |  |  |  |  |  | 
| 64 |  |  |  |  |  |  | sub new { | 
| 65 | 0 |  |  | 0 | 0 |  | my $self = shift;  my $attr = shift; | 
|  | 0 |  |  |  |  |  |  | 
| 66 | 0 |  | 0 |  |  |  | $attr->{'formClass'} ||= 'Wizard::Form::HTML'; | 
| 67 | 0 | 0 |  |  |  |  | die "No valid ep object" unless ref($attr->{'ep'}); | 
| 68 | 0 |  |  |  |  |  | $self = $self->SUPER::new($attr); | 
| 69 | 0 |  |  |  |  |  | $self->{'ep'}->{'_ep_wizard'} = $self; | 
| 70 |  |  |  |  |  |  | } | 
| 71 |  |  |  |  |  |  |  | 
| 72 |  |  |  |  |  |  |  | 
| 73 | 0 |  |  | 0 | 0 |  | sub param { return shift->{'ep'}->{'cgi'}->param(@_); }; | 
| 74 |  |  |  |  |  |  |  | 
| 75 |  |  |  |  |  |  |  | 
| 76 |  |  |  |  |  |  | sub Store { | 
| 77 | 0 |  |  | 0 | 0 |  | my $self = shift; my $state = shift; | 
|  | 0 |  |  |  |  |  |  | 
| 78 | 0 |  | 0 |  |  |  | my $ep = $self->{'ep'} || die "no valid ep object available"; | 
| 79 | 0 |  |  |  |  |  | $ep->{'state_modified'} = 1; | 
| 80 | 0 |  |  |  |  |  | $ep->{'session'}->{'state'} = $state; | 
| 81 |  |  |  |  |  |  | } | 
| 82 |  |  |  |  |  |  |  | 
| 83 |  |  |  |  |  |  | 1; | 
| 84 |  |  |  |  |  |  |  | 
| 85 |  |  |  |  |  |  | __END__ |