Changeset 340 for trunk/app/views/ecourses
- Timestamp:
- 03/24/08 18:37:16 (8 months ago)
- Location:
- trunk/app/views/ecourses
- Files:
-
- 3 modified
-
admin_add.ctp (modified) (3 diffs)
-
admin_edit.ctp (modified) (2 diffs)
-
admin_listing.ctp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/views/ecourses/admin_add.ctp
r301 r340 1 <?php echo $form->create('Ecourse', array(' action'=>'admin_add', 'onsubmit'=>'return chkForm()')); ?>1 <?php echo $form->create('Ecourse', array('onsubmit'=>'return chkForm()')); ?> 2 2 <fieldset> 3 3 <legend>New Course</legend> … … 11 11 12 12 echo $form->input('Ecourse.code', array("size" => 12, "maxlenght" => 12)) . ' max. 12 characters, ie.ROM2121'; 13 echo $form->error('Ecourse /code', 'A category description is required.');13 echo $form->error('Ecourse.code', 'A category description is required.'); 14 14 15 15 echo $form->label('Ecourse.subject_id', 'Subject:'); … … 27 27 <script type="text/javascript"> 28 28 /* <![CDATA[ */ 29 function mostrar(a)30 {31 var Div = document.getElementById(a);32 33 if (Div.style.display == "none")34 {35 Div.style.display = "block";36 }37 else38 {39 Div.style.display = "none";40 }41 }42 29 43 30 function chkForm() -
trunk/app/views/ecourses/admin_edit.ctp
r268 r340 1 1 <?php 2 echo $ html->formTag('/admin/ecourses/edit','post',array("onsubmit"=>"return chkForm();"));3 echo $ html->hidden('Ecourse/id');2 echo $form->create('Ecourse',array("onsubmit"=>"return chkForm();")); 3 echo $form->hidden('Ecourse.id'); 4 4 ?> 5 5 <fieldset> … … 7 7 <p>By default, your course is accessible to everybody. If you want some c0onfidentiality, the simplest way is to open registration during one week, ask the students to register themselves, then close registration and check for possible intruders in the user list.</p> 8 8 <?php 9 echo $form->labelTag('Ecourse/title', 'Title:'); 10 echo $html->input('Ecourse/title', array("size" => 30, "maxlength" => 90)) . ' e.g. History of Literature'; 11 echo $html->tagErrorMsg('Ecourse/title', 'A FAQ title is required.'); 12 13 echo $form->labelTag('Ecourse/description', 'Description:'); 14 echo $html->textarea('Ecourse/description', array("cols" => 40, "rows" =>4)); 15 16 17 echo $form->labelTag('Ecourse/code', 'Code:' ); 18 echo $html->input('Ecourse/code', array("size" => 12, "maxlenght" => 12)) . ' max. 12 characters, ie.ROM2121'; 19 echo $html->tagErrorMsg('Ecourse/code', 'A category description is required.'); 9 echo $form->input('Ecourse.title', array("size" => 30, "maxlength" => 90)) . ' e.g. History of Literature'; 10 echo $form->error('Ecourse.title', 'A FAQ title is required.'); 11 12 echo $form->label('Ecourse.description', 'Description:'); 13 echo $form->textarea('Ecourse.description', array("cols" => 40, "rows" =>4)); 14 15 16 echo $form->input('Ecourse.code', array("size" => 12, "maxlenght" => 12)) . ' max. 12 characters, ie.ROM2121'; 17 echo $form->error('Ecourse.code', 'A category description is required.'); 20 18 ?> 21 19 <br /><br /> 22 20 <?php 23 echo $form->label Tag('Ecourse/subject_id', 'Subject:');24 echo $ html->selectTag('Ecourse/subject_id', $subjects, null, null, null, false);21 echo $form->label('Ecourse.subject_id', 'Subject:'); 22 echo $form->select('Ecourse.subject_id', $subjects, null, null, null, false); 25 23 26 echo $form->label Tag('Ecourse/lang_id', 'Lang:');27 echo $ html->selectTag('Ecourse/lang_id', $langs, null, null, null, false);24 echo $form->label('Ecourse.lang_id', 'Lang:'); 25 echo $form->select('Ecourse.lang_id', $langs, null, null, null, false); 28 26 ?> 29 27 <div style="clear:both"></div> 30 <?php echo $form->label Tag('Ecourse/status', 'Activate:' );?><br />31 <?php echo $ html->checkbox('Ecourse/status', null, array("value"=>1)); ?><br />28 <?php echo $form->label('Ecourse.status', 'Activate:' );?><br /> 29 <?php echo $form->checkbox('Ecourse.status', null, array("value"=>1)); ?><br /> 32 30 <br /><br /> 33 <?php echo $form->labelTag('Ecourse/access', 'Restricted access:' );?><br />34 <?php echo $html->checkbox('Ecourse/access', null, array("value"=>1, "onclick" => "mostrar('invi_code')")); ?><br />35 36 <div id="invi_code" style="display:none;">37 <?php38 echo $form->labelTag('Ecourse/secret', 'Secret:' );39 echo $html->input('Ecourse/secret', array("size" => 6, "maxlength" => 6)) . 'The code to allow students register by themselves';40 ?>41 </div>42 31 43 32 <div style="clear:both"></div> 44 33 <br /> 45 <?php echo $ html->submit('Save') ?>34 <?php echo $form->submit('Save') ?> 46 35 </fieldset> 47 36 </form> 48 37 <script type="text/javascript"> 49 38 /* <![CDATA[ */ 50 function mostrar(a)51 {52 var Div = document.getElementById(a);53 54 if (Div.style.display == "none")55 {56 Div.style.display = "block";57 }58 else59 {60 Div.style.display = "none";61 }62 }63 64 39 function chkForm() 65 40 { -
trunk/app/views/ecourses/admin_listing.ctp
r301 r340 23 23 echo $html->link($val['Ecourse']['title'], '/admin/ecourses/vclassrooms/'.$val['Ecourse']['id']); 24 24 echo '<p>' . $val['Ecourse']['description'] . '</p>'; 25 echo '<p style="margin-left:15px;">Code:'. $val['Ecourse']['code'] . '</p>';26 25 echo '<div class="butonright">'. $gags->confirmDel($val['Ecourse']['id'], 'ecourses') .'</div>'; 27 26 echo '</div>';
