[otrs-cvs] ImportExport/Kernel/Output/HTML ImportExportLayoutSelection.pm, 1.2, 1.3 ImportExportLayoutText.pm, 1.2, 1.3 LayoutImportExport.pm, 1.2, 1.3

cvs-log at otrs.org cvs-log at otrs.org
Tue Feb 5 11:29:06 GMT 2008


Comments:
Update of /home/cvs/ImportExport/Kernel/Output/HTML
In directory lancelot:/tmp/cvs-serv11681/Kernel/Output/HTML

Modified Files:
	ImportExportLayoutSelection.pm ImportExportLayoutText.pm 
	LayoutImportExport.pm 
Log Message:
Improved import export mechanism.

Author: mh

Index: ImportExportLayoutSelection.pm
===================================================================
RCS file: /home/cvs/ImportExport/Kernel/Output/HTML/ImportExportLayoutSelection.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ImportExportLayoutSelection.pm	4 Feb 2008 12:19:54 -0000	1.2
--- ImportExportLayoutSelection.pm	5 Feb 2008 11:29:01 -0000	1.3
***************
*** 75,83 ****
      }
  
!     # generate OptionStrg
      my $String = $Self->{LayoutObject}->BuildSelection(
!         %{ $Param{Item}->{Input} },
!         Name => $Param{Item}->{Key} || '',
!         SelectedID => $Param{Value},
      );
  
--- 75,90 ----
      }
  
!     # set default value
!     if ( !defined $Param{Item}->{Input}->{Translation} ) {
!         $Param{Item}->{Input}->{Translation} = 1;
!     }
! 
!     # generate option string
      my $String = $Self->{LayoutObject}->BuildSelection(
!         Name       => $Param{Item}->{Key}           || '',
!         Data       => $Param{Item}->{Input}->{Data} || {},
!         SelectedID => $Param{Value}                 || $Param{Item}->{Input}->{ValueDefault},
!         Translation => $Param{Item}->{Input}->{Translation},
!         PossibleNone => $Param{Item}->{Input}->{PossibleNone} || 0,
      );
  
***************
*** 107,110 ****
--- 114,123 ----
      my $FormData = $Self->{ParamObject}->GetParam( Param => $Param{Item}->{Key} );
  
+     return $FormData if $FormData;
+     return $FormData if !$Param{Item}->{Input}->{Required};
+ 
+     # set invalid param
+     $Param{Item}->{Form}->{Invalid} = 1;
+ 
      return $FormData;
  }

Author: mh

Index: ImportExportLayoutText.pm
===================================================================
RCS file: /home/cvs/ImportExport/Kernel/Output/HTML/ImportExportLayoutText.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ImportExportLayoutText.pm	4 Feb 2008 12:19:54 -0000	1.2
--- ImportExportLayoutText.pm	5 Feb 2008 11:29:01 -0000	1.3
***************
*** 75,83 ****
      }
  
      my $Size = $Param{Item}->{Input}->{Size} || 40;
!     my $Key  = $Param{Item}->{Key}           || '';
!     my $Value = $Param{Value} || $Param{Item}->{Input}->{ValueDefault} || '';
! 
!     my $String = "<input type=\"Text\" name=\"$Key\" size=\"$Size\" ";
  
      if ($Value) {
--- 75,81 ----
      }
  
+     my $Value = $Param{Value} || $Param{Item}->{Input}->{ValueDefault};
      my $Size = $Param{Item}->{Input}->{Size} || 40;
!     my $String = "<input type=\"Text\" name=\"$Param{Item}->{Key}\" size=\"$Size\" ";
  
      if ($Value) {
***************
*** 97,100 ****
--- 95,103 ----
      }
  
+     # add maximum length
+     if ( $Param{Item}->{Input}->{MaxLength} ) {
+         $String .= "maxlength=\"$Param{Item}->{Input}->{MaxLength}\" ";
+     }
+ 
      $String .= "> ";
  
***************
*** 124,127 ****
--- 127,136 ----
      my $FormData = $Self->{ParamObject}->GetParam( Param => $Param{Item}->{Key} );
  
+     return $FormData if $FormData;
+     return $FormData if !$Param{Item}->{Input}->{Required};
+ 
+     # set invalid param
+     $Param{Item}->{Form}->{Invalid} = 1;
+ 
      return $FormData;
  }

Author: mh

Index: LayoutImportExport.pm
===================================================================
RCS file: /home/cvs/ImportExport/Kernel/Output/HTML/LayoutImportExport.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** LayoutImportExport.pm	4 Feb 2008 12:19:54 -0000	1.2
--- LayoutImportExport.pm	5 Feb 2008 11:29:01 -0000	1.3
***************
*** 40,44 ****
      # load backend
      my $BackendObject = $Self->_ImportExportLoadLayoutBackend(
!         Type => $Param{Item}->{Type},
      );
  
--- 40,44 ----
      # load backend
      my $BackendObject = $Self->_ImportExportLoadLayoutBackend(
!         Type => $Param{Item}->{Input}->{Type},
      );
  
***************
*** 72,76 ****
      # load backend
      my $BackendObject = $Self->_ImportExportLoadLayoutBackend(
!         Type => $Param{Item}->{Type},
      );
  
--- 72,76 ----
      # load backend
      my $BackendObject = $Self->_ImportExportLoadLayoutBackend(
!         Type => $Param{Item}->{Input}->{Type},
      );
  


More information about the cvs-log mailing list