Skip to content

Display on label depends on integration in QRcode #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
CoralieXXC opened this issue Mar 27, 2023 · 0 comments
Open

Display on label depends on integration in QRcode #122

CoralieXXC opened this issue Mar 27, 2023 · 0 comments

Comments

@CoralieXXC
Copy link

Hello,

I have been using the barcode plugin and it is great!

I have noticed that, in the form, I need to both select "Yes" for a field and "Yes" for the display of the same field in order to be able to display it. Only selecting "Yes" for the display doesn't work.
Is it an intended behaviour?

If it is not the intended behaviour, I think in qrcode.class.php, the code should be:

      if ($data['name']) {
         if ($item->fields['name'] != '') {
            $have_content = true;
         }
         $a_content[] = __('Item Name').' = '.$item->fields['name'];
      }
      if ($data['displayname']) {
         $label = '';
         if ($data['displaylabels']) {
            $label = __('Item Name').': ';
         }
         $b_content[] = $label.$item->fields['name'];
      }

instead of:

      if ($data['name']) {
         if ($item->fields['name'] != '') {
            $have_content = true;
         }
         $a_content[] = __('Item Name').' = '.$item->fields['name'];
         if ($data['displayname']) {
            $label = '';
            if ($data['displaylabels']) {
               $label = __('Item Name').': ';
            }
            $b_content[] = $label.$item->fields['name'];
         }
      }

Any idea about this?

Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant