]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed up hardcoded tables with notice_yesno
authormoodler <moodler>
Wed, 22 Mar 2006 09:43:10 +0000 (09:43 +0000)
committermoodler <moodler>
Wed, 22 Mar 2006 09:43:10 +0000 (09:43 +0000)
mod/data/fields.php

index fdf530e17633641c381c7969a8deeac0c23fc40a..c9c63675e463bbe3b32f06f555d33372ec748676 100755 (executable)
                     // Print confirmation message.
                     $field = data_get_field_from_id($fid, $data);
 
-                    print_simple_box_start('center', '60%');
-                    echo '<div align="center">';
-                    echo '<form action = "fields.php?d='.$data->id.'&amp;mode=delete&amp;fid='.$fid.'" method="post">';
-                    echo '<input name="sesskey" value="'.sesskey().'" type="hidden" />';
-                    echo '<input name="confirm" value="1" type="hidden" />';
-                    echo '<strong>'.$field->field->name.'</strong> - '.get_string('confirmdeletefield','data');
-                    echo '<p>';
-                    echo '<input type="submit" value="'.get_string('ok').'" /> ';
-                    echo '<input type="button" value="'.get_string('cancel').'" onclick="javascript:history.go(-1);" />';
-                    echo '<p>';
-                    echo '</form>';
-                    echo '</div>';
-                    print_simple_box_end();
-                    echo '</td></tr></table>';
+                    notice_yesno('<strong>'.$field->name().': '.$field->field->name.'</strong><br /><br />'. get_string('confirmdeletefield','data'), 
+                                 'fields.php?d='.$data->id.'&amp;mode=delete&amp;fid='.$fid.'&amp;sesskey='.sesskey().'&amp;confirm=1',
+                                 'fields.php?d='.$data->id);
+
                     print_footer($course);
                     exit;
                 }