forked from Wavyzz/dolibarr
Work on default focus
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,8 +239,11 @@ else
|
||||
$textkey=$form->textwithpicto($langs->trans("Field"), $texthelp);
|
||||
}
|
||||
print_liste_field_titre($textkey,$_SERVER["PHP_SELF"],'param','',$param,'',$sortfield,$sortorder);
|
||||
if ($mode != 'sortorder')
|
||||
// Value
|
||||
if ($mode != 'focus')
|
||||
{
|
||||
if ($mode != 'sortorder')
|
||||
{
|
||||
$texthelp=$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
|
||||
// See list into GETPOST
|
||||
$texthelp.='__USERID__<br>';
|
||||
@@ -245,14 +254,17 @@ if ($mode != 'sortorder')
|
||||
$texthelp.='__YEAR__<br>';
|
||||
if (! empty($conf->multicompany->enabled)) $texthelp.='__ENTITYID__<br>';
|
||||
$textvalue=$form->textwithpicto($langs->trans("Value"), $texthelp, 1, 'help', '', 0, 2, '');
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
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,18 +329,21 @@ 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
|
||||
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.'">';
|
||||
@@ -332,7 +353,9 @@ if ($result)
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user