Minor fixes

This commit is contained in:
Laurent Destailleur 2017-07-22 01:21:28 +02:00
parent f64a9968a9
commit 7562412554
3 changed files with 29 additions and 17 deletions

View File

@ -1058,7 +1058,7 @@ RestoreDesc2=Restore archive file (zip file for example) of documents directory
RestoreDesc3=Restore the data, from a backup dump file, into the database of the new Dolibarr installation or into the database of this current installation (<b>%s</b>). Warning, once restore is finished, you must use a login/password, that existed when backup was made, to connect again. To restore a backup database into this current installation, you can follow this assistant.
RestoreMySQL=MySQL import
ForcedToByAModule= This rule is forced to <b>%s</b> by an activated module
PreviousDumpFiles=Available database backup dump files
PreviousDumpFiles=Generated database backup files
WeekStartOnDay=First day of week
RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be required (Programs version %s differs from database version %s)
YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password.

View File

@ -1229,11 +1229,13 @@ elseif (! empty($module))
print $form->textwithpicto($langs->trans("Label"), $langs->trans("YouCanUseTranslationKey"));
print '</td>';
print '<td>'.$langs->trans("Type").'</td>';
print '<td class="right">'.$langs->trans("Position").'</td>';
print '<td class="center">'.$langs->trans("NotNull").'</td>';
print '<td class="center">'.$langs->trans("SearchAll").'</td>';
//print '<td>'.$langs->trans("DefaultValue").'</td>';
print '<td class="center">'.$langs->trans("DatabaseIndex").'</td>';
print '<td class="right">'.$langs->trans("Enabled").'</td>';
print '<td class="right">'.$langs->trans("Visible").'</td>';
print '<td class="right">'.$langs->trans("Position").'</td>';
print '<td class="center">'.$langs->trans("SearchAll").'</td>';
print '<td>'.$langs->trans("Comment").'</td>';
print '<td></td>';
print '</tr>';
@ -1241,11 +1243,13 @@ elseif (! empty($module))
print '<td><input class="text" name="propname" value=""></td>';
print '<td><input class="text" name="proplabel" value=""></td>';
print '<td><input class="text" name="proptype" value=""></td>';
print '<td class="right"><input class="text right" size="2" name="propposition" value=""></td>';
print '<td class="center"><input class="text" size="2" name="propnotnull" value=""></td>';
print '<td class="center"><input class="text" size="2" name="propsearchall" value=""></td>';
//print '<td><input class="text" name="propdefault" value=""></td>';
print '<td class="center"><input class="text" size="2" name="propindex" value=""></td>';
print '<td class="center"><input class="text" size="2" name="propenabled" value=""></td>';
print '<td class="center"><input class="text" size="2" name="propvisible" value=""></td>';
print '<td class="right"><input class="text right" size="2" name="propposition" value=""></td>';
print '<td class="center"><input class="text" size="2" name="propsearchall" value=""></td>';
print '<td><input class="text" name="propcomment" value=""></td>';
print '<td align="center">';
print '<input class="button" type="submit" name="add" value="'.$langs->trans("Add").'">';
@ -1277,6 +1281,8 @@ elseif (! empty($module))
$propsearchall=$propval['searchall'];
//$propdefault=$propval['default'];
$propindex=$propval['index'];
$propenabled=$propval['enabled'];
$propvisible=$propval['visible'];
$propcomment=$propval['comment'];
print '<tr class="oddeven">';
@ -1290,21 +1296,27 @@ elseif (! empty($module))
print '<td>';
print $proptype;
print '</td>';
print '<td align="right">';
print $propposition;
print '</td>';
print '<td class="center">';
print $propnotnull?'X':'';
print '</td>';
print '<td class="center">';
print $propsearchall?'X':'';
print '</td>';
/*print '<td>';
print $propdefault;
print '</td>';*/
print '<td class="center">';
print $propindex?'X':'';
print '</td>';
print '<td class="center">';
print $propenabled?$propenabled:'';
print '</td>';
print '<td class="center">';
print $propvisible?$propvisible:'';
print '</td>';
print '<td align="right">';
print $propposition;
print '</td>';
print '<td class="center">';
print $propsearchall?'X':'';
print '</td>';
print '<td>';
print $propcomment;
print '</td>';

View File

@ -63,12 +63,12 @@ class MyObject extends CommonObject
* @var array Array with all fields and their property
*/
public $fields=array(
'ref' =>array('type'=>'varchar(64)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'position'=>10, 'notnull'=>true, 'index'=>true, 'searchall'=>1, 'comment'=>'Reference of object'),
'entity'=>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'notnull'=>true, 'index'=>true),
'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'searchall'=>1),
'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'notnull'=>true, 'position'=>500),
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>true, 'position'=>500),
'status'=>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'index'=>true, 'position'=>1000),
'ref' =>array('type'=>'varchar(64)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>true, 'index'=>true, 'visible'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'),
'entity'=>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'notnull'=>true, 'index'=>true, 'visible'=>0, 'position'=>20),
'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'visible'=>1, 'searchall'=>1),
'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'notnull'=>true, 'visible'=>-1, 'position'=>500),
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>true, 'visible'=>-1, 'position'=>500),
'status'=>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'index'=>true, 'visible'=>1, 'position'=>1000),
);
// END MODULEBUILDER PROPERTIES