Browse Source

[svn r20603] Fixing the tag button bug of ie6 in the Quiz tool see FS#4174

Julio Montoya 16 years ago
parent
commit
9a3dac14c0

+ 16 - 1
main/exercice/hotspot_admin.inc.php

@@ -262,13 +262,28 @@ if($modifyAnswers)
 
 <form method="post" action="<?php echo api_get_self(); ?>?hotspotadmin=<?php echo $modifyAnswers; ?>" name="frm_exercise">
 <table border="0" cellpadding="0" cellspacing="2" width="100%">
-
 	<tr>
 		<td colspan="2" valign="bottom">
+		<?php
+			$navigator_info = api_get_navigator();
+			//ie6 fix
+			if ($navigator_info['name']=='Internet Explorer' &&  $navigator_info['version']=='6') {
+		?>
+			<input type="submit" class="minus" name="lessAnswers" value="<?php echo get_lang('LessHotspots'); ?>" >
+			<input type="submit" class="plus" name="moreAnswers" value="<?php echo get_lang('MoreHotspots'); ?>" />
+			<input type="submit" class="cancel" name="cancelAnswers" value="<?php echo get_lang('Cancel'); ?>" onclick="javascript:if(!confirm('<?php echo addslashes(htmlentities(get_lang('ConfirmYourChoice'))); ?>')) return false;" >
+			<input type="submit" class="save" name="submitAnswers" value="<?php echo get_lang('Ok'); ?>" />			 
+		<?php
+			} else {				
+		?>
 			<button type="submit" class="minus" name="lessAnswers" value="<?php echo get_lang('LessHotspots'); ?>" ><?php echo get_lang('LessHotspots'); ?></button>
 			<button type="submit" class="plus" name="moreAnswers" value="<?php echo get_lang('MoreHotspots'); ?>" /><?php echo get_lang('langMoreHotspotsImage'); ?></button>
 			<button type="submit" class="cancel" name="cancelAnswers" value="<?php echo get_lang('Cancel'); ?>" onclick="javascript:if(!confirm('<?php echo addslashes(htmlentities(get_lang('ConfirmYourChoice'))); ?>')) return false;" ><?php echo get_lang('Cancel'); ?></button>
 			<button type="submit" class="save" name="submitAnswers" value="<?php echo get_lang('Ok'); ?>" /><?php echo get_lang('AddQuestionToExercise'); ?></button>
+		<?php
+			}
+		?>
+		
 		</td>
 	</tr>
 	<tr>

+ 14 - 6
main/exercice/multiple_answer.class.php

@@ -150,12 +150,20 @@ class MultipleAnswer extends Question {
 		
 		$form -> add_multiple_required_rule ($boxes_names , get_lang('ChooseAtLeastOneCheckbox') , 'multiple_required');
 
-		$form->addElement('style_submit_button', 'lessAnswers', get_lang('LessAnswer'),'class="minus"');
-		$form->addElement('style_submit_button', 'moreAnswers', get_lang('PlusAnswer'),'class="plus"');
-		
-		global $text, $class;
-		// setting the save button here and not in the question class.php
-		$form->addElement('style_submit_button','submitQuestion',$text, 'class="'.$class.'"');
+
+		$navigator_info = api_get_navigator();
+		global $text, $class;	
+		//ie6 fix			
+		if ($navigator_info['name']=='Internet Explorer' &&  $navigator_info['version']=='6') {
+			$form->addElement('submit', 'lessAnswers', get_lang('LessAnswer'),'class="minus"');
+			$form->addElement('submit', 'moreAnswers', get_lang('PlusAnswer'),'class="plus"');
+			$form->addElement('submit','submitQuestion',$text, 'class="'.$class.'"');			
+		} else {
+			$form->addElement('style_submit_button', 'lessAnswers', get_lang('LessAnswer'),'class="minus"');
+			$form->addElement('style_submit_button', 'moreAnswers', get_lang('PlusAnswer'),'class="plus"');
+			// setting the save button here and not in the question class.php
+			$form->addElement('style_submit_button','submitQuestion',$text, 'class="'.$class.'"');
+		}
 		
 		$renderer->setElementTemplate('{element}&nbsp;','lessAnswers');
 		$renderer->setElementTemplate('{element}&nbsp;','submitQuestion');

+ 14 - 9
main/exercice/unique_answer.class.php

@@ -257,15 +257,20 @@ class UniqueAnswer extends Question {
 		
 		$form -> addElement ('html', '</table>');
 		$form -> addElement ('html', '<br />');
-
-		$form->addElement('style_submit_button', 'lessAnswers', get_lang('LessAnswer'),'class="minus"');
-		$form->addElement('style_submit_button', 'moreAnswers', get_lang('PlusAnswer'),'class="plus"');
-		
-		global $text, $class;
-		// setting the save button here and not in the question class.php
-		$form->addElement('style_submit_button','submitQuestion',$text, 'class="'.$class.'"');
-		
-		
+		$navigator_info = api_get_navigator();
+		global $text, $class;				
+		//ie6 fix
+		if ($navigator_info['name']=='Internet Explorer' &&  $navigator_info['version']=='6') {
+			$form->addElement('submit', 'lessAnswers', get_lang('LessAnswer'),'class="minus"');
+			$form->addElement('submit', 'moreAnswers', get_lang('PlusAnswer'),'class="plus"');
+			$form->addElement('submit','submitQuestion',$text, 'class="'.$class.'"');
+		} else {
+			$form->addElement('style_submit_button', 'lessAnswers', get_lang('LessAnswer'),'class="minus"');
+			$form->addElement('style_submit_button', 'moreAnswers', get_lang('PlusAnswer'),'class="plus"');
+			// setting the save button here and not in the question class.php
+			$form->addElement('style_submit_button','submitQuestion',$text, 'class="'.$class.'"');	
+		}
+				
 		$renderer->setElementTemplate('{element}','submitQuestion');
 		$renderer->setElementTemplate('{element}&nbsp;','lessAnswers');
 		$renderer->setElementTemplate('{element}','moreAnswers');