Changeset 352 for trunk/app/views/vclassrooms/admin_edit.ctp
- Timestamp:
- 03/28/08 10:03:54 (10 months ago)
- Files:
-
- 1 modified
-
trunk/app/views/vclassrooms/admin_edit.ctp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/views/vclassrooms/admin_edit.ctp
r307 r352 6 6 echo $html->getCrumbs(' / '); 7 7 8 echo $form->create('Vclassroom', array('action'=>'admin_edit', "onsubmit"=>"chkForm()"));8 echo $form->create('Vclassroom', array('onsubmit'=>'chkForm()')); 9 9 echo $form->hidden('Vclassroom.id'); 10 10 ?> 11 11 12 12 <fieldset> 13 <legend>New Group</legend> 14 <p> 15 <?php 16 echo $form->input('Vclassroom.name', array("size" => 40, "maxlength" => 60)); 17 echo $form->error('Vclassroom.name', 'A name is required.'); 18 ?> 19 </p><br /> 20 21 22 <?php 23 echo $form->label('Vclassroom.status', 'Status:'); 24 echo $form->checkbox('Vclassroom.status', array("value"=>1)); 25 ?> 26 <br /></p> 27 28 <?php 29 $attr = array("value"=>1, "onclick" => "showhide('invi_code')"); 13 <legend>Edit Group</legend> 14 <?php 15 echo $form->input('Vclassroom.name', array('size' => 40, 'maxlength' => 60)); 16 17 18 echo $form->label('Vclassroom.status', 'Status:'); 19 echo $form->checkbox('Vclassroom.status', array('value'=>1)); 20 21 $attr = array("value"=>1, "onclick" => "showhide('invi_code')"); 30 22 31 if ($this->data['Vclassroom']['access'] == 1)32 {23 if ($this->data['Vclassroom']['access'] == 1) 24 { 33 25 $display = 'block'; 34 $attr['checked'] = 'checked'; 35 } 36 else 37 { 38 $display = 'none'; 39 26 $attr['checked'] = 'checked'; 27 } 28 else 29 { 30 $display = 'none'; 40 31 41 } 42 ?> 43 32 } 44 33 45 <?php 46 echo $form->label('Vclassroom.access', 'Members only by invitation:'); 47 echo $form->checkbox('Vclassroom.access', $attr); 34 echo $form->label('Vclassroom.access', 'Members only by invitation:'); 35 echo $form->checkbox('Vclassroom.access', $attr); 48 36 ?> 49 37 <br /><br /> 50 38 51 52 53 39 <div id="invi_code" style="display:<?php echo $display; ?>;"> 54 40 <?php 55 echo $form->label('Vclassroom.secret', 'CODE:');56 echo $html->input('Vclassroom.secret', array("size" => 5, "maxlength" => 6));41 echo $form->label('Vclassroom.secret', 'CODE:'); 42 echo $form->input('Vclassroom.secret', array("size" => 5, "maxlength" => 6)); 57 43 ?> 58 <br /><br />59 44 </div> 60 45 <div style="clear:both"></div> … … 67 52 { 68 53 var Div = document.getElementById(a); 69 54 70 55 if (Div.style.display == "none") 71 56 {
