$db->debug=false;
// OK so far, now update the modules record
set_config($moduleversion, $module->version);
- notify(get_string('modulesuccess', '', $module->name), 'green');
+ notify(get_string('modulesuccess', '', $module->name), 'notifysuccess');
echo '<hr />';
} else {
$db->debug=false;
if (! update_record('modules', $module)) {
error('Could not update '. $module->name .' record in modules table!');
}
- notify(get_string('modulesuccess', '', $module->name), 'green');
+ notify(get_string('modulesuccess', '', $module->name), 'notifysuccess');
echo '<hr />';
} else {
$db->debug=false;
if (modify_database($fullmod .'/db/'. $CFG->dbtype .'.sql')) {
$db->debug = false;
if ($module->id = insert_record('modules', $module)) {
- notify(get_string('modulesuccess', '', $module->name), 'green');
+ notify(get_string('modulesuccess', '', $module->name), 'notifysuccess');
echo '<hr />';
} else {
error($module->name .' module could not be added to the module list!');
$link = $_SERVER['HTTP_REFERER'];
}
- print_heading('<a target="'. $CFG->framename .'" href="'. $link .'">'. get_string('continue').'</a>');
+ echo '<div class="continuebutton">';
+ print_single_button($link, NULL, get_string('continue'), 'post', $CFG->framename);
+ echo '</div>'."\n";
}
/**
echo '<br />';
print_simple_box($message, 'center', '50%', '', '20', 'noticebox');
- print_heading('<a href="'. $link .'">'. get_string('continue') .'</a>');
+ print_continue($link);
print_footer(get_site());
die;
}
*/
function notice_yesno ($message, $linkyes, $linkno) {
+ global $CFG;
+
$message = clean_text($message);
$linkyes = clean_text($linkyes);
$linkno = clean_text($linkno);
- print_simple_box_start('center', '60%');
- echo '<p align="center"><font size="3">'. $message .'</font></p>';
- echo '<p align="center"><font size="3"><strong>';
- echo '<a href="'. $linkyes .'">'. get_string('yes') .'</a>';
- echo ' ';
- echo '<a href="'. $linkno .'">'. get_string('no') .'</a>';
- echo '</strong></font></p>';
+ print_simple_box_start('center', '60%', '', 5, 'noticebox', 'notice');
+ echo '<p align="center">'. $message .'</p>';
+ echo '<table align="center" cellpadding="20"><tr><td>';
+ print_single_button($linkyes, NULL, get_string('yes'), 'post', $CFG->framename);
+ echo '</td><td>';
+ print_single_button($linkno, NULL, get_string('no'), 'post', $CFG->framename);
+ echo '</td></tr></table>';
print_simple_box_end();
}
* Print a bold message in an optional color.
*
* @param string $message The message to print out
- * @param string $color Optional color to display message text in
- * @param string $align Paragraph alignment option
+ * @param string $style Optional style to display message text in
+ * @param string $align Alignment option
*/
-function notify ($message, $color='red', $align='center') {
+function notify ($message, $style='notifyproblem', $align='center') {
+
+ if ($style == 'green') {
+ $style = 'notifysuccess'; // backward compatible with old color system
+ }
$message = clean_text($message);
- echo '<p align="'. $align .'"><strong><font color="'. $color .'">'. $message .'</font></strong></p>' . "\n";
+ echo '<div class="'.$style.'" align="'. $align .'">'. $message .'</div>' . "\n";
}