Skip to content
Snippets Groups Projects
Commit ebd68170 authored by Tim Steiner's avatar Tim Steiner
Browse files

Rearranged fields on Edit pages

parent 9d2212eb
No related branches found
Tags
No related merge requests found
<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>
<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>
......@@ -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>
......
<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>
......
<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>
......
#prev_button {
display: none;
}
tr.grad_tie_in_row input {
color: #111;
background-color: #eee;
}
\ No newline at end of file
......@@ -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
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment