Skip to content

Commit

Permalink
Fix translation of help tooltip on fields for modulebuilder.
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Apr 8, 2019
1 parent 2174e70 commit 1b415a6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
6 changes: 2 additions & 4 deletions htdocs/core/tpl/commonfields_add.tpl.php
Expand Up @@ -49,10 +49,8 @@
if ($val['type'] == 'text' || $val['type'] == 'html') print ' tdtop';
print '"';
print '>';
print $langs->trans($val['label']);
if(!empty($val['help'])){
print $form->textwithpicto('', $langs->trans($val['help']));
}
if (! empty($val['help'])) print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help']));
else print $langs->trans($val['label']);
print '</td>';
print '<td>';
if (in_array($val['type'], array('int', 'integer'))) $value = GETPOST($key, 'int');
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/tpl/commonfields_edit.tpl.php
Expand Up @@ -47,7 +47,7 @@
if ($val['notnull'] > 0) print ' fieldrequired';
if ($val['type'] == 'text' || $val['type'] == 'html') print ' tdtop';
print '">';
if (! empty($val['help'])) print $form->textwithpicto($langs->trans($val['label']), $val['help']);
if (! empty($val['help'])) print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help']));
else print $langs->trans($val['label']);
print '</td>';
print '<td>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/tpl/commonfields_view.tpl.php
Expand Up @@ -52,7 +52,7 @@
if ($val['notnull'] > 0) print ' fieldrequired';
if ($val['type'] == 'text' || $val['type'] == 'html') print ' tdtop';
print '">';
if (! empty($val['help'])) print $form->textwithpicto($langs->trans($val['label']), $val['help']);
if (! empty($val['help'])) print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help']));
else print $langs->trans($val['label']);
print '</td>';
print '<td>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/emailcollector/class/emailcollector.class.php
Expand Up @@ -98,7 +98,7 @@ class EmailCollector extends CommonObject
'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>60, 'notnull'=>-1),
'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>100, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com'),
'login' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>-1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myaccount@gmail.com'),
'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>-1, 'comment'=>"IMAP password"),
'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>-1, 'comment'=>"IMAP password", 'help'=>'WithGMailYouCanCreateADedicatedPassword'),
'source_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxSourceDirectory', 'visible'=>-1, 'enabled'=>1, 'position'=>103, 'notnull'=>1, 'default' => 'Inbox', 'help'=>'Example: INBOX'),
//'filter' => array('type'=>'text', 'label'=>'Filter', 'visible'=>1, 'enabled'=>1, 'position'=>105),
//'actiontodo' => array('type'=>'varchar(255)', 'label'=>'ActionToDo', 'visible'=>1, 'enabled'=>1, 'position'=>106),
Expand Down
3 changes: 2 additions & 1 deletion htdocs/langs/en_US/admin.lang
Expand Up @@ -1879,4 +1879,5 @@ ExportSetup=Setup of module Export
InstanceUniqueID=Unique ID of the instance
SmallerThan=Smaller than
LargerThan=Larger than
IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects.
IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects.
WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/.

0 comments on commit 1b415a6

Please sign in to comment.