Update skeletons
This commit is contained in:
parent
9ca8ab99cd
commit
f4ed96a67d
@ -52,7 +52,8 @@ $langs->load("companies");
|
|||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$myparam = isset($_GET["myparam"])?$_GET["myparam"]:'';
|
$action = GETPOST('action');
|
||||||
|
$myparam = GETPOST('myparam');
|
||||||
|
|
||||||
// Protection if external user
|
// Protection if external user
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
@ -68,7 +69,7 @@ if ($user->societe_id > 0)
|
|||||||
* Put here all code to do according to value of "action" parameter
|
* Put here all code to do according to value of "action" parameter
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
if ($_GET["action"] == 'add' || $_POST["action"] == 'add')
|
if ($action == 'add')
|
||||||
{
|
{
|
||||||
$myobject=new Skeleton_Class($db);
|
$myobject=new Skeleton_Class($db);
|
||||||
$myobject->prop1=$_POST["field1"];
|
$myobject->prop1=$_POST["field1"];
|
||||||
@ -89,7 +90,7 @@ if ($_GET["action"] == 'add' || $_POST["action"] == 'add')
|
|||||||
|
|
||||||
|
|
||||||
/***************************************************
|
/***************************************************
|
||||||
* PAGE
|
* VIEW
|
||||||
*
|
*
|
||||||
* Put here all code to build page
|
* Put here all code to build page
|
||||||
****************************************************/
|
****************************************************/
|
||||||
@ -100,16 +101,29 @@ $form=new Form($db);
|
|||||||
|
|
||||||
|
|
||||||
// Put here content of your page
|
// Put here content of your page
|
||||||
// ...
|
|
||||||
|
// Example 1 : Adding jquery code
|
||||||
|
print '<script type="text/javascript" language="javascript">
|
||||||
|
jQuery(document).ready(function() {
|
||||||
|
function init_myfunc()
|
||||||
|
{
|
||||||
|
jQuery("#myid").removeAttr(\'disabled\');
|
||||||
|
jQuery("#myid").attr(\'disabled\',\'disabled\');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
init_myfunc();
|
||||||
|
jQuery("#mybutton").click(function() {
|
||||||
|
init_needroot();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>';
|
||||||
|
|
||||||
|
|
||||||
/***************************************************
|
|
||||||
* LINKED OBJECT BLOCK
|
// Example 2 : Adding jquery code
|
||||||
*
|
|
||||||
* Put here code to view linked object
|
|
||||||
****************************************************/
|
|
||||||
$somethingshown=$myobject->showLinkedObjectBlock();
|
$somethingshown=$myobject->showLinkedObjectBlock();
|
||||||
|
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
$db->close();
|
$db->close();
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user