add info() function. Works like notice() but show messages in a div with class info-message.

update code to use info() instead of notice() when appropriate (non-error message)
add info-message class style in themes
This commit is contained in:
Fabio Comuni 2011-05-23 11:39:57 +02:00
parent 3ea145fae7
commit e1107b55c6
33 changed files with 123 additions and 75 deletions

View file

@ -51,7 +51,7 @@ function settings_post(&$a) {
intval(local_user())
);
if($r)
notice( t('Password changed.') . EOL);
info( t('Password changed.') . EOL);
else
notice( t('Password update failed. Please try again.') . EOL);
}
@ -203,7 +203,7 @@ function settings_post(&$a) {
intval(local_user())
);
if($r)
notice( t('Settings updated.') . EOL);
info( t('Settings updated.') . EOL);
$r = q("UPDATE `profile`
SET `publish` = %d, `net-publish` = %d
@ -374,7 +374,7 @@ function settings_content(&$a) {
? true : false);
if($invisible)
notice( t('Profile is <strong>not published</strong>.') . EOL );
info( t('Profile is <strong>not published</strong>.') . EOL );
$theme_selector = '<select name="theme" id="theme-select" >';
@ -485,7 +485,7 @@ function settings_content(&$a) {
'$imap_replyto' => $mail_replyto,
'$lbl_imap7' => t('Send public posts to all email contacts:'),
'$pubmail_checked' => (($mail_pubmail) ? ' checked="checked" ' : ''),
'$mail_disabled' => (($mail_disabled) ? '<div class="error-message">' . t('Email access is disabled on this site.') . '</div>' : ''),
'$mail_disabled' => (($mail_disabled) ? '<div class="info-message">' . t('Email access is disabled on this site.') . '</div>' : ''),
'$imap_disabled' => $imap_disabled
));