CGI-Bus

 view release on metacpan or  search on metacpan

examples/cgi-bin/search-mis.cgi  view on Meta::CPAN

    , '<table width="100%"><tr><td>'
    , $g->h1('Ïîèñê')
    , '</td><td align="left" valign="bottom">'
    , 'Ïîèñê â ôàéëîâîé ñèñòåìå ' .$g->server_name() .' (' .($ENV{REMOTE_USER} ||'Guest') .')'
    , '</td></tr></table>'
    , $g->textfield(-name=>'query', -size=>70, -title=>'Óñëîâèå èëè òåêñò ïîèñêà')
    , $g->submit(-name =>'search'
                ,-value=>'Èñêàòü'
                ,-title=>'Èñêàòü')
    , '<br />'
    , $g->popup_menu(-name=>'querysort'
                    ,-values=>['write','hitcount','vpath','docauthor']
                    ,-labels=>{'write'    =>'Chronologically'
                              ,'hitcount' =>'Ranked'
                              ,'vpath'    =>'by Name'
                              ,'docauthor'=>'by Author'
                              }
                    ,-default=>'write')
    , $g->popup_menu(-name=>'querymarg'
                    ,-values=>[128,256,512,1024,2048]
                    ,-labels=>{128 =>'128  max'
                              ,256 =>'256  max'
                              ,512 =>'512  max'
                              ,1024=>'1024 max'
                              ,2048=>'2048 max'
                              }
                    ,-default=>256)
    , $g->a({-href=>
          -e ($ENV{windir} .'/help/ix/htm/ixqrylan.htm')

lib/CGI/Bus/tm.pm  view on Meta::CPAN

    $r .=$s->_htmlbare(ref($s->{-tbarl}) eq 'CODE' 
			? &{$s->{-tbarl}}($s, $g->param($s->pxnme(-pxsw=>'REFERER')))
			: $s->{-tbarl});
 }
 if ($s->cmdg('-lst')) {
    $r .=$s->_htmlbare(-bck => $p->{-iurl} && $img{-bck} ? $p->qurl : 0
			,-onClick=>'{window.history.back(); return(false)}') #window.event.returnValue=false;
		if !$s->{-formtgf};
    $r .=$s->_htmlbare(-lgn => $s->uauth->authurl) 
		if $guest && $s->uauth->authurl;
    $r .=$s->_htmlbare($g->popup_menu(-name=>$s->pxnme(-pxsw=>'LIST')
			,-values=>$s->qlstnmes
			,-labels=>$s->qlstlbls
			,-default=>$s->qlst
			,-onChange=> (!$p->{-iurl}
                          ? $s->pxnme(-pxcb=>'-lst') .'.click()'
                          : '{' .$s->pxnme(-pxcb=>'-cmdi') .'.value="-lst"; submit(); return(false);}')
			,-class=>'MenuArea MenuInput'
			))
		if $s->{-lists} && scalar(keys %{$s->{-lists}}) >1;
    $r .=$s->_htmlbare($p->htmltextfield(-name =>$s->pxsw('FTEXT')

lib/CGI/Bus/tm.pm  view on Meta::CPAN

         elsif (exists $f->{-inp}->{-asize}) {
             $f->{-inp}->{-asize} =$f->{-inp}->{-asize} ||20;
             $wgp .=$p->htmltextfield(-name=>$f->{-fld},%{$f->{-inp}},-title=>$cmt,-class=>'Form')
         }
         elsif ($f->{-inp}->{-values} ||$f->{-inp}->{-labels}) {            
             my $fi =$f->{-inp};
             $fi->{-values} =&{$fi->{-values}}($s) if ref($fi->{-values}) eq 'CODE';
             $fi->{-labels} =&{$fi->{-labels}}($s) if ref($fi->{-labels}) eq 'CODE';
             $fi->{-values} =[sort {lc($fi->{-labels}->{$a}) cmp lc($fi->{-labels}->{$b})} keys %{$fi->{-labels}}]
                            if !$fi->{-values};
             $wgp .=$p->popup_menu(-name=>$f->{-fld},%{$f->{-inp}},-title=>$cmt,-class=>'Form')
         }
         else {
             $wgp .=$p->htmltextfield(-name=>$f->{-fld},%{$f->{-inp}},-title=>$cmt,-class=>'Form')
         }
   }
   elsif (ref($f->{-inp}) eq 'ARRAY') {
         my $t  =$f->{-inp}->[0];
         my %a  =$f->{-inp}->[1] ? %{$f->{-inp}->[1]} : ();
         $wgp .=$s->$t(-name=>$f->{-fld},%a,-title=>$cmt)
   }

lib/CGI/Bus/tmsql.pm  view on Meta::CPAN

     my $vwo=($vw && $vw->{-orderby} ? $vw->{-orderby} :'');
        $vwo=$s->htmlescape(ref($vwo) 
                  ? join(',', map {ref($_) ? join(' ',@$_): $_} @$vwo)
                  : $vwo);
     $p->print('<hr />');
     $p->print('<table>');
    if ($s->{-lists}) {
     $p->print('<tr>');
     $p->print->th({-align=>'left',-valign=>'top',-class=>'Form'},$s->lng(0,'LIST'));
     $p->print->td({-valign=>'top',-class=>'Form'}
			,$p->popup_menu(-name=>$s->pxsw('LIST')
			,-title =>$s->lng(1,'LIST')
			,-values=>$s->qlstnmes
			,-labels=>$s->qlstlbls
			,-default=>$s->qlst
			,-class=>'Form')
                  . ($vwf ? "<font style=\"font-size: smaller;\"> ($vwf)</font>" :''));
     $p->print('</tr>');
    }
     $p->print('<tr>');
     $p->print->th({-align=>'left',-valign=>'top',-class=>'Form'},$s->lng(0,'WHERE'));

lib/CGI/Bus/tmsql.pod  view on Meta::CPAN

Fields at the right will be shifted to the left.


=item -inp

Input or edit HTML widget description:
-inp=>{?attributes} or -inp=>[input_type => {?attributes}].
Short form may be used to describe 
'textfield' or 'htmltextfield', 
'textarea' or 'htmltextarea', 
or 'popup_menu'.
C<-htmlopt> => 1 attribute causes to use data as HTML if 
HTML formatting detected with C<ishtml> L<CGI::Bus|CGI/Bus> method.
'htmltextarea' URLs display behaviour is extended with 
special URL protocol 'fsurl://' to be translated to C<fsurl> value.
See also L<CGI::Bus|CGI/Bus> for 'htmltextfield' and 'htmltextarea'
attributes.


=item -inphtml

lib/CGI/Bus/upws.pm  view on Meta::CPAN

 $s->print->h1($s->lng(0, 'Search'));
 $s->print('</td><td align="left" valign="bottom">')
          ->text($s->lng(1, 'Search', $s->parent->surl));
 $s->print('</td>');
 $s->print('</tr></table>');
 $s->print->htmltextfield(-name=>'query', -asize=>70, -class=>'PaneList')
          ->submit(-name =>'search', -class=>'PaneList'
                  ,-value=>$s->lng(0, 'Search')
                  ,-title=>$s->lng(1, 'Search'))
          ->br;
 $s->print->popup_menu(-name=>'querysort', -class=>'PaneList'
                      ,-values=>['write','hitcount','vpath','docauthor']
                      ,-labels=>{'write'    =>'Chronologically'
                                ,'hitcount' =>'Ranked'
                                ,'vpath'    =>'by Name'
                                ,'docauthor'=>'by Author'
                                }
                      ,-default=>'write');
 $s->print->popup_menu(-name=>'querymarg', -class=>'PaneList'
                      ,-values=>[128,256,512,1024,2048]
                      ,-labels=>{128 =>'128  max'
                                ,256 =>'256  max'
                                ,512 =>'512  max'
                                ,1024=>'1024 max'
                                ,2048=>'2048 max'
                                }
                      ,-default=>256);
# $s->print->a({-href=>
#      -e ($ENV{windir} .'/help/ix/htm/ixqrylan.htm')

lib/CGI/Bus/upws.pm  view on Meta::CPAN

 }
 elsif ($rd) {
    $s->pushmsg('Data Loaded')
 }

 $s->print("<table class=\"PaneForm\">\n");
 $s->print('<tr>');
 if (scalar(@$ua)) {
 unshift @$ua, $u0;
 $s->print->th($ha, $s->lng(0, 'User'));
 $s->print->td($hd, $g->popup_menu(-name=>'user', -class=>'PaneForm'
                              ,-values=>$ua
                              ,-labels=>$s->uglist({},37)
                              ,-default=>($un||$u0)) 
                  . $g->submit(-name=>'read', -class=>'PaneForm'
                              ,-value=>$s->lng(0, 'Read')
                              ,-title=>$s->lng(1, 'Read'))
                  . $g->submit(-name=>'save', -class=>'PaneForm'
                              ,-value=>$s->lng(0, 'Save')
                              ,-title=>$s->lng(1, 'Save')));
 $s->print("</tr>\n<tr>");

lib/CGI/Bus/upws.pm  view on Meta::CPAN

 $s->print("</tr>\n<tr>");
 $s->print->th($ha, $s->lng(0, 'USFHome'));
 $s->param('upws_usfhome',$s->usfhome(1)) if $s->param('upws_usfhome_');
 $s->print->td($hd, $s->htmltextfield(-name=>'upws_usfhome', -asize=>70, -class=>'PaneForm')
              .$s->submit(-name=>'upws_usfhome_', -value=>'<-', -title=>$s->lng(1, 'Refresh'), -class=>'PaneForm')
              .$s->_ssfcmt('USFHome'));
 }

 $s->print("</tr>\n<tr>");
 $s->print->th($ha, $s->lng(0, 'PrimaryRole'));
 $s->print->td($hd, $s->popup_menu(-name=>'urole', -values=>['',@{$s->ugroups}], -class=>'PaneForm')
              .$s->_ssfcmt('PrimaryRole'));

 $s->print("</tr>\n<tr>");
 $s->print->th($ha, '');
 $s->print->td($hd, $g->submit(-name=>'save', -class=>'PaneForm'
                              ,-value=>$s->lng(0, 'Save')
                              ,-title=>$s->lng(1, 'Save')));
 $s->print("</tr>\n");
 $s->print("</table>\n");
 $s->scrbot;



( run in 1.744 second using v1.01-cache-2.11-cpan-364913b4093 )