CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Multiple Choice Options
Pages: [1]

Author Topic: Multiple Choice Options  (Read 2466 times)

Parvez

  • I post occasionally
  • **
  • Posts: 91
  • Karma: 7
Multiple Choice Options
March 06, 2010, 01:44:37 pm
Hi All

I think there is a bug with the user interface, similar to what I reported before with the help text being mult lang.

When you go into a option value to edit its description, you dont get the ability to add mult lang values in the "option label" field. I've checked on the table behind the scenes, civicrm_option_value, and the table does hold the relevant columns so it should be possible.

Would it be possible to get a patch for this like the last time?

Thanks

Parvez

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Multiple Choice Options
March 08, 2010, 04:46:32 am
Quote from: Parvez on March 06, 2010, 01:44:37 pm
When you go into a option value to edit its description, you dont get the ability to add mult lang values in the "option label" field.

I’m not 100% sure whether you mean the label or the description, but on a hunch – can you try the attached patch and let me know whether this is what you’re after?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Multiple Choice Options
March 08, 2010, 04:47:55 am
(In general, we refrain from adding the language selector to textarea fields, as the popup cannot usually update the form underneath if there’s a WYSIWYG editor – and upon save the current language’s value of the textarea is cleared…)
« Last Edit: May 26, 2010, 02:32:54 am by Piotr Szotkowski »
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Parvez

  • I post occasionally
  • **
  • Posts: 91
  • Karma: 7
Re: Multiple Choice Options
March 08, 2010, 06:06:31 am
Thanks Piotr, Will try it later today and let you know.

Hope your keeping well by the way and look forward to seeing you in Oxford at the end of the month!

Parvez

  • I post occasionally
  • **
  • Posts: 91
  • Karma: 7
Re: Multiple Choice Options
March 15, 2010, 11:43:43 am
Hi Piotr

This isn't quite what I expected, the .tpl file which I want to change is

Code: [Select]
CRM/Custom/Form/Option.tpl

So, taking on board your patch, I've tried this but I cant seem to work out how to get the $id to populate correctly.

Code: [Select]
<dt>{$form.label.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_option_value' field='label' id=$id}{/if}</dt><dd>&nbsp;{$form.label.html}</dd>

Could you have a look?

Thanks

Parvez

Parvez

  • I post occasionally
  • **
  • Posts: 91
  • Karma: 7
Re: Multiple Choice Options
March 16, 2010, 10:30:38 am
Hi

Managed to fix it in the end, added the assignment of the id to CRM_Custom_Page_Option

Inside the run method

Code: [Select]
        // MTL Fix
        // We need the id of the object being edited so that we can create the link for multi langugaes on the form template
        if ($id) {
            $this->assign('id', $id);
        }
        // END Mtl Fix

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Multiple Choice Options
March 19, 2010, 12:56:47 pm
Hi, apologies for late reply.

Can you try using $fid in the template (instead of adding the assign() code to the PHP file) and let me know whether it still works for you?
« Last Edit: May 26, 2010, 02:31:39 am by Piotr Szotkowski »
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Multiple Choice Options

This forum was archived on 2017-11-26.