Fixed issues in embedded form IE incompatability in interview tool.
authorAlan Pippin <apippin@pippins.net>
Tue, 12 Oct 2010 01:36:56 +0000 (19:36 -0600)
committerAlan J. Pippin <ajp@pippins.net>
Tue, 12 Oct 2010 01:36:56 +0000 (19:36 -0600)
Removed fixed table widths from interview scheduling tool.

inc/class.tc.inc.php
templates/default/int_sched.tpl
templates/default/ppi_sched.tpl

index 7191469bbb3dc4c707684d91b59733b683d681e1..6d40fdccb08d082010f6b2372e3ff76ff88bc087 100644 (file)
@@ -1659,7 +1659,6 @@ class tc
                $this->t->set_block('int_sched_t','appt_list','apptlist');
                $action = get_var('action',array('GET','POST'));
 
-               $this->t->set_var('lang_save','Save Appt / Pri / Notes');
                $this->t->set_var('lang_reset','Clear Changes');
 
                $this->t->set_var('int_link',$GLOBALS['phpgw']->link('/tc/index.php','menuaction=tc.tc.int_view'));
@@ -1671,13 +1670,11 @@ class tc
                $this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/tc/index.php','menuaction=tc.tc.int_sched&action=save'));
                $this->t->set_var('title','Hometeaching Interviews Scheduler');
 
-               $indiv_width=500; $phone_width=25; $pri_width=10; $notes_width=128; $int_date_width=20;
-               $table_width=$indiv_width + $phone_width + $pri_width + $notes_width + $int_date_width;
-               $header_row = "<th width=$indiv_width><font size=-2>Individual</th>";
-               $header_row.= "<th width=$phone_width><font size=-2>Phone</th>";
-               $header_row.= "<th width=$pri_width><font size=-2>Priority</th>";
-               $header_row.= "<th width=$int_date_width><font size=-2>Last Interview</th>";
-               $header_row.= "<th width=$notes_width><font size=-2>Scheduling Notes</th>";
+               $header_row = "<th><font size=-2>Individual</th>";
+               $header_row.= "<th><font size=-2>Phone</th>";
+               $header_row.= "<th><font size=-2>Priority</th>";
+               $header_row.= "<th><font size=-2>Last Interview</th>";
+               $header_row.= "<th><font size=-2>Scheduling Notes</th>";
                $table_data=""; $completed_data=""; $totals_data="";
 
                $year = date('Y');
@@ -1790,12 +1787,10 @@ class tc
 
                // APPOINTMENT TABLE
                $district = 1;
-               $date_width=250; $time_width=100; $indiv_width=200; $location_width=100;
-               $appt_table_width=$date_width + $time_width + $indiv_width + $location_width;
-               $appt_header_row = "<th width=$date_width><font size=-2>Date</th>";
-               $appt_header_row.= "<th width=$time_width><font size=-2>Time</th>";      
-               $appt_header_row.= "<th width=$indiv_width><font size=-2>Individual</th>";
-               $appt_header_row.= "<th width=$location_width><font size=-2>Location</th>";
+               $appt_header_row = "<th><font size=-2>Date</th>";
+               $appt_header_row.= "<th><font size=-2>Time</th>";      
+               $appt_header_row.= "<th><font size=-2>Individual</th>";
+               $appt_header_row.= "<th><font size=-2>Location</th>";
                $appt_table_data = ""; 
 
                $total_comps=0; $comps_with_quarterly_int=0;
@@ -1868,7 +1863,6 @@ class tc
 
                        $this->t->set_var('appt_table_data',$appt_table_data);
                        $this->t->set_var('appt_header_row',$appt_header_row);
-                       $this->t->set_var('appt_table_width',$appt_table_width);
 
                        // INTERVIEW SCHEDULING TABLE
 
@@ -1981,28 +1975,24 @@ class tc
                                }
                        }
 
-                       $name_width=175; $phone_width=100; $date_width=100; $notes_width=300;
-                       $completed_table_width=$name_width + $phone_width + $date_width + $notes_width;
-                       $completed_header_row = "<th width=$name_width><font size=-2>Individual</th>";
-                       $completed_header_row.= "<th width=$phone_width><font size=-2>Phone</th>";      
-                       $completed_header_row.= "<th width=$date_width><font size=-2>Date</th>";
-                       $completed_header_row.= "<th width=$notes_width><font size=-2>Interview Notes</th>";
+                       $completed_header_row = "<th><font size=-2>Individual</th>";
+                       $completed_header_row.= "<th><font size=-2>Phone</th>";      
+                       $completed_header_row.= "<th><font size=-2>Date</th>";
+                       $completed_header_row.= "<th><font size=-2>Interview Notes</th>";
 
-                       $this->t->set_var('table_width',$table_width);
                        $this->t->set_var('header_row',$header_row);
                        $this->t->set_var('table_data',$table_data);
                        $this->t->set_var('completed_header_row',$completed_header_row);
-                       $this->t->set_var('completed_table_width',$completed_table_width);
                        $this->t->set_var('completed',$completed_data);
+                       $this->t->set_var('lang_save_appt','Save Appts for ' . $districts[$d]['name']);
+                       $this->t->set_var('lang_save_pri_notes','Save Pri / Notes for '. $districts[$d]['name']);
                        $this->t->fp('indivlist','individual_list',True);
 
                } // End for each district loop
 
 
-               $indivs_width=300; $totals_width=100;
-               $totals_table_width=$indivs_width + $totals_width;
-               $totals_header_row = "<th width=$indivs_width><font size=-2>Individuals</th>";
-               $totals_header_row.= "<th width=$totals_width><font size=-2>$year</th>";
+               $totals_header_row = "<th><font size=-2>Individuals</th>";
+               $totals_header_row.= "<th><font size=-2>$year</th>";
                $totals_data.= "<tr bgcolor=". $this->t->get_var('tr_color') .">";
                $totals_data.= "<td align=left><font size=-2><b>Total Companionships with interviews completed:</b></font></td>";
                $totals_data.= "<td align=center><font size=-2><b>$comps_with_quarterly_int / $total_comps</b></font></td>";
@@ -2016,7 +2006,6 @@ class tc
 
                $this->t->set_var('totals',$totals_data);
                $this->t->set_var('totals_header_row',$totals_header_row);
-               $this->t->set_var('totals_table_width',$totals_table_width);
 
                $this->t->pfp('out','int_sched_t');
                $this->save_sessiondata(); 
index 1ddbae2a91fe702b21b288d9792ef3953eb5a47c..1c309390d5b593b5d74ac35aaf303dfa07243611 100644 (file)
@@ -1,6 +1,5 @@
 <center>
-       <form action="{actionurl}" method="POST">
-       <table border="0" width="{table_width}" cellspacing="2" cellpadding="2">
+       <table border="0" width="60%" cellspacing="2" cellpadding="2">
                <tr>
                        <td align="center" bgcolor="#c9c9c9"><font face="{font}"><b>{title}</b></font></td>
                </tr>
@@ -15,7 +14,7 @@
 <!-- BEGIN individual_list -->
        <form action="{actionurl}" method="POST">
         <hr>
-        <table border="0" width="{appt_table_width}" cellspacing="2" cellpadding="2">
+        <table border="0" width="60%" cellspacing="2" cellpadding="2">
                <tr>
                        <td align="center" bgcolor="#c9c9c9" colspan=20>
                                <font face="{font}"><b>{appt_table_title}</b></font>
                <td></td><td></td><td></td><td></td>
                </tr>
         </table>
-       <table border="0" width="{table_width}" cellspacing="2" cellpadding="2">
+       <table border="0" width="60%" cellspacing="2" cellpadding="2">
                <tr>
                 <td height="50" align="right">
-                       <font face="{font}"><input type="submit" name="save" value="{lang_save}"></font>
+                       <font face="{font}"><input type="submit" name="save" value="{lang_save_appt}"></font>
                        &nbsp; &nbsp;
                        <font face="{font}"><input type="reset" name="reset" value="{lang_reset}"></font>
                        </form>
@@ -38,7 +37,8 @@
                </tr>
        </table>
 
-       <table border="0" width="{table_width}" cellspacing="2" cellpadding="2">
+       <form action="{actionurl}" method="POST">
+       <table border="0" width="60%" cellspacing="2" cellpadding="2">
                <tr>
                        <td align="center" bgcolor="#c9c9c9" colspan=20>
                                <font face="{font}"><b>{table_title}</b></font>
@@ -48,9 +48,8 @@
                {table_data}
                <tr>
                <tr><td colspan=5 align=center><i>Note: The highest priority is 1, the lowest priority is 30</i></td></tr>
-               <td></td><td></td><td></td><td></td>
-               <td height="50" align="right">
-                       <font face="{font}"><input type="submit" name="save" value="{lang_save}"></font>
+               <tr align="right"><td height="50" colspan=5 align="right">
+                       <font face="{font}"><input type="submit" name="save" value="{lang_save_pri_notes}"></font>
                        &nbsp; &nbsp;
                        <font face="{font}"><input type="reset" name="reset" value="{lang_reset}"></font>
                        </form>
@@ -59,7 +58,7 @@
        </table>
 <!-- END individual_list -->
        <hr>
-       <table border="0" width="{completed_table_width}" cellspacing="2" cellpadding="2">
+       <table border="0" table="50%" cellspacing="2" cellpadding="2">
                <tr>
                        <td align="center" bgcolor="#c9c9c9" colspan=20>
                        <font face="{font}"><b>All Individuals with Interviews Completed</b></font>
@@ -70,7 +69,7 @@
        </table>
        <br><br>
 
-       <table border="0" width="{totals_table_width}" cellspacing="2" cellpadding="2">
+       <table border="0" table="50%" cellspacing="2" cellpadding="2">
                <tr>
                        <td align="center" bgcolor="#c9c9c9" colspan=20>
                        <font face="{font}"><b>Total Hometeaching Interviews</b></font>
index 08d5eae54ca1ecbf7b3b2a4fea8bbb8fb9253fda..449648d82ed4b6f2832955ea37a96ef3c7515562 100644 (file)
@@ -1,5 +1,5 @@
 <center>
-       <table border="0" cellspacing="2" cellpadding="2">
+       <table border="0" width="50%" cellspacing="2" cellpadding="2">
                <tr>
                        <td align="center" bgcolor="#c9c9c9"><font face="{font}"><b>{title}</b></font></td>
                </tr>
@@ -14,7 +14,7 @@
 <!-- BEGIN appt_list -->
        <form action="{actionurl}" method="POST">
                <input type=hidden name=presidency_location value={presidency_location}>
-        <table border="0" cellspacing="2" cellpadding="2">
+        <table border="0" width="50%" cellspacing="2" cellpadding="2">
                <tr>
                        <td align="center" bgcolor="#c9c9c9" colspan=20>
                                <font face="{font}"><b>{appt_table_title}</b></font>
@@ -26,7 +26,7 @@
                <td></td><td></td><td></td><td></td>
                </tr>
         </table>
-       <table border="0" cellspacing="2" cellpadding="2">
+       <table border="0" width="50%" cellspacing="2" cellpadding="2">
                <tr>
                 <td height="50" align="right">
                        <font face="{font}"><input type="submit" name="save" value="{lang_save}"></font>
@@ -40,7 +40,7 @@
 <hr>
 <!-- BEGIN individual_list -->
         <form action="{actionurl}" method="POST">
-       <table border="0" cellspacing="2" cellpadding="2">
+       <table border="0" table="50%" cellspacing="2" cellpadding="2">
                <tr>
                        <td colspan=5 height="50" align="right">
                                <font face="{font}"><input type="submit" name="save" value="{lang_save}"></font>
@@ -68,7 +68,7 @@
         </form>
 <!-- END individual_list -->
        <hr>
-       <table border="0" cellspacing="2" cellpadding="2">
+       <table border="0" width="50%" cellspacing="2" cellpadding="2">
                <tr>
                        <td align="center" bgcolor="#c9c9c9" colspan=20>
                        <font face="{font}"><b>{completed_table_title}</b></font>
@@ -79,7 +79,7 @@
        </table>
        <br><br>
 
-       <table border="0" cellspacing="2" cellpadding="2">
+       <table border="0" width="50%" cellspacing="2" cellpadding="2">
                <tr>
                        <td align="center" bgcolor="#c9c9c9" colspan=20>
                        <font face="{font}"><b>Total {ppi_frequency_label} PPIs</b></font>