/[cvs]/nfo/php/libs/org.netfrag.patches/phphtmllib/widgets/FlexibleNegotiation.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.patches/phphtmllib/widgets/FlexibleNegotiation.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by joko, Fri Apr 11 01:34:46 2003 UTC revision 1.4 by jonen, Sat May 10 18:02:13 2003 UTC
# Line 14  Line 14 
14   * $Id$   * $Id$
15   *   *
16   * $Log$   * $Log$
17     * Revision 1.4  2003/05/10 18:02:13  jonen
18     * + implemented multi-selection (special for multi-delete)
19     *
20   * Revision 1.3  2003/04/11 01:34:46  joko   * Revision 1.3  2003/04/11 01:34:46  joko
21   * don't show any form content on this negotation (does delete only by now)   * don't show any form content on this negotation (does delete only by now)
22   *   *
# Line 58  class FlexibleNegotiation extends EditDa Line 61  class FlexibleNegotiation extends EditDa
61      // TODO: integrate into negotiation options!?      // TODO: integrate into negotiation options!?
62      $_POST[FORM_VISITED] = 1;      $_POST[FORM_VISITED] = 1;
63      //$_POST[FORM_CONFIRM] = 1;      //$_POST[FORM_CONFIRM] = 1;
64        
65         // on multi-selections we can't currently confirm relating on problems at var forwarding
66         if(is_array($options[data_locator_meta][ident])) {
67          $_POST[FORM_CONFIRM] = 1;
68         }
69            
70      // call constructor of base class      // call constructor of base class
71      $this->EditDataItem($title, $options);      $this->EditDataItem($title, $options);
# Line 104  class FlexibleNegotiation extends EditDa Line 112  class FlexibleNegotiation extends EditDa
112           */           */
113          function form_confirm( ) {          function form_confirm( ) {
114    
115          //print "Duids: " . Dumper($this->_options[data_locator_meta][ident]);
116    
117        $this->add_hidden_element('ecmod', 'delete');        $this->add_hidden_element('ecmod', 'delete');
118        $this->add_hidden_element('ecdid', $this->_options[data_locator_meta][ident]);  
119        $this->add_hidden_element('ecdm', $this->_options[data_locator_meta][nodename]);        // if ident is an array( multi-selection!) forward this
120          // TODO: make it work!! Problem is that '$this->add_hidden_element'
121          //     adds an 'FEHidden' object which replaces '[]' at array vars with '_', what will not work at request handling
122          if(is_array($this->_options[data_locator_meta][ident])) {
123            $this->add_hidden_element('ecdid', $this->_options[data_locator_meta][nodename]);
124            $this->add_hidden_element('ecdfa', 'delete');
125            foreach($this->_options[data_locator_meta][ident] as $key => $ident) {
126              //$this->add_hidden_element("checkbox[".$key."]", $ident);
127            }
128            $this->add_hidden_element('checkbox', $this->_options[data_locator_meta][ident]);
129          } else {
130            $this->add_hidden_element('ecdid', $this->_options[data_locator_meta][ident]);
131            $this->add_hidden_element('ecdm', $this->_options[data_locator_meta][nodename]);
132          }
133    
134          $title = "Form Confirmation / " . $this->_options['caption'];          $title = "Form Confirmation / " . $this->_options['caption'];
135          $title .="( ".$this->_required_field_marker." ".$this->_required_field_text." )";          $title .="( ".$this->_required_field_marker." ".$this->_required_field_text." )";
# Line 148  class FlexibleNegotiation extends EditDa Line 171  class FlexibleNegotiation extends EditDa
171       */       */
172      function confirm_action() {      function confirm_action() {
173    
174          //print "Guid(s): " . Dumper($this->_options['data_locator_meta']['ident']);
175        
176        // If user confirms action, issue delete request on current item.        // If user confirms action, issue delete request on current item.
177        $this->_options['data_locator_meta']['action'] = "delete";        $this->_options['data_locator_meta']['action'] = "delete";
178        $error = $this->data_prefetch();        $error = $this->data_prefetch();

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed