From: pdontthink Date: Tue, 6 Feb 2007 09:18:41 +0000 (+0000) Subject: Use templates to build buttons. Remove all this document.write crap - that's what... X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=c40a269e45d1bed7b867e20b0239cc9f4f71bc34 Use templates to build buttons. Remove all this document.write crap - that's what checkForJavascript() is there for. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12230 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/compose.php b/src/compose.php index 389ccd83..8b2f6e50 100644 --- a/src/compose.php +++ b/src/compose.php @@ -1333,18 +1333,10 @@ function showComposeButtonRow() { $mdn_user_support=getPref($data_dir, $username, 'mdn_user_support',$default_use_mdn); - if ($use_javascript_addr_book) { -//FIXME: do not construct HTML in core! - $addr_book = " \n"; + if ($use_javascript_addr_book && checkForJavascript()) { + $addr_book = addButton(_("Addresses"), null, array('onclick' => 'javascript:open_abook();')); } else { - $addr_book = ' ' . "\n"; + $addr_book = addSubmit(_("Addresses"), 'html_addr_search'); } $oTemplate->assign('allow_priority', $default_use_priority==1);