/[cvs]/nfo/php/libs/org.netfrag.patches/phphtmllib/forms/UploadForm.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.patches/phphtmllib/forms/UploadForm.php

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

revision 1.1 by udo, Fri Nov 14 17:02:28 2003 UTC revision 1.3 by udo, Fri Nov 14 18:04:13 2003 UTC
# Line 14  Line 14 
14   * $Id$   * $Id$
15   *   *
16   * $Log$   * $Log$
17     * Revision 1.3  2003/11/14 18:04:13  udo
18     * fixed textArea dependent to _show_items and _set_items
19     *
20     * Revision 1.2  2003/11/14 17:51:20  udo
21     * changed label-text
22     *
23   * Revision 1.1  2003/11/14 17:02:28  udo   * Revision 1.1  2003/11/14 17:02:28  udo
24   * initial commit   * initial commit
25   *   *
# Line 81  Line 87 
87    
88  // this is needed for sorting  // this is needed for sorting
89      $tmp_array = array();      $tmp_array = array();
90      $larger = array();  $larger = array();
91  // this is needed because the arrays may have to be filled with an array  // this is needed because the arrays may have to be filled with an array
92      $empty_array = array("lvalue" => "", "lkey" => "", "lcountrykey" => "", "guid" => "" );      $empty_array = array("lvalue" => "", "lkey" => "", "lcountrykey" => "", "guid" => "" );
93    
# Line 106  Line 112 
112      } else {      } else {
113        $larger = $this->_show_items;        $larger = $this->_show_items;
114        }        }
         
115    
       
116  // both arrays are parsed and missing entries (without a key) are filled  // both arrays are parsed and missing entries (without a key) are filled
117  // with the empty_array. missing lkeys are filled with the lkey from used_keys,  // with the empty_array. missing lkeys are filled with the lkey from used_keys,
118  // so that now every key of the arrays has matching entries. this is important,  // so that now every key of the arrays has matching entries. this is important,
# Line 125  Line 129 
129          }          }
130        }        }
131    
132          
133  // is _undone is selected, that means that the user only wants to see the items that  // is _undone is selected, that means that the user only wants to see the items that
134  // are not yet translated, every entry, that has lvalues in both arrays, is marked.  // are not yet translated, every entry, that has lvalues in both arrays, is marked.
135      if ($this->_undone == "yes") {      if ($this->_undone == "yes") {
# Line 138  Line 142 
142      }      }
143            
144            
145  // the elements of the form are created  //print "used_keys: " . Dumper($used_keys) . "<br>";
146      foreach($this->_set_items as $key => $value) {  //print "_set_items: " . Dumper($this->_set_items) . "<br>";
147    //print "_show_items: " . Dumper($this->_show_items) . "<br>";
148    
149              
150        
151    // the elements of the form are created
152        foreach($used_keys as $key => $value) {
153  // if the entry == kickedMarkerXXX, $value will be no array  // if the entry == kickedMarkerXXX, $value will be no array
154        if (is_array($value)) {        if (is_array($this->_set_items[$key])) {
155          $show_element = $value['lkey'] . $this->_show_lang . "s";          $show_element = $value . $this->_show_lang . "s";
156          $set_element = $value['lkey'] . $this->_set_lang . "u";          $set_element = $value . $this->_set_lang . "u";
           
157    
158            if ((strlen($this->_set_items[$key]['lvalue']) < 40) && (strlen($this->_show_items[$key]['lvalue']) < 40)) {
         if (strlen($value['lvalue']) > 40) {  
           $this->add_element( new FETextArea($show_element, true, 10, 40));  
           $this->add_element( new FETextArea($set_element, true, 10, 40));  
         } else{  
159            $this->add_element( new FEText($show_element, true, 40, 60));            $this->add_element( new FEText($show_element, true, 40, 60));
160            $this->add_element( new FEText($set_element, true, 40, 60));            $this->add_element( new FEText($set_element, true, 40, 60));
161            } else{
162              $this->add_element( new FETextArea($show_element, true, 10, 40));
163              $this->add_element( new FETextArea($set_element, true, 10, 40));
164    
165          }          }
166          $myElement = &$this->get_element($show_element);          $myElement = &$this->get_element($show_element);
167          $myElement->set_attribute("readonly");          $myElement->set_attribute("readonly");
# Line 174  Line 181 
181          $this->set_element_value($set_element, $this->_set_items[$key]['lvalue']);          $this->set_element_value($set_element, $this->_set_items[$key]['lvalue']);
182                    
183          $myElement = &$this->get_element($show_element);          $myElement = &$this->get_element($show_element);
184          $myElement->set_label_text("");          $myElement->set_label_text($value['lkey']);
185          $myElement->set_required(false);          $myElement->set_required(false);
186                    
187          $myElement = &$this->get_element($set_element);          $myElement = &$this->get_element($set_element);
188          $myElement->set_label_text("");          $myElement->set_label_text($value['lkey']);
189          $myElement->set_required(false);          $myElement->set_required(false);
190        }        }
191      }            }      
# Line 565  class UploadForm extends StandardFormCon Line 572  class UploadForm extends StandardFormCon
572            
573  }  }
574    
 ?>  
575    ?>

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

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