ispman/ispman-web/cgi-bin/tmpl/hostgroups addHostGroup.tmpl, NONE, 1.1 manageHostGroups.tmpl, 1.7, 1.8

Joerg Delker <[email protected]> Tue, 03 Oct 2006 08:56:37 +0000
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/hostgroups
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv9682/ispman-web/cgi-bin/tmpl/hostgroups

Modified Files:
	manageHostGroups.tmpl 
Added Files:
	addHostGroup.tmpl 
Log Message:
fixed [ 1553409 ] Web UI: Configure->Hosts and Configure->HostGroups
fixed [ 1569808 ] add hostgroup is broken
switched to css formating

--- NEW FILE: addHostGroup.tmpl ---
<script language="Javascript">
function checkHostGroupName(str){
        if (str.indexOf(" ")!=-1) {
                alert("You cannot have spaces in a hostGroupName");
                return false;
        } else {
                return true;                
        }
                        
                        
}
</script>

<form onsubmit="return checkHostGroupName(this.cn.value)">
<table>
<tr>
    <td>
        <perl>_("Host group name")</perl>
    </td>
    <td>
        <INPUT TYPE="TEXT" NAME=cn>
    </td>
</tr>
<tr>
    <td>
        <perl>_("Host group Description")</perl>
    </td>
    <td>
        <textarea name=description cols=30 rows=5 wrap=virtual></textarea>
    </td>
</tr>

<tr>
  <td align=right colspan=2>
    <input type=hidden name="mode" value="addHostGroup">
	<input type=button class="button" onClick="self.location='<perl>$ENV{'SCRIPT_NAME'}</perl>?mode=configure'" value="<perl>_("Back")</perl>">
    <input type=button class="button" onClick="document.forms[0].reset()" value="<perl>_("Reset")</perl>">
    <input type=button class="button" onClick="document.forms[0].submit()" value="<perl>_("Add hostgroup")</perl>">
  </td>
</tr>
</table>
</form>
 
 

Index: manageHostGroups.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/hostgroups/manageHostGroups.tmpl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- manageHostGroups.tmpl	24 May 2004 21:25:03 -0000	1.7
+++ manageHostGroups.tmpl	3 Oct 2006 08:56:35 -0000	1.8
@@ -1,27 +1,9 @@
-<script language="Javascript">
-function checkHostGroupName(str){
-        if (str.indexOf(" ")!=-1) {
-                alert("You cannot have spaces in a hostGroupName");
-                return false;
-        } else {
-                return true;                
-        }
-                        
-                        
-}
-</script>
-
-
-<BR><BR>
-<TABLE width=500 border=0 cellpadding=2 cellspacing=0>
-<TR bgcolor="#dfffff">
-<TH bgcolor="#dfffff"><perl>_("Name")</perl></th>
-<TH bgcolor="#dfffff"><perl>_("Description")</perl></th>
-<TH bgcolor="#dfffff"><perl>_("Members")</perl></th>
-<TH bgcolor="#dfffff"><perl>_("Actions")</perl></th>
-
-
-
+<table class=list>
+<tr>
+  <th><perl>_("Name")</perl></th>
+  <th><perl>_("Description")</perl></th>
+  <th><perl>_("Members")</perl></th>
+  <th>&nbsp;</th>
 </tr>
 
 <perl>
@@ -31,10 +13,10 @@
 my $members;
 
 
-for  $hostgroup(keys %$hostgroups){
-    $text.= "<TR>";
-    $text.="<TD valign=top bgcolor=WHITE>$hostgroups->{$hostgroup}{'ispmanHostGroupName'}</td>";
-    $text.="<TD bgcolor=WHITE>$hostgroups->{$hostgroup}{'ispmanHostGroupInfo'}</td>";
+for $hostgroup(keys %$hostgroups){
+    $text.= "<tr class=list>\n";
+    $text.="<td>$hostgroups->{$hostgroup}{'ispmanHostGroupName'}</td>";
+    $text.="<td>$hostgroups->{$hostgroup}{'ispmanHostGroupInfo'}</td>";
     if ( $hostgroups->{$hostgroup}{'ispmanHostGroupMember'} ){
         if (ref    $hostgroups->{$hostgroup}{'ispmanHostGroupMember'} eq "ARRAY"){
             $members= join ', ', @{$hostgroups->{$hostgroup}{'ispmanHostGroupMember'}};
@@ -42,20 +24,20 @@
             $members=$hostgroups->{$hostgroup}{'ispmanHostGroupMember'};
         }
     } else{
-        $members="<FONT COLOR=RED>";
-	$members.=_("No members defined");
-	$members.="</font>";
+        $members="<font color=red>";
+	    $members.=_("No members defined");
+	    $members.="</font>";
     }
             
                 
-    $text.="<TD bgcolor=WHITE> $members</td>";
-    $text.="<TD><A HREF='@{[$r->url]}?mode=editHostGroup&ispmanHostGroupName=$hostgroups->{$hostgroup}{'ispmanHostGroupName'}'>";
-    $text.=_("Edit");
-    $text.="</a></td>";
-    $text.="<TD><A HREF='@{[$r->url]}?mode=removeHostGroup&ispmanHostGroupName=$hostgroups->{$hostgroup}{'ispmanHostGroupName'}''>";
-    $text.=_("Delete");
-    $text.="</a></td>";
-    $text.= "</TR>";
+    $text.="<td>$members</td>";
+    $text.="<td><a href='".$ENV{'SCRIPT_NAME'}."?mode=editHostGroup&ispmanHostGroupName=$hostgroups->{$hostgroup}{'ispmanHostGroupName'}'>".
+           "<img src='".$ispman->getConfig("ispmanUrlPrefix")."/gfx/modify.gif' border=0>".
+           "</a>";
+    $text.="<a href='".$ENV{'SCRIPT_NAME'}."?mode=removeHostGroup&ispmanHostGroupName=$hostgroups->{$hostgroup}{'ispmanHostGroupName'}''>".
+    	   "<img src='".$ispman->getConfig('ispmanUrlPrefix')."/gfx/delete.gif' border=0>".
+           "</a></td>\n";
+    $text.= "</tr>\n";
 }
 $text
 
@@ -65,35 +47,7 @@
 
 <HR>
 
-
-
-
-
-<form onsubmit="return checkHostGroupName(this.cn.value)">
-<table>
-<tr>
-    <td>
-        <perl>_("Host group name")</perl>
-    </td>
-    <td>
-        <INPUT TYPE="TEXT" NAME=cn>
-    </td>
-</tr>
-<tr>
-    <td>
-        <perl>_("Host group Description")</perl>
-    </td>
-    <td>
-        <textarea name=description cols=30 rows=5 wrap=virtual></textarea>
-    </td>
-</tr>
-
-<input type=hidden name="mode" value="addHostGroup">
-   <tr><td align=right colspan=2>  
-         <input type=button class="button" onClick="document.forms[0].reset()" value="<perl>_("Reset")</perl>">
-         <input type=button class="button" onClick="document.forms[0].submit()" value="<perl>_("Add")</perl>">
-      </td></tr>
-   </form></table>
- 
- 
-
+<form>
+  <input type=button class="button" onClick="self.location='<perl>$ENV{'SCRIPT_NAME'}</perl>?mode=configure'" value="<perl>_("Back")</perl>">
+  <input type=button class="button" onClick="self.location='<perl>$ENV{'SCRIPT_NAME'}</perl>?mode=addHostGroupForm'" value="<perl>_("Add host")</perl>">
+</form>


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV