diff --git a/build/debian/README.howto b/build/debian/README.howto index 399c4f07a1f1a8c4c230181a45397c8b5457cde9..e040cd6dcede1eccc9f6f2a47d355b530b8d5535 100644 --- a/build/debian/README.howto +++ b/build/debian/README.howto @@ -152,7 +152,7 @@ tag 729538 -moreinfo -##### Testing a package into unstable env +##### Testing a package into a chroot environment Check you have a mysql server available from another interface than "localhost". Set line in /etc/mysql/my.cnf if required and restart mysql @@ -160,9 +160,11 @@ Set line in /etc/mysql/my.cnf if required and restart mysql [mysqld] bind-address = * -Create a chroot called "unstable-amd64-sbuild". +Create a chroot called "jessie" or "unstable". Chroot env is stored into /srv/chroot directory. > sudo sbuild-createchroot --keyring=unstable /srv/chroot/unstable http://ftp.uk.debian.org/debian +or +> sudo sbuild-createchroot jessie /srv/chroot/jessie http://ftp.uk.debian.org/debian Pour lister les env chroot > schroot -l @@ -170,8 +172,9 @@ or > ls /srv/chroot Puis pour se connecter et préparer l'environnement -> schroot -c name_of_chroot +> schroot -c name_of_chroot (exemple schroot -c unstable-amd64-sbuild) > cat /etc/debian_chroot to check which debian branch we are into +> apt-get install vi > vi /usr/sbin/policy-rc.d and replace return code 101 (not allowed) into 0 (ok) > apt-get update > apt-get upgrade diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php index 8a9bd4f209bd56dd2be0211bcd9df70ac61f7f7b..ec4c5fd46052058406caaefb981bb2f3d8836884 100644 --- a/htdocs/admin/defaultvalues.php +++ b/htdocs/admin/defaultvalues.php @@ -37,7 +37,7 @@ if (!$user->admin) accessforbidden(); $id=GETPOST('rowid','int'); $action=GETPOST('action','alpha'); -$mode = GETPOST('mode')?GETPOST('mode'):'createform'; // 'createform', 'filters', 'sortorder' +$mode = GETPOST('mode')?GETPOST('mode'):'createform'; // 'createform', 'filters', 'sortorder', 'focus' $limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); @@ -210,6 +210,10 @@ if ($mode == 'sortorder') { print info_admin($langs->trans("WarningSettingSortOrder")).'<br>'; } +if ($mode == 'focus') +{ + print info_admin($langs->trans("FeatureNotYetAvailable")).'<br>'; +} print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" id="action" name="action" value="">'; @@ -217,11 +221,13 @@ print '<input type="hidden" id="mode" name="mode" value="'.dol_escape_htmltag($m print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; +// Page $texthelp=$langs->trans("PageUrlForDefaultValues"); if ($mode == 'createform') $texthelp.=$langs->trans("PageUrlForDefaultValuesCreate", 'societe/card.php'); else $texthelp.=$langs->trans("PageUrlForDefaultValuesList", 'societe/list.php'); $texturl=$form->textwithpicto($langs->trans("Url"), $texthelp); print_liste_field_titre($texturl,$_SERVER["PHP_SELF"],'page,param','',$param,'',$sortfield,$sortorder); +// Field $texthelp=$langs->trans("TheKeyIsTheNameOfHtmlField"); if ($mode != 'sortorder') { @@ -233,26 +239,32 @@ else $textkey=$form->textwithpicto($langs->trans("Field"), $texthelp); } print_liste_field_titre($textkey,$_SERVER["PHP_SELF"],'param','',$param,'',$sortfield,$sortorder); -if ($mode != 'sortorder') -{ - $texthelp=$langs->trans("FollowingConstantsWillBeSubstituted").'<br>'; - // See list into GETPOST - $texthelp.='__USERID__<br>'; - $texthelp.='__SUPERVISORID__<br>'; - $texthelp.='__MYCOUNTRYID__<br>'; - $texthelp.='__DAY__<br>'; - $texthelp.='__MONTH__<br>'; - $texthelp.='__YEAR__<br>'; - if (! empty($conf->multicompany->enabled)) $texthelp.='__ENTITYID__<br>'; - $textvalue=$form->textwithpicto($langs->trans("Value"), $texthelp, 1, 'help', '', 0, 2, ''); -} -else +// Value +if ($mode != 'focus') { - $texthelp='ASC or DESC'; - $textvalue=$form->textwithpicto($langs->trans("SortOrder"), $texthelp); + if ($mode != 'sortorder') + { + $texthelp=$langs->trans("FollowingConstantsWillBeSubstituted").'<br>'; + // See list into GETPOST + $texthelp.='__USERID__<br>'; + $texthelp.='__SUPERVISORID__<br>'; + $texthelp.='__MYCOUNTRYID__<br>'; + $texthelp.='__DAY__<br>'; + $texthelp.='__MONTH__<br>'; + $texthelp.='__YEAR__<br>'; + if (! empty($conf->multicompany->enabled)) $texthelp.='__ENTITYID__<br>'; + $textvalue=$form->textwithpicto($langs->trans("Value"), $texthelp, 1, 'help', '', 0, 2, ''); + } + else + { + $texthelp='ASC or DESC'; + $textvalue=$form->textwithpicto($langs->trans("SortOrder"), $texthelp); + } + print_liste_field_titre($textvalue, $_SERVER["PHP_SELF"], 'value', '', $param, '', $sortfield, $sortorder); } -print_liste_field_titre($textvalue, $_SERVER["PHP_SELF"], 'value', '', $param, '', $sortfield, $sortorder); +// Entity if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],'entity,page','',$param,'',$sortfield,$sortorder); +// Actions print '<td align="center"></td>'; print "</tr>\n"; @@ -261,15 +273,21 @@ print "</tr>\n"; print "\n"; print '<tr class="oddeven">'; +// Page print '<td>'; print '<input type="text" class="flat minwidth200 maxwidthonsmartphone" name="defaulturl" value="">'; print '</td>'."\n"; +// Field print '<td>'; print '<input type="text" class="flat maxwidth100" name="defaultkey" value="">'; print '</td>'; -print '<td>'; -print '<input type="text" class="flat maxwidthonsmartphone" name="defaultvalue" value="">'; -print '</td>'; +// Value +if ($mode != 'focus') +{ + print '<td>'; + print '<input type="text" class="flat maxwidthonsmartphone" name="defaultvalue" value="">'; + print '</td>'; +} // Limit to superadmin if (! empty($conf->multicompany->enabled) && !$user->entity) { @@ -311,28 +329,33 @@ if ($result) print '<tr class="oddeven">'; + // Page print '<td>'; if ($action != 'edit' || GETPOST('rowid') != $obj->rowid) print $obj->page; else print '<input type="text" name="urlpage" value="'.dol_escape_htmltag($obj->page).'">'; print '</td>'."\n"; - // Key + // Field print '<td>'; if ($action != 'edit' || GETPOST('rowid') != $obj->rowid) print $obj->param; else print '<input type="text" name="key" value="'.dol_escape_htmltag($obj->param).'">'; print '</td>'."\n"; // Value - print '<td>'; - /*print '<input type="hidden" name="const['.$i.'][rowid]" value="'.$obj->rowid.'">'; - print '<input type="hidden" name="const['.$i.'][lang]" value="'.$obj->lang.'">'; - print '<input type="hidden" name="const['.$i.'][name]" value="'.$obj->transkey.'">'; - print '<input type="text" id="value_'.$i.'" class="flat inputforupdate" size="30" name="const['.$i.'][value]" value="'.dol_escape_htmltag($obj->transvalue).'">'; - */ - if ($action != 'edit' || GETPOST('rowid') != $obj->rowid) print $obj->value; - else print '<input type="text" name="value" value="'.dol_escape_htmltag($obj->value).'">'; - print '</td>'; - + if ($mode != 'focus') + { + print '<td>'; + /*print '<input type="hidden" name="const['.$i.'][rowid]" value="'.$obj->rowid.'">'; + print '<input type="hidden" name="const['.$i.'][lang]" value="'.$obj->lang.'">'; + print '<input type="hidden" name="const['.$i.'][name]" value="'.$obj->transkey.'">'; + print '<input type="text" id="value_'.$i.'" class="flat inputforupdate" size="30" name="const['.$i.'][value]" value="'.dol_escape_htmltag($obj->transvalue).'">'; + */ + if ($action != 'edit' || GETPOST('rowid') != $obj->rowid) print $obj->value; + else print '<input type="text" name="value" value="'.dol_escape_htmltag($obj->value).'">'; + print '</td>'; + } + + // Actions print '<td align="center">'; if ($action != 'edit' || GETPOST('rowid') != $obj->rowid) { @@ -349,7 +372,7 @@ if ($result) print '<input type="submit" class="button" name="actioncancel" value="'.$langs->trans("Cancel").'">'; } print '</td>'; - + print "</tr>\n"; print "\n"; $i++; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 2a734b5f161ea4eb09f1d7b254106a5ef6fd22dc..4beb49107d256254473fc26b21a20c30f65587f2 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -624,6 +624,11 @@ function defaultvalues_prepare_head() $head[$h][2] = 'sortorder'; $h++; + $head[$h][0] = DOL_URL_ROOT."/admin/defaultvalues.php?mode=focus"; + $head[$h][1] = $langs->trans("DefaultFocus"); + $head[$h][2] = 'focus'; + $h++; + /*$head[$h][0] = DOL_URL_ROOT."/admin/translation.php?mode=searchkey"; $head[$h][1] = $langs->trans("TranslationKeySearch"); $head[$h][2] = 'searchkey'; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 4b56ef00ae1fa51b025970a7174327ed9bbe08ef..14131bddd2c199f2775062c84e293790e452262a 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1352,9 +1352,10 @@ CacheByClient=Cache by browser CompressionOfResources=Compression of HTTP responses TestNotPossibleWithCurrentBrowsers=Such an automatic detection is not possible with current browsers DefaultValuesDesc=You can define/force here the default value you want to get when your create a new record, and/or defaut filters or sort order when your list record. -DefaultCreateForm=Create forms -DefaultSearchFilters=Search filters -DefaultSortOrder=Sort orders +DefaultCreateForm=Default values for new objects +DefaultSearchFilters=Default search filters +DefaultSortOrder=Default sort orders +DefaultFocus=Default focus fields ##### Products ##### ProductSetup=Products module setup ServiceSetup=Services module setup