Fix sort on common fields
This commit is contained in:
parent
3d34a839a3
commit
25d59cf107
@ -32,6 +32,8 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
<!-- BEGIN PHP TEMPLATE commonfields_add.tpl.php -->
|
<!-- BEGIN PHP TEMPLATE commonfields_add.tpl.php -->
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
$object->fields = dol_sort_array($object->fields, 'position');
|
||||||
|
|
||||||
foreach($object->fields as $key => $val)
|
foreach($object->fields as $key => $val)
|
||||||
{
|
{
|
||||||
// Discard if extrafield is a hidden field on form
|
// Discard if extrafield is a hidden field on form
|
||||||
|
|||||||
@ -32,6 +32,8 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
<!-- BEGIN PHP TEMPLATE commonfields_edit.tpl.php -->
|
<!-- BEGIN PHP TEMPLATE commonfields_edit.tpl.php -->
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
$object->fields = dol_sort_array($object->fields, 'position');
|
||||||
|
|
||||||
foreach($object->fields as $key => $val)
|
foreach($object->fields as $key => $val)
|
||||||
{
|
{
|
||||||
// Discard if extrafield is a hidden field on form
|
// Discard if extrafield is a hidden field on form
|
||||||
|
|||||||
@ -34,6 +34,8 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
<!-- BEGIN PHP TEMPLATE commonfields_view.tpl.php -->
|
<!-- BEGIN PHP TEMPLATE commonfields_view.tpl.php -->
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
$object->fields = dol_sort_array($object->fields, 'position');
|
||||||
|
|
||||||
foreach($object->fields as $key => $val)
|
foreach($object->fields as $key => $val)
|
||||||
{
|
{
|
||||||
// Discard if extrafield is a hidden field on form
|
// Discard if extrafield is a hidden field on form
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) ---Put here your own copyright and developer email---
|
* Copyright (C) ---Put here your own copyright and developer email---
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -215,7 +215,7 @@ class modMyModule extends DolibarrModules
|
|||||||
$this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used)
|
$this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used)
|
||||||
$this->rights[$r][1] = 'Create/Update myobject of MyModule'; // Permission label
|
$this->rights[$r][1] = 'Create/Update myobject of MyModule'; // Permission label
|
||||||
$this->rights[$r][3] = 1; // Permission by default for new user (0/1)
|
$this->rights[$r][3] = 1; // Permission by default for new user (0/1)
|
||||||
$this->rights[$r][4] = 'create'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2)
|
$this->rights[$r][4] = 'write'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2)
|
||||||
$this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2)
|
$this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2)
|
||||||
|
|
||||||
$r++;
|
$r++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user