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