CVS: ispman/ispman-web/cgi-bin/tmpl/vhosts add.tmpl,1.11,1.12 edit.tmpl,1.17,1.18

Joerg Delker <[email protected]>
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/vhosts
In directory sc8-pr-cvs1:/tmp/cvs-serv27313/cgi-bin/tmpl/vhosts

Modified Files:
	add.tmpl edit.tmpl 
Log Message:
some major bugfixes/form completion
in particular: 
* beauty cleanup (old stylesheet tags, reordering of fields)
* form completion for default file/mail/webhosts
* enhancment for multiple webhosts


Index: add.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/vhosts/add.tmpl,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** add.tmpl	31 Jul 2003 00:55:09 -0000	1.11
--- add.tmpl	8 Jan 2004 00:08:26 -0000	1.12
***************
*** 26,29 ****
--- 26,84 ----
  
  <tr>
+     <td valign=center>Create vhost  on server</td>
+     <td>
+         <select name="webHost" MULTIPLE>
+         <perl>
+         my $text="";
+         my @webhosts=$ispman->getGroupMembers("httpgroup");
+         my @defaulthosts=$ispman->as_array($ispman->{'domain'}->{'ispmanDomainDefaultWebHost'});
+ 
+         for (@webhosts){
+             my $webhost=$_;
+             my $tag="";
+             for (@defaulthosts){
+                 if ($webhost eq $_) { $tag="selected" };
+             }
+             $text.="<option VALUE=\"$_\" $tag>$_</option>";
+         }
+ 
+         if  ($#webhosts<0){
+             $text.="<option VALUE=''>WARNING: No members in group httphosts defined</option>";
+         }
+ 
+         $text
+         </perl>
+         </select>
+    </td>
+ </tr>
+ 
+ <tr>
+     <td valign=center>Create directories on server</td>
+     <td>
+         <select name="fileHost">
+         <perl>
+         my $text="";
+         my @filehosts=$ispman->getGroupMembers("fileservergroup");
+         my $filehost=$ispman->{'domain'}->{'ispmanDomainDefaultFileServer'};
+ 
+         for (@filehosts){
+             if ($filehost eq $_) {
+                $text.="<option VALUE=$_ selected>$_</option>";
+             } else {
+                $text.="<option VALUE=$_>$_</option>";
+             }
+         }
+ 
+         if  ($#filehosts<0){
+             $text.="<option VALUE=''>WARNING: No members in group fileserverhosts defined</option>";
+         }
+ 
+         $text
+         </perl>
+         </select>
+    </td>
+ </tr>
+ 
+ <tr>
      <td>DocumentRoot </td>
      <td>
***************
*** 78,106 ****
      <td colspan=2>
          <textarea wrap=virtual cols=65 rows=8 name=ispmanVhostExtraConf></textarea>
-    </td>                                                                                                                                        
- </tr>
- <tr>
-     <td valign=center>Create vhost  on server</td>
-     <td>
-         <select name="webHost">
-         <perl>
-         my $text="";
-         my @webhosts=$ispman->getGroupMembers("httpgroup");
-         
-         for (@webhosts){
-             $text.="<option VALUE='$_'>$_</option>";        
-         }
-         
-         if  ($#webhosts<0){
-             $text.="<option VALUE=''>WARNING: No members in group httphosts defined</option>";        
-         }
-         
-         
-         $text
-         </perl>
-         </select>
     </td>
- 
  </tr>
  <tr>
      <td>Log Directory </td>
--- 133,139 ----
      <td colspan=2>
          <textarea wrap=virtual cols=65 rows=8 name=ispmanVhostExtraConf></textarea>
     </td>
  </tr>
+ 
  <tr>
      <td>Log Directory </td>

Index: edit.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/vhosts/edit.tmpl,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** edit.tmpl	14 Jul 2003 17:44:21 -0000	1.17
--- edit.tmpl	8 Jan 2004 00:08:26 -0000	1.18
***************
*** 14,18 ****
      <td>
          <input  size=35 type=hidden name=webHost value="<perl>$ispman->{'vhost'}->{"webHost"}</perl>">
!         <perl>$ispman->{'vhost'}->{"webHost"}</perl>
      </td>
  </tr>
--- 14,27 ----
      <td>
          <input  size=35 type=hidden name=webHost value="<perl>$ispman->{'vhost'}->{"webHost"}</perl>">
!         <perl>
!         my $text="";
!         my @webhosts=$ispman->as_array($ispman->{'vhost'}{'webHost'});
! 
!         for (@webhosts){ 
! 	   if ($text) { $text.=", $_<br>"; } else { $text="$_"; }
!         }
! 
!         $text;
!         </perl>
      </td>
  </tr>



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.