Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Embperl-cvs

svn commit: r724632 [3/3] - in /perl/embperl/trunk: ./ eg/forms/ eg/forms/Embperl/ eg/forms/Embperl/MyForm/ eg/forms/Embperl/MyForm/Control/ eg/forms/Embperl/MyForm/DataSource/ eg/forms/css/ eg/forms/js/ eg/forms/lib/ eg/forms/pages/ eg/forms/wizard/

 

 

ModPerl embperl-cvs RSS feed   Index | Next | Previous | View Threaded


richter at apache

Dec 8, 2008, 11:45 PM

Post #1 of 1 (1948 views)
Permalink
svn commit: r724632 [3/3] - in /perl/embperl/trunk: ./ eg/forms/ eg/forms/Embperl/ eg/forms/Embperl/MyForm/ eg/forms/Embperl/MyForm/Control/ eg/forms/Embperl/MyForm/DataSource/ eg/forms/css/ eg/forms/js/ eg/forms/lib/ eg/forms/pages/ eg/forms/wizard/

Added: perl/embperl/trunk/eg/forms/lib/footer.epl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/lib/footer.epl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/lib/footer.epl (added)
+++ perl/embperl/trunk/eg/forms/lib/footer.epl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,13 @@
+
+<table width="100%">[# style="position: absolute; bottom: 0px">#]
+ <tr>
+ <td colspan=2 align="center" width="100%"><hr width="99%"></td>
+ </tr>
+ <tr valign=top>
+ <td colspan=1 valign=top align=left class="cFooterText">
+ [= txt:logged_in_as =] <span class="cFooterTextBold">&nbsp;[+ $user || $epreq -> gettext('txt:<unknown>') +]</span></td>
+ <td colspan=1 valign=top align=right class="cFooterText">
+ &nbsp;&nbsp;&nbsp; Copyright &copy; [+ $oem -> {copyrighttime} +]&nbsp;&nbsp;&nbsp;<a href="[+ $oem -> {copyrighthref} || 'http://www.BB-5000.info/'+]" target="_blank">[+ $oem -> {copyright} || 'ECOS gmbh' +]</a>&nbsp;&nbsp;&nbsp;<a href="/main_empty.epl?-frame=[+ $epreq -> frames +]">u.a.</a>&nbsp;&nbsp;&nbsp;
+ </td>
+ </tr>
+</table>

Added: perl/embperl/trunk/eg/forms/lib/header.epl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/lib/header.epl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/lib/header.epl (added)
+++ perl/embperl/trunk/eg/forms/lib/header.epl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,16 @@
+[.-
+
+eval {
+$textonly = $epreq -> {textonly} ;
+$title = $epreq -> gettext ($epreq -> title) ;
+$subtitle = $epreq -> subtitle ;
+$subhead = $epreq -> subhead ;
+$frames = $epreq -> frames ;
+} ;
+
+-]
+
+
+ [$if $title $]<h1 class="cHeadH1">[+ $title +]</h1>[$endif$]
+ [$if $subtitle $]<h2 class="cHeadH2">[+ $subtitle +]</h2>[$endif$]
+

Added: perl/embperl/trunk/eg/forms/lib/wizard.epl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/lib/wizard.epl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/lib/wizard.epl (added)
+++ perl/embperl/trunk/eg/forms/lib/wizard.epl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,119 @@
+
+[.!
+sub formname { 'myform' }
+sub form_enctype {''}
+sub on_submit { '' }
+!]
+
+[$ sub hidden $]
+ [* my $r = shift ; *]
+ <input type="hidden" name="-page" value="[+ $r -> {page} +]">
+[$ endsub $]
+
+[$ sub abort_button $]
+ [* my $r = shift ; *]
+ [$if $r -> {aborturl} $]<input type="submit" name="-abort" value="[= ctl:cancel =]" class="cStandardButton">&nbsp;&nbsp;&nbsp;[$endif$]
+[$ endsub $]
+
+[$ sub prev_button $]
+ [* my $r = shift ; *]
+ [$if $r -> {page} > 0 $]<input type="submit" name="-prev" value="&lt;&lt;[= ctl:back =]" id="prev_button" class="cStandardButton">[$endif$]
+[$ endsub $]
+
+[$ sub next_button $]
+ [* my $r = shift ; *]
+ [.$if $r -> {page} + 1 < @{$r -> {pages}} $]<input type="submit" name="-next" value="[= ctl:next =]&gt;&gt;" id="next_button" onClick="doValidate = 1" class="cStandardButton">[$endif$]
+[$ endsub $]
+
+[$ sub prevnext $]
+ [* my $r = shift ; *]
+ <p id="wizardbuttons">
+ [- $r -> abort_button -]
+ [- $r -> prev_button -]
+ [- $r -> next_button -]
+ </p>
+[$ endsub $]
+
+[$ sub after_form $]
+[$ endsub $]
+
+
+[$ sub display $]
+ [* my $r = shift ; *]
+
+ [- $formname = $r->{fields_epf_formname} = $r -> formname -]
+ <script LANGUAGE="javascript">
+ var doValidate = 0;
+
+ function setfocus_first()
+ {
+ for (var i = 0; i < document.forms['[+ $formname +]'].elements.length; i++)
+ {
+ var e = document.forms['[+ $formname +]'].elements[i] ;
+ if (e && e.type != 'hidden')
+ {
+ e.focus() ;
+ if (e.type == 'text')
+ e.select() ;
+ break ;
+ }
+ }
+ }
+
+ function submit_on_enter (e)
+ {
+ var next = document.getElementById('next_button') ;
+ if (!next)
+ return true ;
+
+ if (!e)
+ e = window.event ;
+ c = e.which ;
+ if (!c)
+ c = e.keyCode ;
+ if (c == 13)
+ {
+ var b = document.getElementById ('wizardbuttons') ;
+ if (b)
+ {
+ next.focus() ;
+ b.style.visibility='hidden';
+ }
+ submitvalue (document.forms['[+ $formname +]'], '-next', '1') ;
+
+ return false ;
+ }
+ return true ;
+ }
+
+ document.onkeydown=submit_on_enter ;
+ window.onload=setfocus_first ;
+
+ </script>
+
+ <form method="post" action="[+ $r -> param -> uri +]" name="[+ $formname +]" class="cEmbperlForm"
+ onSubmit="v=doValidate; doValidate=0; x =((!v) || (epform_validate_[+ $formname +]() && [+ $r -> on_submit || '1' +])) ; return x "
+ enctype="[+ $r -> form_enctype +]">
+
+ [- $r -> show -]
+ <center>
+ [- $r -> prevnext -]
+ [.-
+ delete $fdat{-page} ;
+ delete $fdat{-prev} ;
+ delete $fdat{-next} ;
+ -]
+ [.-
+ $r -> hidden ;
+ @ffld = keys %fdat ;
+ -]
+ [$ hidden $]
+ </center>
+ </form>
+
+ [- $r -> after_form -]
+
+
+[$ endsub $]
+
+

Added: perl/embperl/trunk/eg/forms/lib/wizard.pl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/lib/wizard.pl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/lib/wizard.pl (added)
+++ perl/embperl/trunk/eg/forms/lib/wizard.pl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,182 @@
+
+
+# -----------------------------------------------------------------------
+#
+# verify - prüfen ob alle Eingaben ok sind
+#
+# ruft für alle Seiten vor der aktuellen die method preverfiy auf
+# und für die Seite von der die Daten abgesendet wurden die methode
+# verify
+#
+# in $page index der aktuellen Seite
+# ret bei Fehler: Seitenobjekt
+# sonst: undef
+#
+
+sub verify
+ {
+ my ($self, $page, $r) = @_ ;
+
+ my $pages = $self -> {pages} ;
+ #my $r = $self -> curr_req ;
+
+ my $i = 0 ;
+ while ($i < $page)
+ {
+ $pageobj = Execute ({object => $pages -> [$page]}) ;
+ $i++ ;
+ next if ($pageobj -> can('condition') && !$pageobj -> condition($r)) ;
+ next if (!$pageobj -> can('preverify')) ;
+
+ if (!$pageobj -> preverify($r))
+ {
+ return ($i-1, $pageobj) ;
+ }
+ }
+
+ $pageobj = Execute ({object => $pages -> [$page]}) ;
+ if ($pageobj -> can('verify') && !$pageobj -> verify($r, $self))
+ {
+ return ($page, $pageobj) ;
+ }
+ return ;
+ }
+
+
+# -----------------------------------------------------------------------
+#
+# callpages - ruft eine Methode in allen Seiten auf
+#
+# in $method Name der Methode
+# ... Argumente
+# ret Summe der Rückgabewerte
+#
+
+sub callpages
+ {
+ my $self = shift ;
+ my $method = shift ;
+
+ my $pages = $self -> {pages} ;
+ my $ret = 0 ;
+
+ foreach my $page (@$pages)
+ {
+ my $pageobj = Execute ({object => $page}) ;
+ $i++ ;
+
+ next if (!$pageobj -> can($method)) ;
+
+ $ret += $pageobj -> $method (@_) ;
+ }
+
+ return ;
+ }
+
+# -----------------------------------------------------------------------
+#
+# get_page_to_show - liefert das Seitenobjekt für die anzuzeigende Seite
+#
+# in $page index der aktuellen Seite
+# $backwards wenn gesetzt wird rückwärtz geblättert
+#
+
+sub get_page_to_show
+ {
+ my ($self, $page, $step) = @_ ;
+
+
+ my $pages = $self -> {pages} ;
+ my $r = $self -> curr_req ;
+
+ while (1)
+ {
+ $page += $step ;
+ #warn "page=$page, step = $step" ;
+ die "Seite nicht verfügbar" if ($page >= @$pages || $page < 0) ;
+
+ $pageobj = Execute ({object => $pages -> [$page]}) ;
+ last if (!$pageobj -> can('condition') || $pageobj -> condition($r)) ;
+ $step ||= 1 ;
+ }
+
+ return ($page, $pageobj) ;
+ }
+
+# -----------------------------------------------------------------------
+
+
+sub init
+ {
+ my ($self, $r) = @_ ;
+
+ my $cfgobj = $self -> {cfgobj} ||= Execute ({object => 'wizconfig.pl'}) ;
+
+ if ($cfgobj -> can('app_isa'))
+ {
+ my $isa = $cfgobj -> app_isa ;
+ Execute ({isa => $isa}) ;
+ }
+
+ $cfgobj -> init($self, $r) if ($cfgobj -> can('init'));
+
+ my $pages = $self -> {pages} ||= $cfgobj -> getpages ;
+
+ $r -> {aborturl} = $cfgobj -> can('aborturl') && $cfgobj -> aborturl ;
+ if ($fdat{-abort} && $r -> {aborturl})
+ {
+ $epreq -> apache_req -> err_header_out('location', $r -> {aborturl}) ;
+
+ return 301 ;
+ }
+
+ if ($fdat{-start})
+ {
+ delete $fdat{-page} ;
+ delete $fdat{-prev} ;
+ delete $fdat{-next} ;
+ delete $fdat{-start} ;
+ }
+
+ $r -> {data} = \%fdat ;
+
+ my $page = $fdat{-page} || 0 ;
+ my $showpage = $page ;
+
+ if (!defined ($fdat{-page}) || !(($page, $pageobj) = $self -> verify ($page, $r)))
+ {
+ ($page, $pageobj) = $self -> get_page_to_show ($showpage, $fdat{-prev}?-1:($fdat{-next}?1:0)) ;
+ }
+
+ $r -> {pageobj} = $pageobj ;
+ $r -> {page} = $page ;
+ $r -> {pages} = $pages ;
+
+ $r -> param -> filename ($pages -> [$page]) ;
+
+ my $rc = 0 ;
+ $rc = $pageobj -> init($r) if ($pageobj -> can('init'));
+
+ return 0 ;
+ }
+
+#------------------------------------------------------------------------------------------
+#
+# get_recipe
+#
+
+sub get_recipe
+
+ {
+ my ($class, $r, $recipe) = @_ ;
+
+ my $self ;
+ my $param = $r -> component -> param ;
+ my ($src) = $param -> inputfile =~ /^.*\.(.*?)$/ ;
+
+ if ($src eq 'pl')
+ {
+ $r -> component -> config -> syntax('Perl') ;
+ }
+ return Embperl::Recipe::Embperl -> get_recipe ($r, $recipe) ;
+ }

Added: perl/embperl/trunk/eg/forms/pages/loop.htm
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/pages/loop.htm?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/pages/loop.htm (added)
+++ perl/embperl/trunk/eg/forms/pages/loop.htm Mon Dec 8 23:45:11 2008
@@ -0,0 +1,21 @@
+
+<html>
+<head>
+<title>Embperl Examples - Loop Metacommands</title>
+</head>
+<body>
+
+<h1>Embperl Examples - Loop Metacommands</h1>
+<hr><h3>This is a example of using the while metacommand in embperl to show the environement</h3>
+
+[$ while ($k, $v) = each (%ENV) $]
+ [+ $k +] = [+ $v +] <BR>
+[$ endwhile $]
+
+
+<p><hr>
+
+<small>HTML::Embperl (c) 1997-1998 G.Richter</small>
+
+</body>
+</html>

Added: perl/embperl/trunk/eg/forms/wizard/action.epl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/wizard/action.epl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/wizard/action.epl (added)
+++ perl/embperl/trunk/eg/forms/wizard/action.epl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,144 @@
+
+[.!
+
+sub title { $epreq -> gettext ('txt:setup_action_title') }
+
+!]
+
+[$ sub item ($action, $suffix) $]
+[-
+
+-]
+
+<p style="text-indent: -35px; margin-left: 35px">
+<span class="cNoWidthTextHead" style="font-size: 20px"><input type="radio" name="action" value="[+ $action +]"></span>
+<span style="font-size: 16px; font-weight: bold ;">[+ $epreq -> gettext ("txt:setup_${action}_title$suffix") +]</span>
+<br>
+[+ $epreq -> gettext ("txt:setup_${action}_text$suffix") +]
+</p>
+
+[$endsub$]
+
+
+[$ sub show $]
+
+[-
+$r = shift ;
+
+init();
+
+-]
+
+<p>[= txt:setup_action_language =]<br>
+[= txt:setup_action_language_foreign =]</p>
+
+
+[.-
+
+Embperl::MyForm -> showfields (
+ [.
+ { name => 'preferredLanguage', text => 'Sprache', type => 'select',
+ datasrc => 'languages', noblank => 1,
+ event => ['onChange' => 'this.form.submit()']}
+ ]);
+-]
+
+<p>[= txt:setup_action_intro =]</p>
+
+[$if !$mini $]
+
+[- item ('master') -]
+
+[$if $isslave $]
+
+[- item ('standalone') -]
+
+[$else$]
+
+[- item ('addslave') -]
+
+[- item ('exportslave') -]
+
+[- item ('importslave') -]
+
+[#
+[- item ('initslave') -]
+,"$bbname in Slave-Modus umschalten",
+qq{Im Slave-Modus wartet $der $bbname, bis $er $seine Konfigurationsdaten
+vom Master erhält. Ist $der $bbname im Slave-Modus, kann $er nur noch vom Master
+aus konfiguriert werden.
+})-]
+#]
+
+[$endif$]
+
+[.#
+<p>Mittels der Option "Admin Kennwort zurücksetzen" haben Sie die Möglichkeit, ein neues Kennwort
+für den Benutzer "admin" zu vergeben. Diese Option ist sinnvoll, wenn eine Anmeldung
+für den Administrator nicht mehr möglich ist. In diesem Fall kann dieser Punkt
+direkt über die Konsole des BB-5000 ausgeführt werden</p>
+#]
+
+[$else$]
+
+[- item ('master', '_sthc') -]
+
+[$endif$]
+
+[- item ('reset') -]
+
+<script>
+function epform_validate_setupform()
+ {
+ return 1 ;
+ }
+</script>
+
+
+[$endsub$]
+
+[.!
+#use Data::Dumper ;
+
+sub init
+ {
+ $isslave = $r -> {data}{-isslave} ;
+ return if ($r -> {data}{-initialized}) ;
+
+ $fdat{action} = $r -> {data}{action} = 'master' ;
+ }
+
+sub verify
+ {
+ ($pageobj, $r, $wizard) = @_ ;
+
+ return 1 if ($r -> {data}{-initialized}) ;
+
+
+ $r -> {data}{-initialized} = 1 ;
+
+ if ($r -> {data}{action} eq 'importslave' || $r -> {data}{action} eq 'addslave')
+ {
+ $r -> {data}{hostcn} = '' ;
+ }
+
+ foreach (qw{defaultgw dnsserver})
+ {
+ $r -> {data}{$_} = '' if (!$r -> {data}{$_}) ;
+ }
+
+ my @cleanup = qw{hostdn} ;
+ push @cleanup, grep /^ldap_/, keys (%{$r -> {data}}) ;
+
+ foreach (@cleanup)
+ {
+ delete $r -> {data}{$_} ;
+ }
+
+ $wizard -> callpages ('init', $r -> {data}) ;
+
+
+ return 1 ;
+ }
+!]
+

Added: perl/embperl/trunk/eg/forms/wizard/base.epl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/wizard/base.epl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/wizard/base.epl (added)
+++ perl/embperl/trunk/eg/forms/wizard/base.epl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,47 @@
+[! sub frames { 0} !]
+[! sub subhead { 0} !]
+[! sub title { 'Setup' } !]
+[! sub extrahelp { undef } !]
+
+[$sub subhead $]
+<center>
+<h2>BB-5000 - Setup&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
+</center>
+[$endsub$]
+
+[-
+$r = shift ;
+-]
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<title>[+ $r -> title +]</title>
+
+<link rel="stylesheet" type="text/css" href="/forms/css/EmbperlForm.css">
+<script language="JavaScript" type="text/javascript" src="/forms/js/prototype.js"></script>
+<script language="JavaScript" type="text/javascript" src="/forms/js/EmbperlForm.js"></script>
+
+</head>
+<body class="cBody">
+
+[- Execute ('header.epl') -]
+
+<hr>
+<div class="cSetupWizardDiv">
+[$if $fdat{-msg} $]
+<center><span class="cError">[- @msg = split /\n/, $fdat{-msg} -][$foreach $m (@msg)$]<br>[+ $m +][$endforeach$]</span></center>
+[- delete $fdat{-msg} ; -]
+[$endif$]
+[.-
+Execute ({isa => 'wizard.epl'}) ;
+$r -> display ;
+-]
+</div>
+
+[- Execute ('footer.epl') -]
+
+</body>
+</html>
+
+

Added: perl/embperl/trunk/eg/forms/wizard/do.epl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/wizard/do.epl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/wizard/do.epl (added)
+++ perl/embperl/trunk/eg/forms/wizard/do.epl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,97 @@
+[.!
+
+
+sub title { $epreq -> gettext ('txt:setup_do_title')}
+
+!]
+
+[$ sub show $]
+[.-
+$r = shift ;
+$error = '' ;
+$nostop = 0 ;
+run_setup() ;
+-]
+
+<center>
+[$if $error $]
+
+<h2>[= err:setup_do =]</h2>
+<br>
+<font color=red>[+ $error +]</font>
+<br>
+
+[$else$]
+
+
+
+<h2><div id="endblockmsg">[= txt:setup_do_start =]</div></h2>
+
+[$if !$nostop $]
+<p>[= txt:setup_do_no_cfg =]</p>
+[$endif$]
+
+<p>[= txt:setup_do_ip_hint =]
+
+[$if !$nostop $]
+[.# + do { local $escmode = 0; _t('txt:setup_do_wait1', '<a href="/">', '</a>', '<a href="/setup/s.epl/wizconfig.pl">', '</a>') } + #]<br>
+[$endif$]
+<b>[= txt:setup_do_wait2 =]</b></p>
+
+
+[$if $r -> {textonly} $]
+
+<p><b>[= txt:setup_do_wait3 =]</b></p>
+
+[$else$]
+ <iframe src="/bin/logger.pl?noalert=1&endmsg=Setup&endregex=(Setup|Importslave|Exportslave) (beendet|stopped)&nostop=[+ $nostop +]&filter=(setup|importslave|exportslave)&lang=[+ $fdat{'preferredLanguage'} +]" width=800 height=250></iframe>
+
+[$endif$]
+[$endif$]
+<br>
+<br>
+
+
+</center>
+
+
+[$endsub$]
+
+[$ sub abort_button $]
+ [* my $r = shift ; *]
+ <input type="submit" name="-start" value="Zum Setup Menu" id="next_button" class="cStandardButton">&nbsp;&nbsp;&nbsp;
+ [$if $r -> {aborturl} $]<input type="submit" name="-abort" value="Setup Beenden" class="cStandardButton">&nbsp;&nbsp;&nbsp;[$endif$]
+[$ endsub $]
+
+[$ sub prev_button $]
+ [* my $r = shift ; *]
+[$ endsub $]
+
+[$ sub next_button $]
+ [* my $r = shift ; *]
+[$ endsub $]
+
+
+[$ sub prevnext $]
+ [* my $r = shift ; *]
+ <div id="endblock" [$if !$error $]style="display:none"[$endif$]>
+ [- $r -> SUPER::prevnext -]
+ </div>
+[$ endsub $]
+
+
+[.!
+
+sub run_setup
+ {
+ my $data = $r -> {data} ;
+ my $action = $data -> {action} ;
+
+
+#
+# add action herer
+#
+
+
+ }
+!]

Added: perl/embperl/trunk/eg/forms/wizard/dsl.epl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/wizard/dsl.epl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/wizard/dsl.epl (added)
+++ perl/embperl/trunk/eg/forms/wizard/dsl.epl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,43 @@
+
+[.!
+
+sub title { $epreq -> gettext ('txt:setup_dsl_title') }
+sub condition {
+ my ($self, $r) = @_ ;
+ if ($r -> {data}{action} ne 'addslave' && $r -> {data}{action} ne 'master')
+ {
+ return 0 ;
+ }
+ $r -> {data}{inetconnect} eq 'dsl'}
+
+!]
+
+[$ sub show $]
+
+<p>[= txt:setup_dsl1 =]</p>
+
+[#<p>[= txt:setup_dsl2 =]</p>#]
+
+
+
+[.-
+$r = shift ;
+$r -> {data}{services_adsl} = 1 ;
+
+$fdat{'dsl_demand'} ||= 0 ;
+
+Embperl::MyForm -> showfields (
+
+ [.
+ { name => 'dsl_user', text => 'Benutzername/Zugangskennung', validate => [ required => 1],},
+ { name => 'dsl_pass', text => 'Kennwort', type => 'password', validate => [ required => 1],},
+ #{ name => 'dsl_devname', text => 'Netzwerkinterface', validate => [ required => 1],
+ # values => ['eth0', 'eth1', 'eth2'] },
+ #{ name => 'dsl_demand', text => 'Verbindung bei Leerlauf abbauen',
+ # type => 'radio', values => [0, 1], options => ['Nein', 'Ja']},
+ ]);
+-]
+
+
+[$endsub$]
+

Added: perl/embperl/trunk/eg/forms/wizard/exportslave.epl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/wizard/exportslave.epl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/wizard/exportslave.epl (added)
+++ perl/embperl/trunk/eg/forms/wizard/exportslave.epl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,62 @@
+
+[.!
+
+sub title { $epreq -> gettext ('txt:setup_export_title') }
+sub condition {
+ my ($self, $r) = @_ ;
+ if ($r -> {data}{action} ne 'exportslave' && $r -> {data}{action} ne 'addslave')
+ {
+ return 0 ;
+ }
+ return 1 ;
+ }
+
+!]
+
+[.$ sub show
+
+$bbname = $epreq -> {data}{-bbname};
+$exportonly = $epreq -> {data}{action} eq 'exportslave' ;
+$]
+
+[- $escmode = 0 -]
+<p>[= txt:setup_export1 =]</p>
+<p>[= txt:setup_im_export2 =]</p>
+<p>[= txt:setup_im_export3 =]</p>
+<p>[= txt:setup_im_export4 =]</p>
+[- $escmode = 7 -]
+
+
+<center>
+<table class="cInputTable" cellspacing=2 cellpadding=2>
+
+[.-
+$fdat{slaveexport} ||= 0 ;
+$fdat{slaveaddr} ||= $fdat{ipaddr} ;
+$fdat{slaveadminuser} ||= 'admin' ;
+$fdat{slaveadminpass} ||= 'bb5000' if (!$exportonly);
+
+
+Embperl::MyForm -> showfields (
+
+ [.
+ ($exportonly?{ name => 'slavedn', text => 'Slave der exportiert werden soll',width=> 1,
+ type => 'select', xdatasrc => 'real_slave', validate => [ required => 1, ]}:
+ { name => 'slaveexport', text => 'Konfiguration direkt exportieren',width=> 1,
+ type => 'radio', values => [1,0], options => ['Ja', 'Nein']}),
+ { name => 'slaveadminuser', text => 'Name des Administratorbenutzers des neuen Gerätes',
+ validate => [ required => 1 ]},
+ { name => 'slaveadminpass', type => 'password', text => 'Kennwort',
+ validate => [ required => 1, ]},
+ { name => 'slaveaddr', nameprefix => 'export_', text => 'IP Adresse unter der das neue Gerät derzeit erreichbar ist', width=> 1,
+ validate => [ required => 1, ]},
+ #{ name => 'syncprovider', text => 'IP Adresse unter der der Slave den Master erreicht', width=> 1,
+ # validate => [ required => 1, ]},
+ ]);
+-]
+</table>
+</center>
+
+[$endsub$]
+
+

Added: perl/embperl/trunk/eg/forms/wizard/finish.epl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/wizard/finish.epl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/wizard/finish.epl (added)
+++ perl/embperl/trunk/eg/forms/wizard/finish.epl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,84 @@
+[.!
+
+sub title { $epreq -> gettext ('txt:setup_finish_title') }
+
+!]
+
+[$ sub show $]
+[.-
+$r = shift ;
+$action = $r -> {data}{action} ;
+-]
+
+<center>
+
+[$if $action eq 'master' $]
+
+<h2>[= txt:attention =]</h2>
+<p><b>[= txt:setup_finish1 =]<br>
+[= txt:setup_finish2 =]<br>[= txt:setup_finish4 =]</b></p>
+
+[$elsif $action eq 'standalone' $]
+
+<h2>[= txt:attention =]</h2>
+<p><b>[= txt:setup_finish3 =]
+<br>
+[= txt:setup_finish4 =]</b></p>
+
+[$elsif $action eq 'initslave' $]
+
+<h2>[= txt:attention =]</h2>
+<p><b>[= txt:setup_finish5 =]
+<br>
+[= txt:setup_finish4 =]</b></p>
+
+[$elsif $action eq 'reset' $]
+
+<h2>[= txt:attention =]</h2>
+<p><b>[= txt:setup_finish6 =]<br>
+[= txt:setup_finish7 =]
+
+[= txt:setup_finish4 =]</b></p>
+
+[$elsif $action eq 'importslave' $]
+
+<h2>[= txt:setup_finish8 =]</h2>
+
+[$elsif $action eq 'exportslave' $]
+
+<h2>[= txt:setup_finish9 =]</h2>
+
+<h2>[= txt:attention =]</h2>
+<p><b>[= txt:setup_finish10 =]</b></p>
+<p><b>[= txt:setup_finish4 =]</b></p>
+
+[$elsif $action eq 'addslave' && $fdat{slaveexport} $]
+
+<h2>[= txt:setup_finish11 =]</h2>
+
+<h2>[= txt:attention =]</h2>
+<p><b>[= txt:setup_finish12 =]</b></p>
+<p><b>[= txt:setup_finish4 =]</b></p>
+
+[$elsif $action eq 'addslave' && !$fdat{slaveexport} $]
+
+<h2>[= txt:setup_finish13 =]</h2>
+
+<p><b>[= txt:setup_finish14 =]</b></p>
+<p><b>[= txt:setup_finish4 =]</b></p>
+
+[$endif$]
+
+<p>[= txt:setup_finish15 =]</p>
+
+</center>
+<script LANGUAGE="JavaScript" TYPE="text/javascript">
+ function epform_validate_setupform() { return 1; }
+</script>
+
+[$endsub$]
+
+[$ sub next_button $]
+ [* my $r = shift ; *]
+ <input type="submit" name="-next" value="[= ctl:Finish =]" onClick="doValidate = 1;" class="cStandardButton">
+[$ endsub $]

Added: perl/embperl/trunk/eg/forms/wizard/gateway.epl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/wizard/gateway.epl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/wizard/gateway.epl (added)
+++ perl/embperl/trunk/eg/forms/wizard/gateway.epl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,43 @@
+
+[.!
+
+sub title { $epreq -> gettext ('txt:setup_gw_title') }
+sub condition {
+ my ($self, $r) = @_ ;
+ if ($r -> {data}{action} ne 'addslave' && $r -> {data}{action} ne 'master')
+ {
+ return 0 ;
+ }
+ $r -> {data}{inetconnect} eq 'lan'
+ ;
+ }
+
+
+
+!]
+
+[$ sub show $]
+[-
+$sthc = 0 ;
+-]
+<p>[$if !$sthc $][= txt:setup_gw1 =][$else$][= txt:setup_gw_sthc1 =][$endif$]</p>
+
+
+[.-
+$sthc = 0 ;
+
+
+
+Embperl::MyForm -> showfields (
+
+ [.
+ ($sthc?():(
+ { name => 'ipaddr_inet', text => 'IP Adresse der Internetschnittstelle', validate => [ required => 1, -type => 'IPAddr', ]},
+ { name => 'netmask_inet', text => 'Netzmaske der Internetschnittstelle', validate => [. required => 1, -type => 'Integer', gt => 0, le => 32],
+ type => 'select', datasrc => 'netmask' },
+ )),
+ { name => 'defaultgw', text => 'IP Adresse des Default Gateways',validate => [ emptyok => 1, -type => 'IPAddr', ]},
+ ]);
+-]
+
+[$endsub$]

Added: perl/embperl/trunk/eg/forms/wizard/importslave.epl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/wizard/importslave.epl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/wizard/importslave.epl (added)
+++ perl/embperl/trunk/eg/forms/wizard/importslave.epl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,89 @@
+
+[.!
+
+use Embperl::MyForm ;
+
+sub title { $epreq -> gettext ('txt:setup_import_title') }
+sub condition {
+ my ($self, $r) = @_ ;
+ if ($r -> {data}{action} ne 'importslave')
+ {
+ return 0 ;
+ }
+ $r -> {data}{inetconnect} = '' ;
+ return 1 ;
+ }
+
+!]
+
+[$ sub show $]
+
+[- $escmode = 0 -]
+<p>[= txt:setup_import1 =]</p>
+<p>[= txt:setup_im_export2 =]</p>
+<p>[= txt:setup_im_export4 =]</p>
+<p>[= txt:setup_import5 =]</p>
+[- $escmode = 7 -]
+
+<br>
+
+
+[.-
+$suffix = '';
+$fdat{hostou} ||= $suffix ;
+
+Embperl::MyForm -> showfields ( [.
+ Embperl::Form -> add_sublines({width => 1, section => 1,
+ name => 'import-what', text=> 'Importieren'},
+ [.
+ {
+ value => 'bb5000',
+ text => 'BB-5000',
+ fields =>
+ [.
+ { name => 'hostcn', text => 'Name des neuen BB-5000',width=> 1,
+ validate => [. -key => 'import-what-bb5000', -break => 1, checked => 1, -break => 0,
+ -key => 'hostcn', required => 1, must_not_contain => ',+"/<>#', ],
+ },
+ { name => 'hostou', text => 'Container in den der neue BB-5000 importiert werden soll',width=> 1,
+ xvalidate => [. -key => 'import-what-bb5000', -break => 1, checked => 1, -break => 0,
+ -key => 'hostou', -type => 'Select', required => 1, ],
+
+ type => 'select', xdatasrc => 'hostconfig_container',
+ addtop => [[$suffix, $suffix]]},
+ ]
+ },
+ {
+ value => 'obj',
+ text => 'Objekte',
+ fields =>
+ [.
+ { name => 'importdn', text => 'DN des Objekts das importiert werden soll',width=> 1,
+ validate => [. -key => 'import-what-obj', -break => 1, checked => 1, -break => 0,
+ -key => 'importdn', required => 1, ]
+ },
+ { name => 'importcn', text => 'Name des neuen Objekts',width=> 1,
+ validate => [. -key => 'import-what-obj', -break => 1, checked => 1, -break => 0,
+ -key => 'importcn', required => 1, must_not_contain => ',+"/<>#', ],
+ },
+ { name => 'importou', text => 'Container in den das neue Objekts importiert werden soll',width=> 1,
+ type => 'select', xdatasrc => 'container',
+ validate => [. -key => 'import-what-obj', -break => 1, checked => 1, -break => 0,
+ -key => 'importou', required => 1, ],
+ },
+ { name => 'import_nobak', type => 'checkbox', value => 1, width => 1},
+ ]
+ },
+ ], 'radio'),
+ { name => 'adminuser', text => 'Name des Administratorbenutzers',
+ validate => [ required => 1 ], type => 'input'},
+ { name => 'adminpass', type => 'password', text => 'Kennwort',
+ validate => [ required => 1, ]},
+ { name => 'slaveaddr', text => 'IP Adresse des zu importierenden BB-5000', width=> 1,
+ validate => [ required => 1, ]},
+ ]);
+-]
+
+[$endsub$]
+
+

Added: perl/embperl/trunk/eg/forms/wizard/inetconnect.epl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/wizard/inetconnect.epl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/wizard/inetconnect.epl (added)
+++ perl/embperl/trunk/eg/forms/wizard/inetconnect.epl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,62 @@
+[.!
+
+sub title { $epreq -> gettext ('txt:setup_inet_title') }
+
+sub condition
+ {
+ my ($self, $r) = @_ ;
+ ($r -> {data}{action} eq 'master' || $r -> {data}{action} eq 'addslave')
+ ;
+ }
+
+sub init
+ {
+ my ($self, $r) = @_ ;
+
+ my $isdn = 1 ;
+ my $adsl = 1 ;
+
+
+ $r -> {inet_select} =
+ {
+ options => [.
+ 'Ethernet über ein Gateway mit fester IP Adresse',
+ $adsl?('xDSL'):(),
+ $isdn?('ISDN'):(),
+ "Der $epreq->{data}{-bbname} hat keine Verbindung zum Internet",
+ ],
+ values => ['lan', $adsl?('dsl'):(), $isdn?('isdn'):(), 'no'],
+ } ;
+
+ return 0 ;
+ }
+
+!]
+
+[$ sub show $]
+
+<p>[= txt:setup_inet1 =]</p>
+
+
+
+
+[.-
+$r = shift ;
+$r -> {data}{services_adsl} = 0 ;
+$r -> {data}{services_isdn} = 0 ;
+
+Embperl::MyForm -> showfields (
+ [.
+ { text => 'Internetverbindung via', name => 'inetconnect', type => 'radio',
+ options => $r->{inet_select}{options},
+ values => $r->{inet_select}{values},
+ vert => 2,
+ width => 1 },
+
+ ]);
+-]
+
+
+[$endsub$]
+
+

Added: perl/embperl/trunk/eg/forms/wizard/isdn.epl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/wizard/isdn.epl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/wizard/isdn.epl (added)
+++ perl/embperl/trunk/eg/forms/wizard/isdn.epl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,35 @@
+
+[.!
+
+sub title { $epreq -> gettext ('txt:setup_isdn_title')}
+sub condition {
+ my ($self, $r) = @_ ;
+ if ($r -> {data}{action} ne 'addslave' && $r -> {data}{action} ne 'master')
+ {
+ return 0 ;
+ }
+ $r -> {data}{inetconnect} eq 'isdn' }
+
+
+!]
+
+[$ sub show $]
+
+<p>[= txt:setup_isdn1 =]</p>
+
+
+
+[.-
+$r -> {data}{services_isdn} = 1 ;
+Embperl::MyForm -> showfields (
+
+ [.
+ { name => 'isdn_user', text => 'Benutzername/Zugangskennung', validate => [ required => 1],},
+ { name => 'isdn_pass', text => 'Kennwort', type => 'password', validate => [ required => 1],},
+ { name => 'isdn_msn', text => 'Eigene MSN', validate => [ required => 1, -type => 'Integer', ge => 0],},
+ { name => 'isdn_phone', text => 'Anzurufende Providernummer', validate => [ required => 1, -type => 'Integer', ge => 0],},
+ ]);
+-]
+
+
+[$endsub$]

Added: perl/embperl/trunk/eg/forms/wizard/name.epl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/wizard/name.epl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/wizard/name.epl (added)
+++ perl/embperl/trunk/eg/forms/wizard/name.epl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,102 @@
+
+[.!
+
+sub title { $epreq -> gettext ('txt:setup_name_title') }
+sub condition
+ {
+ my ($self, $r) = @_ ;
+ $r -> {data}{action} eq 'master' || $r -> {data}{action} eq 'addslave'
+ }
+
+
+!]
+
+[$ sub show $]
+[.-
+$sthc = 0 ;
+$Jeder = $sthc?'Jeder':'Jede' ;
+$des = $sthc?'des':'der' ;
+$der = $sthc?'der':'die' ;
+$addslave = $epreq -> {data}{action} eq 'addslave' ;
+
+
+
+-]
+
+<br>
+[- $escmode = 0 -]
+<p class="cCenter">[= txt:setup_name1 =]</p>
+[$if $addslave $]
+<p class="cCenter">[= txt:setup_name2 =]</p>
+<p class="cCenter">[= txt:setup_name3 =]</p>
+<p class="cCenter">[= txt:setup_name4 =]</p>
+<p class="cCenter">[= txt:setup_name5 =]</p>
+[$endif$]
+[- $escmode = 7 -]
+<br>
+
+
+
+
+[.-
+
+Embperl::MyForm -> showfields (
+ [.
+ { name => 'hostcn', text => "Name des neuen BB-5000 Gerätes",
+ validate => [.required => 1, -msg => 'Name darf nur Buchstaben, Zahlen, Bindestrich und Leerzeichen enthalten',
+ matches_regex => '^[-a-zA-Z0-9 ]*$' ],
+ class => 'cNoWidth', width => 1},
+ ($addslave?(
+ { name => 'bbtype', text => 'Typ',width=> 1,
+ type => 'select', class => 'cNoWidth', values => \@typevals, options => \@typenames},
+ { name => 'hostcontainer', text => 'Anlegen in',width=> 1,
+ type => 'select', xdatasrc => 'hostconfig_container', class => 'cNoWidth'},
+ { name => 'hostbasedon', text => 'Basiert auf',width=> 1,
+ type => 'select', xdatasrc => 'virtual_bb5000', class => 'cNoWidth'},
+ { name => 'localadmin', text => 'Lokaler Admin Benutzer',width=> 1,
+ type => 'select', xdatasrc => 'admin_user', validate => [ required => 1, ], class => 'cNoWidth'},
+ ):()),
+
+
+ ]);
+-]
+
+
+
+[$endsub$]
+
+[.!
+
+
+
+sub verify
+
+ {
+ my ($self, $r) = @_ ;
+
+ return 1 if (!$fdat{-next} || $r -> {data}{action} eq 'master') ;
+
+=pod
+
+# verification code goes here, return 1 on success
+
+ my $ldap = $r->{ldap};
+
+ my $escaped = $ldap->is_dn_safely_escaped($fdat{hostcn});
+ my $hostcn = ($escaped ? $fdat{hostcn} : $ldap->dn_element_escape($fdat{hostcn}));
+ my $host = eval { $ldap -> search ('=hostConfig', "(cn=$hostcn)", 'sub') } ;
+ $fdat{-msg} = $@ and return 0 ;
+
+ if ($host && keys %$host)
+ {
+ $fdat{-msg} = _t('err:setup_name_exists', $fdat{hostcn}) ;
+ return 0 ;
+ }
+=cut
+
+ return 1 ;
+ }
+
+
+!]
+

Added: perl/embperl/trunk/eg/forms/wizard/network.epl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/wizard/network.epl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/wizard/network.epl (added)
+++ perl/embperl/trunk/eg/forms/wizard/network.epl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,90 @@
+
+[.!
+
+sub title { $epreq -> gettext ('txt:setup_network_title') }
+sub condition
+ {
+ my ($self, $r) = @_ ;
+ $r -> {data}{action} eq 'master' || $r -> {data}{action} eq 'addslave'
+ }
+
+
+!]
+
+[$ sub show $]
+[-
+$sthc = 0;
+-]
+
+<br>
+[- $escmode = 0 -]
+<p class="cCenter">[= txt:setup_network1 =]</p>
+<p class="cCenter">[= txt:setup_network2 =]</p>
+<p class="cCenter">[= txt:setup_network3 =]</p>
+[$if !$sthc $]
+[$if 1 $]
+<p class="cCenter">[= txt:setup_network4inet =]</p>
+[$else$]
+<p class="cCenter">[= txt:setup_network4 =]</p>
+[$endif$]
+[$else$]
+<p class="cCenter">[= txt:setup_network5 =]</p>
+[$endif$]
+<p class="cCenter">[= txt:setup_network6 =]</p>
+[- $escmode = 7 -]
+<br>
+
+
+[.-
+$i = 33 ;
+@values = () ;
+@options = map { $i-- ; push @values, $i ; "/$i ($_)" } (
+ '255.255.255.255',
+ '255.255.255.254',
+ '255.255.255.252',
+ '255.255.255.248',
+ '255.255.255.240',
+ '255.255.255.224',
+ '255.255.255.192',
+ '255.255.255.128',
+ '255.255.255.0',
+ '255.255.254.0',
+ '255.255.252.0',
+ '255.255.248.0',
+ '255.255.240.0',
+ '255.255.224.0',
+ '255.255.192.0',
+ '255.255.128.0',
+ '255.255.0.0',
+ '255.255.0.0',
+ '255.254.0.0',
+ '255.252.0.0',
+ '255.248.0.0',
+ '255.240.0.0',
+ '255.224.0.0',
+ '255.192.0.0',
+ '255.128.0.0',
+ '255.0.0.0',
+ ) ;
+
+Embperl::MyForm -> showfields (
+ [.
+ { name => 'ipaddr', text => "IP Adresse des $epreq->{data}{-bbname}", validate => [ required => 1, -type => 'IPAddr', ], },
+ { name => 'netmask', text => 'Netzmaske', validate => [. required => 1, -type => 'Integer', gt => 0, le => 32],
+ type => 'select', values => \@values, options => \@options, },
+ { name => 'defaultgw', text => 'IP Adresse des Default Gateways',validate => [ emptyok => 1, -type => 'IPAddr', ], },
+ { name => 'dnsserver', text => 'IP Adresse des DNS-Servers', validate => [ emptyok => 1, -type => 'IPAddr', ], width => 1},
+ ($sthc?(
+ { name => 'trusted-networks', text => 'Netzwerk für Remote-Administration', validate => [ emptyok => 1, -type => 'IPAddr', ]},
+ { name => 'trusted-netmask', text => 'Netzmaske', validate => [. required => 1, -type => 'Integer', gt => 0, le => 32],
+ type => 'select', values => \@values, options => \@options },
+ ):(
+ { name => 'localdomain', text => 'Lokale (interne) Domäne', },
+
+ { name => 'domain', nameprefix => 'internet+', text => 'Internet (externe) Domäne', },
+ )),
+ ]);
+-]
+
+
+[$endsub$]

Added: perl/embperl/trunk/eg/forms/wizard/organisation.epl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/wizard/organisation.epl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/wizard/organisation.epl (added)
+++ perl/embperl/trunk/eg/forms/wizard/organisation.epl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,56 @@
+
+[.!
+
+sub title { $epreq -> gettext ('txt:setup_orga_title') }
+sub condition {
+ my ($self, $r) = @_ ;
+ if ($r -> {data}{action} ne 'master')
+ {
+ delete $r -> {data}{dc2} ;
+ delete $r -> {data}{dc1} ;
+ return 0 ;
+ }
+ return 1 ;
+ }
+
+!]
+
+[$ sub show $]
+
+<br>
+[- $escmode = 0 -]
+<p class="cCenter">[= txt:setup_orga1 =]</p>
+<p class="cCenter">[= txt:setup_orga2 =]</p>
+<p class="cCenter">[= txt:setup_orga3 =]</p>
+<p class="cCenter">[= txt:setup_orga4 =]</p>
+[- $escmode = 7 -]
+<br>
+
+
+
+
+[.-
+
+$fdat{timezone} ||= 'Europe/Berlin' ;
+
+Embperl::MyForm -> showfields (
+ [.
+ { name => 'dc2', text => 'Organisation dc',
+ validate => [.required => 1, -msg => 'Organisation dc darf nur Buchstaben, Zahlen, Bindestrich und Leerzeichen enthalten',
+ matches_regex => '^[-a-zA-Z0-9 ]*$' ]},
+ { name => 'dc1', text => 'Top-Level dc',
+ validate => [.required => 1, -msg => 'Top-Level dc darf nur Buchstaben, Zahlen, Bindestrich und Leerzeichen enthalten',
+ matches_regex => '^[-a-zA-Z0-9 ]*$' ]},
+ { name => 'description', text => 'Beschreibung', width=> 1},
+ { name => 'admin_password', text => 'Admin Kennwort', type => 'password',
+ validate => [ required => 1, length_min => 5]},
+ { name => 'admin_retype', text => 'Kennwort wiederholen', type => 'password',
+ validate => [same => 'admin_password:Admin Kennwort']},
+ { name => 'timezone', text => 'Zeitzone', type => 'select', xdatasrc => 'timezones', noblank => 1 },
+ ]);
+-]
+
+
+[$endsub$]
+
+

Added: perl/embperl/trunk/eg/forms/wizard/wizconfig.pl
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/eg/forms/wizard/wizconfig.pl?rev=724632&view=auto
==============================================================================
--- perl/embperl/trunk/eg/forms/wizard/wizconfig.pl (added)
+++ perl/embperl/trunk/eg/forms/wizard/wizconfig.pl Mon Dec 8 23:45:11 2008
@@ -0,0 +1,64 @@
+
+
+use File::Basename ;
+use Embperl::MyForm ;
+
+# -------------------------------------------------------
+#
+# getpages returns the pages to use
+#
+
+sub getpages
+
+ {
+ [.
+ 'action.epl' ,
+ 'importslave.epl',
+ 'organisation.epl',
+ 'name.epl' ,
+ 'network.epl' ,
+ 'inetconnect.epl' ,
+ 'isdn.epl' ,
+ 'dsl.epl' ,
+ 'gateway.epl' ,
+ 'exportslave.epl',
+ 'finish.epl',
+ 'do.epl'
+ ] ;
+ }
+
+# -------------------------------------------------------
+#
+# aborturl defines the url to requested when abort is clicked
+#
+
+sub aborturl
+ {
+ return '/' ;
+ }
+
+
+# -------------------------------------------------------
+#
+# app_isa allows to define a base class for the wizard application object
+#
+
+sub app_isa
+ {
+ ''
+ }
+
+
+
+# -------------------------------------------------------
+#
+# init is called at the start of each request
+#
+
+sub init
+ {
+ my ($self, $wiz, $r) = @_ ;
+
+
+ }
+



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscribe [at] perl
For additional commands, e-mail: embperl-cvs-help [at] perl

ModPerl embperl-cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.