|
|
|
@ -60,20 +60,16 @@ class HotSpot extends Question { |
|
|
|
|
$renderer = $form->defaultRenderer(); |
|
|
|
|
$form->addElement('html', '<div class="row"><div class="label"></div><div class="formw">'.get_lang('UploadJpgPicture').'</div></div>'); |
|
|
|
|
$form->addElement('file','imageUpload','<span class="form_required">*</span><img src="../img/hotspots.png" />'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// setting the save button here and not in the question class.php |
|
|
|
|
$form->addElement('style_submit_button','submitQuestion',$text, 'class="'.$class.'"'); |
|
|
|
|
$form->addElement('style_submit_button','submitQuestion',get_lang('GoToQuestion'), 'class="'.$class.'"'); |
|
|
|
|
|
|
|
|
|
$renderer->setElementTemplate('<div class="row"><div class="label" style="margin-top:-30px;">{label}</div><div class="formw" >{element}</div></div>','imageUpload'); |
|
|
|
|
$form->addRule('imageUpload', get_lang('OnlyImagesAllowed'), 'filetype', array ('jpg', 'jpeg', 'png', 'gif')); |
|
|
|
|
$form->addRule('imageUpload', get_lang('NoImage'), 'uploadedfile'); |
|
|
|
|
} else { |
|
|
|
|
// setting the save button here and not in the question class.php |
|
|
|
|
$form->addElement('style_submit_button','submitQuestion',$text, 'class="'.$class.'"'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$form->addElement('style_submit_button','submitQuestion',$text, 'class="'.$class.'"'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|