Alexander Nicolaysen Sørnes : objectManager: Make it possible to add more than one common when processing items
Alexander Nicolaysen Sørnes
asornes at winehq.org
Sat Apr 23 09:40:48 CDT 2011
Module: appdb
Branch: master
Commit: 1812b4778d847493582ee2071ea00327672dae3c
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=1812b4778d847493582ee2071ea00327672dae3c
Author: Alexander Nicolaysen Sørnes <alexsornes at gmail.com>
Date: Sat Apr 23 16:40:04 2011 +0200
objectManager: Make it possible to add more than one common when processing items
---
include/objectManager.php | 25 +++----------------------
1 files changed, 3 insertions(+), 22 deletions(-)
diff --git a/include/objectManager.php b/include/objectManager.php
index 82d1a26..864845e 100644
--- a/include/objectManager.php
+++ b/include/objectManager.php
@@ -460,19 +460,14 @@ class ObjectManager
/////////////////////////////////////////////////
// output radio buttons for some common responses
echo '<tr valign=top><td class="color0"></td><td class="color0">'.
- '<b>Common replies</b><br> Email <a href="mailto:'.APPDB_OWNER_EMAIL.'">'.
+ '<b>Common replies</b><br> Clicking on a reply will copy it to the E-mail text field.<br> '.
+ 'Email <a href="mailto:'.APPDB_OWNER_EMAIL.'">'.
APPDB_OWNER_EMAIL.'</a> if you want to suggest a new common reply.</td></tr>',"\n";
- // NOTE: We use the label tag so the user can click anywhere in
- // the text of the radio button to select the radio button.
- // Otherwise the user has to click on the very small circle portion
- // of the button to select it
foreach($this->aCommonResponses as $iIndex => $sReply)
{
echo '<tr valign=top><td class="color0"></td>',"\n";
- echo '<td class="color0"><label for="'.$iIndex.'"><input'.
- ' type="radio" name="sOMCommonReply" id="'.$iIndex.'" value="'.$sReply.'">'.
- $sReply.'</label></td>',"\n";
+ echo '<td class="color0"><a onClick="document.forms[\'sQform\'][\'sReplyText\'].innerHTML += \''.$sReply.' \';">'.$sReply.'</a></td>',"\n";
echo '</tr>',"\n";
}
// end output radio buttons for common responses
@@ -1401,12 +1396,6 @@ class ObjectManager
/* Process form data generated by adding or updating an entry */
public function processForm($aClean)
{
- // FIXME: hack so if we modify $aClean in here any objects that use the global
- // $aClean will see the modified value. Should be replaced when we have
- // general purpose objectManager email code in place since the sReplyText value
- // is the value we modify and we'll be passing that into methods in the future
- global $aClean;
-
if(!isset($aClean['sSubmit']))
return;
@@ -1436,14 +1425,6 @@ class ObjectManager
$aClean['sReplyText'] = "";
}
- // handle the common response radio button value
- // if sReplyText is empty, if sOMCommonReply was set because
- // the user selected a radio button then use that text instead
- if( isset($aClean['sReplyText']) && $aClean['sReplyText'] == "" && isset($aClean['sOMCommonReply']))
- {
- $aClean['sReplyText'] = $aClean['sOMCommonReply'];
- }
-
$oObject->getOutputEditorValues($aClean);
/* Check input, if necessary */
More information about the wine-cvs
mailing list