From: Fredrik J. <jer...@us...> - 2004-09-30 22:47:20
|
Update of /cvsroot/squirrelmail/squirrelmail/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13898/src Modified Files: addressbook.php Log Message: If we use forms.php in STABLE we might as well try it in DEVEL Index: addressbook.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/src/addressbook.php,v retrieving revision 1.80 retrieving revision 1.81 diff -u -w -r1.80 -r1.81 --- addressbook.php 15 Aug 2004 23:18:29 -0000 1.80 +++ addressbook.php 30 Sep 2004 22:47:10 -0000 1.81 @@ -76,8 +76,7 @@ function address_form($name, $submittext, $values = array()) { global $color, $squirrelmail_language; - if ($squirrelmail_language == 'ja_JP') - { + if ($squirrelmail_language == 'ja_JP') { echo html_tag( 'table', addressbook_inp_field(_("Nickname"), 'nickname', $name, 15, $values, ' <small>' . _("Must be unique") . '</small>') . @@ -88,8 +87,7 @@ list_writable_backends($name) . html_tag( 'tr', html_tag( 'td', - '<input type="submit" name="' . htmlentities($name) . '[SUBMIT]" value="' . - $submittext . '" />', + addSubmit($submittext, $name.'[SUBMIT]'), 'center', $color[4], 'colspan="2"') ) , 'center', '', 'border="0" cellpadding="1" width="90%"') ."\n"; @@ -104,8 +102,7 @@ list_writable_backends($name) . html_tag( 'tr', html_tag( 'td', - '<input type="submit" name="' . htmlentities($name) . '[SUBMIT]" value="' . - $submittext . '" />', + addSubmit($submittext, $name.'[SUBMIT]') , 'center', $color[4], 'colspan="2"') ) , 'center', '', 'border="0" cellpadding="1" width="90%"') ."\n"; @@ -248,8 +245,7 @@ $olddata = $abook->lookup($enick, $ebackend); /* Display the "new address" form */ - echo '<form action="' . $form_url . '" method="post">' . - "\n" . + echo addForm($form_url, 'post'). html_tag( 'table', html_tag( 'tr', html_tag( 'td', @@ -283,8 +279,7 @@ 'center', '', 'width="100%"' ); /* Display the "new address" form again */ - echo '<form action="' . $form_url . - '" method="post">' . "\n" . + echo addForm($form_url, 'post'). html_tag( 'table', html_tag( 'tr', html_tag( 'td', @@ -354,7 +349,7 @@ /* List addresses */ if (count($alist) > 0) { - echo '<form action="' . $form_url . '" method="post">' . "\n"; + echo addForm($form_url, 'post'); while(list($undef,$row) = each($alist)) { /* New table header for each backend */ @@ -363,10 +358,8 @@ echo html_tag( 'table', html_tag( 'tr', html_tag( 'td', - '<input type="submit" name="editaddr" value="' . - _("Edit selected") . "\" />\n" . - '<input type="submit" name="deladdr" value="' . - _("Delete selected") . "\" />\n", + addSubmit(_("Edit selected"), 'editaddr'). + addSubmit(_("Delete selected"), 'deladdr'), 'center', '', 'colspan="5"' ) ) . html_tag( 'tr', @@ -419,8 +412,7 @@ } else { $tr_bgcolor = $color[4]; } - if ($squirrelmail_language == 'ja_JP') - { + if ($squirrelmail_language == 'ja_JP') { echo html_tag( 'tr', '', '', $tr_bgcolor); if ($abook->backends[$row['backend']]->writeable) { echo html_tag( 'td', @@ -441,8 +433,8 @@ if ($abook->backends[$row['backend']]->writeable) { echo html_tag( 'td', '<small>' . - '<input type="checkbox" ' . $selected . ' name="sel[]" value="' . - $row['backend'] . ':' . $row['nickname'] . '" /></small>' , + addCheckBox('sel[]', $selected, $row['backend'] . ':' . $row['nickname']). + '</small>' , 'center', '', 'valign="top" width="1%"' ); } else { echo html_tag( 'td', @@ -469,10 +461,8 @@ echo html_tag( 'table', html_tag( 'tr', html_tag( 'td', - '<input type="submit" name="editaddr" value="' . _("Edit selected") . - "\" />\n" . - '<input type="submit" name="deladdr" value="' . _("Delete selected") . - "\" />\n", + addSubmit(_("Edit selected"), 'editaddr') . + addSubmit(_("Delete selected"), 'deladdr'), 'center', '', 'colspan="5"' ) ), 'center' ); @@ -484,7 +474,7 @@ /* Display the "new address" form */ echo '<a name="AddAddress"></a>' . "\n" . - '<form action="' . $form_url . '" name="f_add" method="post">' . "\n" . + addForm($form_url, 'post', 'f_add'). html_tag( 'table', html_tag( 'tr', html_tag( 'td', "\n". '<strong>' . _("Add to address book") . '</strong>' . "\n", |