From ebd681702ab9fb152d29442f3494a4eebcace7a2 Mon Sep 17 00:00:00 2001
From: Tim Steiner <tsteiner2@unl.edu>
Date: Fri, 2 Feb 2007 22:16:33 +0000
Subject: [PATCH] Rearranged fields on Edit pages

---
 application/views/request/course_id.xhtml     | 70 +++++++++++--
 application/views/request/credit_hours.xhtml  | 98 +------------------
 .../views/request/graduate_tie_in.xhtml       |  2 +-
 .../views/request/notes_description.xhtml     |  2 +-
 application/views/request/time_location.xhtml | 38 +++++++
 document_root/css/request/course_id.css       |  5 +
 document_root/css/request/credit_hours.css    |  5 -
 document_root/css/request/edit_wrapper.css    |  8 ++
 8 files changed, 119 insertions(+), 109 deletions(-)

diff --git a/application/views/request/course_id.xhtml b/application/views/request/course_id.xhtml
index 5797024b..63242017 100644
--- a/application/views/request/course_id.xhtml
+++ b/application/views/request/course_id.xhtml
@@ -1,4 +1,4 @@
-<fieldset class="two_column">
+<fieldset class="three_column">
     <label>
         <h2>Subject</h2>
         <input type="text" name="subject" value="<?php echo htmlspecialchars($this->course->subject); ?>" />
@@ -11,15 +11,71 @@
         <h2>Alpha Suffix (opt.)</h2>
         <input type="text" name="courseLetter" value="<?php echo htmlspecialchars($this->course->courseLetter); ?>" />
     </label>
+</fieldset>
+<fieldset class="one_column">
     <label>
         <h2>Title</h2>
         <input type="text" name="title" value="<?php echo htmlspecialchars($this->course->title); ?>" />
     </label>
 </fieldset>
 
-<fieldset>
-    <label>
-        <h2>Prerequisites (text)</h2>
-        <textarea name="prerequisite" class="mceEditor"><?php echo htmlspecialchars($this->course->prerequisite); ?></textarea>
-    </label>
-</fieldset>
\ No newline at end of file
+<h2>Crosslistings</h2>
+<fieldset class="three_column">
+    <table>
+        <tr>
+            <th>Subject</th>
+            <th>Course Number</th>
+            <th>Course Letter</th>
+            <th>Remove</th>
+        </tr>
+        <?php $hasTieIn = false;
+        foreach($this->course->crosslistings as $key => $crosslist) {
+            if($crosslist->type == 'grad tie-in') { $hasTieIn = true; }
+            if($crosslist->type != 'home listing') { ?>
+        <tr <?php if($crosslist->type == 'grad tie-in') { ?>class="grad_tie_in_row"<?php } ?>>
+            <td> <input type="text"
+                        name="crosslistings[<?php echo $key; ?>][subject]"
+                        value="<?php echo $crosslist->subject; ?>"
+                        <?php if($crosslist->type == 'grad tie-in') { ?>readonly=""<?php } ?>/> </td>
+            <td> <input type="text"
+                        name="crosslistings[<?php echo $key; ?>][courseNumber]"
+                        value="<?php echo $crosslist->courseNumber; ?>"
+                        <?php if($crosslist->type == 'grad tie-in') { ?>readonly=""<?php } ?> /> </td>
+            <td> <input type="text"
+                        name="crosslistings[<?php echo $key; ?>][courseLetter]"
+                        value="<?php echo $crosslist->courseLetter; ?>"
+                        <?php if($crosslist->type == 'grad tie-in') { ?>readonly=""<?php } ?> /> </td>
+            <td class="hidden">
+                <input type="hidden"
+                       name="crosslistings[<?php echo $key; ?>][type]"
+                       value="<?php echo $crosslist->type; ?>" />
+            </td>
+            <td> <input type="checkbox"
+                        name="crosslistings[<?php echo $key; ?>][delete]"
+                        value="yes" /> </td>
+        </tr>
+        <?php } } ?>
+        <tr class="hidden_new_record">
+            <td> <input disabled="disabled" type="text" name="crosslistings[__key__][subject]" /> </td>
+            <td> <input disabled="disabled" type="text" name="crosslistings[__key__][courseNumber]" /> </td>
+            <td> <input disabled="disabled" type="text" name="crosslistings[__key__][courseLetter]" /> </td>
+            <td class="hidden"> <input disabled="disabled" type="hidden" name="crosslistings[__key__][type]" value="crosslisting" /> </td>
+            <td> <a href="#" class="remove_record_button">-</a> </td>
+        </tr>
+        <tr>
+            <td colspan="4">
+                <a href="#" class="add_record_button">Add Crosslisting</a>
+                <?php if(!$hasTieIn) { ?>
+                <a href="#"
+                   class="add_record_button"
+                   id="add_tie_in_button_<?php echo $this->course->subject
+                                                  . '_' . $this->course->courseNumber
+                                                  . '_' . $this->course->courseLetter; ?>"
+                >
+                    Add Graduate Tie-In
+                </a>
+                <?php } ?>
+            </td>
+        </tr>
+    </table>
+</fieldset>
diff --git a/application/views/request/credit_hours.xhtml b/application/views/request/credit_hours.xhtml
index bdb1328a..d7720934 100644
--- a/application/views/request/credit_hours.xhtml
+++ b/application/views/request/credit_hours.xhtml
@@ -1,64 +1,3 @@
-<h2>Crosslistings</h2>
-<fieldset class="three_column">
-    <table>
-        <tr>
-            <th>Subject</th>
-            <th>Course Number</th>
-            <th>Course Letter</th>
-            <th>Remove</th>
-        </tr>
-        <?php $hasTieIn = false;
-        foreach($this->course->crosslistings as $key => $crosslist) {
-            if($crosslist->type == 'grad tie-in') { $hasTieIn = true; }
-            if($crosslist->type != 'home listing') { ?>
-        <tr <?php if($crosslist->type == 'grad tie-in') { ?>class="grad_tie_in_row"<?php } ?>>
-            <td> <input type="text"
-                        name="crosslistings[<?php echo $key; ?>][subject]"
-                        value="<?php echo $crosslist->subject; ?>"
-                        <?php if($crosslist->type == 'grad tie-in') { ?>readonly=""<?php } ?>/> </td>
-            <td> <input type="text"
-                        name="crosslistings[<?php echo $key; ?>][courseNumber]"
-                        value="<?php echo $crosslist->courseNumber; ?>"
-                        <?php if($crosslist->type == 'grad tie-in') { ?>readonly=""<?php } ?> /> </td>
-            <td> <input type="text"
-                        name="crosslistings[<?php echo $key; ?>][courseLetter]"
-                        value="<?php echo $crosslist->courseLetter; ?>"
-                        <?php if($crosslist->type == 'grad tie-in') { ?>readonly=""<?php } ?> /> </td>
-            <td class="hidden">
-                <input type="hidden"
-                       name="crosslistings[<?php echo $key; ?>][type]"
-                       value="<?php echo $crosslist->type; ?>" />
-            </td>
-            <td> <input type="checkbox"
-                        name="crosslistings[<?php echo $key; ?>][delete]"
-                        value="yes" /> </td>
-        </tr>
-        <?php } } ?>
-        <tr class="hidden_new_record">
-            <td> <input disabled="disabled" type="text" name="crosslistings[__key__][subject]" /> </td>
-            <td> <input disabled="disabled" type="text" name="crosslistings[__key__][courseNumber]" /> </td>
-            <td> <input disabled="disabled" type="text" name="crosslistings[__key__][courseLetter]" /> </td>
-            <td class="hidden"> <input disabled="disabled" type="hidden" name="crosslistings[__key__][type]" value="crosslisting" /> </td>
-            <td> <a href="#" class="remove_record_button">-</a> </td>
-        </tr>
-        <tr>
-            <td colspan="4">
-                <a href="#" class="add_record_button">Add Crosslisting</a>
-                <?php if(!$hasTieIn) { ?>
-                <a href="#"
-                   class="add_record_button"
-                   id="add_tie_in_button_<?php echo $this->course->subject
-                                                  . '_' . $this->course->courseNumber
-                                                  . '_' . $this->course->courseLetter; ?>"
-                >
-                    Add Graduate Tie-In
-                </a>
-                <?php } ?>
-            </td>
-        </tr>
-    </table>
-</fieldset>
-
 <h2>Credit (leave blank if not defined)</h2>
 <fieldset id="credits">
     <div>
@@ -203,40 +142,9 @@
     </table>
 </fieldset>
 
-<h2>Grading</h2>
-<fieldset class="three_column">
-    <label>
-        Unrestricted
-        <input type="radio"
-               class="radio"
-               name="gradingType"
-               value="unrestricted"
-               <?php if($this->course->gradingType == 'unrestricted') { ?>
-               checked="checked"
-               <?php } ?>
-               />
-    </label>
-
+<fieldset>
     <label>
-        Letter Grade Only
-        <input type="radio"
-               class="radio"
-               name="gradingType"
-               value="letter grade only"
-               <?php if($this->course->gradingType == 'letter grade only') { ?>
-               checked="checked"
-               <?php } ?>
-               />
-    </label>
-    <label>
-        Pass / No Pass Only
-        <input type="radio"
-               class="radio"
-               name="gradingType"
-               value="pass/no pass only"
-               <?php if($this->course->gradingType == 'pass/no pass only') { ?>
-               checked="checked"
-               <?php } ?>
-               />
+        <h2>Prerequisites (text)</h2>
+        <textarea name="prerequisite" class="mceEditor"><?php echo htmlspecialchars($this->course->prerequisite); ?></textarea>
     </label>
 </fieldset>
diff --git a/application/views/request/graduate_tie_in.xhtml b/application/views/request/graduate_tie_in.xhtml
index 48a1feed..873a6c77 100644
--- a/application/views/request/graduate_tie_in.xhtml
+++ b/application/views/request/graduate_tie_in.xhtml
@@ -11,7 +11,7 @@
     </label>
     <label>
         <h3>Notes</h3>
-        <textarea name="gradTieIn[notes]" class="mceEditor"><?php echo htmlspecialchars($this->course->gradTieIn->notes); ?></textarea>
+        <textarea id="grad_tie_in_notes_field" name="gradTieIn[notes]" class="mceEditor"><?php echo htmlspecialchars($this->course->gradTieIn->notes); ?></textarea>
     </label>
 </fieldset>
 
diff --git a/application/views/request/notes_description.xhtml b/application/views/request/notes_description.xhtml
index c58a9b13..df42d7e1 100644
--- a/application/views/request/notes_description.xhtml
+++ b/application/views/request/notes_description.xhtml
@@ -1,7 +1,7 @@
 <fieldset>
     <label>
         <h2>Notes (will appear in italics)</h2>
-        <textarea name="notes" class="mceEditor"><?php echo htmlspecialchars($this->course->notes); ?></textarea>
+        <textarea id="course_notes_field" name="notes" class="mceEditor"><?php echo htmlspecialchars($this->course->notes); ?></textarea>
     </label>
     <label>
         <h2>Description</h2>
diff --git a/application/views/request/time_location.xhtml b/application/views/request/time_location.xhtml
index 851b1bf3..7e5f3ca9 100644
--- a/application/views/request/time_location.xhtml
+++ b/application/views/request/time_location.xhtml
@@ -1,3 +1,41 @@
+<h2>Grading</h2>
+<fieldset class="three_column">
+    <label>
+        Unrestricted
+        <input type="radio"
+               class="radio"
+               name="gradingType"
+               value="unrestricted"
+               <?php if($this->course->gradingType == 'unrestricted') { ?>
+               checked="checked"
+               <?php } ?>
+               />
+    </label>
+
+    <label>
+        Letter Grade Only
+        <input type="radio"
+               class="radio"
+               name="gradingType"
+               value="letter grade only"
+               <?php if($this->course->gradingType == 'letter grade only') { ?>
+               checked="checked"
+               <?php } ?>
+               />
+    </label>
+    <label>
+        Pass / No Pass Only
+        <input type="radio"
+               class="radio"
+               name="gradingType"
+               value="pass/no pass only"
+               <?php if($this->course->gradingType == 'pass/no pass only') { ?>
+               checked="checked"
+               <?php } ?>
+               />
+    </label>
+</fieldset>
+
 <h2>Delivery Method(s)</h2>
 <fieldset class="three_column">
     <label>
diff --git a/document_root/css/request/course_id.css b/document_root/css/request/course_id.css
index 19b47dae..b3e6d26b 100644
--- a/document_root/css/request/course_id.css
+++ b/document_root/css/request/course_id.css
@@ -1,3 +1,8 @@
 #prev_button {
     display: none;
+}
+
+tr.grad_tie_in_row input {
+    color: #111;
+    background-color: #eee;
 }
\ No newline at end of file
diff --git a/document_root/css/request/credit_hours.css b/document_root/css/request/credit_hours.css
index 696c7da2..348e7f23 100644
--- a/document_root/css/request/credit_hours.css
+++ b/document_root/css/request/credit_hours.css
@@ -17,11 +17,6 @@ input#creditsSingleValues {
     width: 100px;
 }
 
-tr.grad_tie_in_row input {
-    color: #111;
-    background-color: #eee;
-}
-
 .hidden {
     display: none;
 }
\ No newline at end of file
diff --git a/document_root/css/request/edit_wrapper.css b/document_root/css/request/edit_wrapper.css
index 7cefeedf..7b873949 100644
--- a/document_root/css/request/edit_wrapper.css
+++ b/document_root/css/request/edit_wrapper.css
@@ -67,6 +67,10 @@ textarea {
     width: 100%;
 }
 
+fieldset.one_column input[type="text"] {
+    width: 100%;
+}
+
 fieldset.two_column label {
     width: 49%;
     float: left;
@@ -105,4 +109,8 @@ fieldset.three_column label input[type="text"] {
     position: absolute;
     top: 200px;
     left: -50px;
+}
+
+#grad_tie_in_notes_field, #course_notes_field {
+    height: 15em;
 }
\ No newline at end of file
-- 
GitLab