Show
Ignore:
Timestamp:
03/24/08 18:37:16 (10 months ago)
Author:
aarkerio
Message:

Webquest imprvements

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/ecourses/admin_edit.ctp

    r268 r340  
    11<?php  
    2 echo $html->formTag('/admin/ecourses/edit','post', array("onsubmit"=>"return chkForm();"));  
    3 echo $html->hidden('Ecourse/id'); 
     2echo $form->create('Ecourse',array("onsubmit"=>"return chkForm();"));  
     3echo $form->hidden('Ecourse.id'); 
    44?> 
    55<fieldset> 
     
    77<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> 
    88  <?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.'); 
    2018  ?> 
    2119  <br /><br /> 
    2220<?php 
    23     echo $form->labelTag('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); 
    2523 
    26     echo $form->labelTag('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); 
    2826?> 
    2927  <div style="clear:both"></div> 
    30   <?php echo $form->labelTag('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 /> 
    3230  <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 <?php 
    38     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> 
    4231 
    4332  <div style="clear:both"></div> 
    4433  <br /> 
    45   <?php echo $html->submit('Save') ?> 
     34  <?php echo $form->submit('Save') ?> 
    4635</fieldset> 
    4736</form> 
    4837<script type="text/javascript"> 
    4938/* <![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    else 
    59    {  
    60            Div.style.display = "none"; 
    61     } 
    62  } 
    63  
    6439function chkForm() 
    6540{