Closed (fixed)
Project:
TMGMT Translator Gengo
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
3 Dec 2012 at 17:13 UTC
Updated:
3 Jan 2013 at 19:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
miro_dietikerThis bug is not from the OHT module.
It seems, the mygengo module adds this button without checking if it is owning the job.
We need to fix this.
Comment #2
berdirHm, is it adding that poll button through hook_form_alter()? It should probably use checkoutInfo() for that, then TMGMT itself makes sure that it's only called for it's own jobs.
Comment #3
miro_dietikerYes. We're lacking at least conditions here...
Note in the current status it is quite common that people have multiple translators enabled. This leads to severe user issues.
Both need at least to check if a translator is assigned to the gengo plugin.
Comment #4
blueminds commentedFixed.
I kept the form alter solution as it is not possible to add action button via checkoutInfo() to the others. I think it would be just fine to have that button in the checkoutInfo() form, for now I kept it where it was before... we might change it in the future.
Comment #5
berdirFixed or needs review*? ;)
I'm positive that it is possible add form buttons via checkoutInfo() :) See http://drupalcode.org/project/tmgmt_nativy.git/blob/refs/heads/7.x-1.x:/...
* I'd prefer needs review with a patch instead of just commiting, at least in issues where we can actually expect that someone tests it :)
Comment #6
miro_dietikerOK, needs work then.
Comment #7
blueminds commentedSure it is possible to add form buttons, they just cannot be placed by the form actions buttons (save...). See attached patch. BTW, I like it this way more as well.
Comment #8
blueminds commentedComment #9
berdirYes, I like that much better :)
Also, we need to get those tests working again ;)
Have a look at http://drupal.org/node/698932, that should allow us to add a rules dependency. Note that it might not get picked up unless we do a new release, but we can do that once the currently open bugs are fixed.
There's no need to make the submit callback private function with a _ prefix. But looks good to me other than that.
Comment #10
bforchhammer commentedCool, I haven't tested it yet, but this looks a lot cleaner :-)
Separate issue, but I think the javascript code could actually be replaced by using the states api on the respective FAPI fields.
Comment #11
miro_dietikerHaha, looking forward to that separate issue then. :-)
Comment #12
blueminds commentedPushed.