default to create on card.php if $action is empty

This commit is contained in:
Christian Foellmann 2022-07-07 16:24:59 +02:00
parent d97b882cf8
commit aaca9bc03d
59 changed files with 60 additions and 60 deletions

View File

@ -220,7 +220,7 @@ llxheader('', $title, $help_url);
// Create mode // Create mode
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans('NewAccountingAccount')); print load_fiche_titre($langs->trans('NewAccountingAccount'));
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n"; print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";

View File

@ -154,7 +154,7 @@ $help_url = "EN:Module_Double_Entry_Accounting";
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewFiscalYear")); print load_fiche_titre($langs->trans("NewFiscalYear"));
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';

View File

@ -340,7 +340,7 @@ if ($action == 'delete') {
print $formconfirm; print $formconfirm;
} }
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("CreateMvts")); print load_fiche_titre($langs->trans("CreateMvts"));
$object = new BookKeeping($db); $object = new BookKeeping($db);

View File

@ -920,7 +920,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// ----------------------------------------- // -----------------------------------------
// Create mode // Create mode
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
$object->canvas = $canvas; $object->canvas = $canvas;
$object->state_id = GETPOST('state_id', 'int'); $object->state_id = GETPOST('state_id', 'int');

View File

@ -253,7 +253,7 @@ $help_url = "EN:Module_EMail_Collector|FR:Module_Collecteur_de_courrier_électro
llxHeader('', 'EmailCollector', $help_url); llxHeader('', 'EmailCollector', $help_url);
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewEmailCollector", $langs->transnoentitiesnoconv("EmailCollector"))); print load_fiche_titre($langs->trans("NewEmailCollector", $langs->transnoentitiesnoconv("EmailCollector")));
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -166,7 +166,7 @@ $help_url = '';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Asset")), '', 'object_'.$object->picto); print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Asset")), '', 'object_'.$object->picto);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -138,7 +138,7 @@ $help_url = '';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("AssetModel")), '', 'object_' . $object->picto); print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("AssetModel")), '', 'object_' . $object->picto);
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';

View File

@ -268,7 +268,7 @@ $help_url ='EN:Module_BOM';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewBOM"), '', 'bom'); print load_fiche_titre($langs->trans("NewBOM"), '', 'bom');
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -144,7 +144,7 @@ $h++;
$hselected = 'card'; $hselected = 'card';
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
/* /*
* Fact bookmark creation mode * Fact bookmark creation mode
*/ */

View File

@ -923,7 +923,7 @@ $arrayrecurrulefreq = array(
$help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda'; $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda';
llxHeader('', $langs->trans("Agenda"), $help_url); llxHeader('', $langs->trans("Agenda"), $help_url);
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
$contact = new Contact($db); $contact = new Contact($db);
$socpeopleassigned = GETPOST("socpeopleassigned", 'array'); $socpeopleassigned = GETPOST("socpeopleassigned", 'array');

View File

@ -704,7 +704,7 @@ llxHeader(
array() array()
); );
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
// EMailing in creation mode // EMailing in creation mode
print '<form name="new_mailing" action="'.$_SERVER['PHP_SELF'].'" method="POST">'."\n"; print '<form name="new_mailing" action="'.$_SERVER['PHP_SELF'].'" method="POST">'."\n";
print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="token" value="'.newToken().'">';

View File

@ -1537,7 +1537,7 @@ llxHeader('', $title, $help_url);
$now = dol_now(); $now = dol_now();
// Add new proposal // Add new proposal
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
$currency_code = $conf->currency; $currency_code = $conf->currency;
print load_fiche_titre($langs->trans("NewProp"), '', 'propal'); print load_fiche_titre($langs->trans("NewProp"), '', 'propal');

View File

@ -336,7 +336,7 @@ $help_url = 'EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses|ES:Módulo_Ba
// Creation // Creation
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
$object = new Account($db); $object = new Account($db);
$title = $langs->trans("NewFinancialAccount"); $title = $langs->trans("NewFinancialAccount");

View File

@ -339,7 +339,7 @@ foreach ($bankcateg->fetchAll() as $bankcategory) {
} }
// Create mode // Create mode
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
// Update fields properties in realtime // Update fields properties in realtime
if (!empty($conf->use_javascript_ajax)) { if (!empty($conf->use_javascript_ajax)) {
print "\n".'<script type="text/javascript">'; print "\n".'<script type="text/javascript">';

View File

@ -194,7 +194,7 @@ $form = new Form($db);
/* /*
* Action create * Action create
*/ */
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
//WYSIWYG Editor //WYSIWYG Editor
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';

View File

@ -2890,7 +2890,7 @@ llxHeader('', $title, $help_url);
// Mode creation // Mode creation
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
$facturestatic = new Facture($db); $facturestatic = new Facture($db);
$extrafields->fetch_name_optionals_label($facturestatic->table_element); $extrafields->fetch_name_optionals_label($facturestatic->table_element);

View File

@ -145,7 +145,7 @@ $title = $langs->trans("LT".$object->ltt)." - ".$langs->trans("Card");
$help_url = ''; $help_url = '';
llxHeader('', $title, $helpurl); llxHeader('', $title, $helpurl);
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->transcountry($lttype == 2 ? "newLT2Payment" : "newLT1Payment", $mysoc->country_code)); print load_fiche_titre($langs->transcountry($lttype == 2 ? "newLT2Payment" : "newLT1Payment", $mysoc->country_code));
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" name="formlocaltax" method="post">'."\n"; print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" name="formlocaltax" method="post">'."\n";

View File

@ -343,7 +343,7 @@ llxHeader("", $title, $help_url);
// Form to create a social contribution // Form to create a social contribution
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewSocialContribution")); print load_fiche_titre($langs->trans("NewSocialContribution"));
print '<form name="charge" method="post" action="'.$_SERVER["PHP_SELF"].'">'; print '<form name="charge" method="post" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -398,7 +398,7 @@ if ($id) {
} }
// Form to enter VAT // Form to enter VAT
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("VAT").' - '.$langs->trans("New")); print load_fiche_titre($langs->trans("VAT").' - '.$langs->trans("New"));
if (!empty($conf->use_javascript_ajax)) { if (!empty($conf->use_javascript_ajax)) {

View File

@ -627,7 +627,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} }
if ($user->rights->societe->contact->creer) { if ($user->rights->societe->contact->creer) {
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
/* /*
* Fiche en mode creation * Fiche en mode creation
*/ */

View File

@ -1017,7 +1017,7 @@ if ($result > 0) {
} }
// Create // Create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans('AddContract'), '', 'contract'); print load_fiche_titre($langs->trans('AddContract'), '', 'contract');
$soc = new Societe($db); $soc = new Societe($db);

View File

@ -258,7 +258,7 @@ llxHeader('', $langs->trans("CronTask"));
$head = cron_prepare_head($object); $head = cron_prepare_head($object);
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("CronTask"), '', 'title_setup'); print load_fiche_titre($langs->trans("CronTask"), '', 'title_setup');
} }

View File

@ -259,7 +259,7 @@ llxHeader('', $title, 'Livraison');
$form = new Form($db); $form = new Form($db);
$formfile = new FormFile($db); $formfile = new FormFile($db);
if ($action == 'create') { // Create. Seems to no be used if ($action == 'create' || (empty($action) && empty($id))) { // Create. Seems to no be used
} else // View } else // View
{ {
if ($object->id > 0) { if ($object->id > 0) {

View File

@ -386,7 +386,7 @@ if (!empty($conf->project->enabled)) {
$formproject = new FormProjets($db); $formproject = new FormProjets($db);
} }
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("AddDonation"), '', 'object_donation'); print load_fiche_titre($langs->trans("AddDonation"), '', 'object_donation');
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST">'; print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST">';

View File

@ -206,7 +206,7 @@ llxHeader('', $langs->trans("ECMNewSection"));
$form = new Form($db); $form = new Form($db);
$formecm = new FormEcm($db); $formecm = new FormEcm($db);
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
//*********************** //***********************
// Create // Create
//*********************** //***********************

View File

@ -166,7 +166,7 @@ $title = $langs->trans("ConferenceOrBooth");
$help_url = ''; $help_url = '';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
$result = $projectstatic->fetch(GETPOST('fk_project')); $result = $projectstatic->fetch(GETPOST('fk_project'));
} else { } else {
$result = $projectstatic->fetch($object->fk_project); $result = $projectstatic->fetch($object->fk_project);
@ -392,7 +392,7 @@ if (!empty($withproject)) {
} }
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("ConferenceOrBooth")), '', 'object_'.$object->picto); print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("ConferenceOrBooth")), '', 'object_'.$object->picto);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -420,7 +420,7 @@ if (!empty($withproject)) {
} }
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("ConferenceOrBoothAttendee")), '', 'object_'.$object->picto); print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("ConferenceOrBoothAttendee")), '', 'object_'.$object->picto);

View File

@ -835,7 +835,7 @@ if ($action == 'create2') {
} }
// Mode creation. // Mode creation.
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
$expe = new Expedition($db); $expe = new Expedition($db);
print load_fiche_titre($langs->trans("CreateShipment"), '', 'dolly'); print load_fiche_titre($langs->trans("CreateShipment"), '', 'dolly');

View File

@ -1389,7 +1389,7 @@ $ecmfilesstatic = new EcmFiles($db);
$formexpensereport = new FormExpenseReport($db); $formexpensereport = new FormExpenseReport($db);
// Create // Create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewTrip"), '', 'trip'); print load_fiche_titre($langs->trans("NewTrip"), '', 'trip');
print '<form action="'.$_SERVER['PHP_SELF'].'" method="post" name="create">'; print '<form action="'.$_SERVER['PHP_SELF'].'" method="post" name="create">';

View File

@ -796,7 +796,7 @@ $help_url = 'EN:Module_Interventions';
llxHeader('', $langs->trans("Intervention"), $help_url); llxHeader('', $langs->trans("Intervention"), $help_url);
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
// Create new intervention // Create new intervention
$soc = new Societe($db); $soc = new Societe($db);

View File

@ -1547,7 +1547,7 @@ llxHeader('', $title, $help_url);
$now = dol_now(); $now = dol_now();
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans('NewOrderSupplier'), '', 'supplier_order'); print load_fiche_titre($langs->trans('NewOrderSupplier'), '', 'supplier_order');
dol_htmloutput_events(); dol_htmloutput_events();

View File

@ -1902,7 +1902,7 @@ $help_url = 'EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Mó
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
// Mode creation // Mode creation
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
$facturestatic = new FactureFournisseur($db); $facturestatic = new FactureFournisseur($db);
print load_fiche_titre($langs->trans('NewSupplierInvoice'), '', 'supplier_invoice'); print load_fiche_titre($langs->trans('NewSupplierInvoice'), '', 'supplier_invoice');

View File

@ -159,7 +159,7 @@ $formcompany = new FormCompany($db);
/* /*
* Action create * Action create
*/ */
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewEstablishment")); print load_fiche_titre($langs->trans("NewEstablishment"));
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';

View File

@ -255,7 +255,7 @@ print '<script type="text/javascript" language="javascript">
</script>'; </script>';
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewEval"), '', 'object_' . $object->picto); print load_fiche_titre($langs->trans("NewEval"), '', 'object_' . $object->picto);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -180,7 +180,7 @@ llxHeader('', $title, $help_url);
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewObject", $langs->transnoentities('Job')), '', 'object_' . $object->picto); print load_fiche_titre($langs->trans("NewObject", $langs->transnoentities('Job')), '', 'object_' . $object->picto);
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';

View File

@ -187,7 +187,7 @@ llxHeader('', $title, $help_url);
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewSkill"), '', 'object_' . $object->picto); print load_fiche_titre($langs->trans("NewSkill"), '', 'object_' . $object->picto);
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';

View File

@ -156,7 +156,7 @@ if ($action == 'add' && $permissiontoadd) {
*/ */
// Creation mode // Creation mode
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
$title = $langs->trans("IntracommReportTitle"); $title = $langs->trans("IntracommReportTitle");
llxHeader("", $title); llxHeader("", $title);
print load_fiche_titre($langs->trans("IntracommReportTitle")); print load_fiche_titre($langs->trans("IntracommReportTitle"));

View File

@ -169,7 +169,7 @@ $help_url = '';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewKnowledgeRecord"), '', 'object_'.$object->picto); print load_fiche_titre($langs->trans("NewKnowledgeRecord"), '', 'object_'.$object->picto);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -254,7 +254,7 @@ llxHeader("", $title, $help_url);
// Create mode // Create mode
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
//WYSIWYG Editor //WYSIWYG Editor
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';

View File

@ -242,7 +242,7 @@ llxHeader('', $title, $help_url);
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
if (empty($permissiontoadd)) { if (empty($permissiontoadd)) {
accessforbidden($langs->trans('NotEnoughPermissions'), 0, 1); accessforbidden($langs->trans('NotEnoughPermissions'), 0, 1);
exit; exit;

View File

@ -241,7 +241,7 @@ llxHeader('', $title, '');
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
if (GETPOST('fk_bom', 'int') > 0) { if (GETPOST('fk_bom', 'int') > 0) {
$titlelist = $langs->trans("ToConsume"); $titlelist = $langs->trans("ToConsume");
if ($objectbom->bomtype == 1) { if ($objectbom->bomtype == 1) {

View File

@ -259,7 +259,7 @@ $help_url = '';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewPartnership"), '', 'object_'.$object->picto); print load_fiche_titre($langs->trans("NewPartnership"), '', 'object_'.$object->picto);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -181,7 +181,7 @@ llxHeader('', $title, $help_url);
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewInventory"), '', 'product'); print load_fiche_titre($langs->trans("NewInventory"), '', 'product');
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -290,7 +290,7 @@ $help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:M&oacute;dulo_Stocks';
llxHeader("", $title, $help_url); llxHeader("", $title, $help_url);
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewWarehouse"), '', 'stock'); print load_fiche_titre($langs->trans("NewWarehouse"), '', 'stock');
dol_set_focus('input[name="libelle"]'); dol_set_focus('input[name="libelle"]');

View File

@ -378,7 +378,7 @@ llxHeader('', $title, $help_url);
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("Batch"), '', 'object_'.$object->picto); print load_fiche_titre($langs->trans("Batch"), '', 'object_'.$object->picto);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -413,7 +413,7 @@ print '});
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("StockTransfer")), '', 'object_'.$object->picto); print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("StockTransfer")), '', 'object_'.$object->picto);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -728,7 +728,7 @@ if ($action == 'create2') {
} }
// Mode creation. // Mode creation.
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
$recept = new Reception($db); $recept = new Reception($db);
print load_fiche_titre($langs->trans("CreateReception")); print load_fiche_titre($langs->trans("CreateReception"));

View File

@ -283,7 +283,7 @@ llxHeader('', $title, $help_url);
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("RecruitmentCandidature")), '', 'object_'.$object->picto); print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("RecruitmentCandidature")), '', 'object_'.$object->picto);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -202,7 +202,7 @@ $help_url = '';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewPositionToBeFilled"), '', 'object_'.$object->picto); print load_fiche_titre($langs->trans("NewPositionToBeFilled"), '', 'object_'.$object->picto);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -197,7 +197,7 @@ $form = new Form($db);
$formresource = new FormResource($db); $formresource = new FormResource($db);
if ($action == 'create' || $object->fetch($id, $ref) > 0) { if ($action == 'create' || $object->fetch($id, $ref) > 0) {
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($title, '', 'object_resource'); print load_fiche_titre($title, '', 'object_resource');
print dol_get_fiche_head(''); print dol_get_fiche_head('');
} else { } else {

View File

@ -457,7 +457,7 @@ if ($id > 0) {
} }
// Create // Create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
$year_current = strftime("%Y", dol_now()); $year_current = strftime("%Y", dol_now());
$pastmonth = strftime("%m", dol_now()) - 1; $pastmonth = strftime("%m", dol_now()) - 1;
$pastmonthyear = $year_current; $pastmonthyear = $year_current;

View File

@ -981,7 +981,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// ----------------------------------------- // -----------------------------------------
// When used in standard mode // When used in standard mode
// ----------------------------------------- // -----------------------------------------
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
/* /*
* Creation * Creation
*/ */

View File

@ -1141,7 +1141,7 @@ if (!empty($conf->project->enabled)) {
$now = dol_now(); $now = dol_now();
// Add new askprice // Add new askprice
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
$currency_code = $conf->currency; $currency_code = $conf->currency;
print load_fiche_titre($langs->trans("SupplierProposalNew"), '', 'supplier_proposal'); print load_fiche_titre($langs->trans("SupplierProposalNew"), '', 'supplier_proposal');

View File

@ -259,7 +259,7 @@ $fuserstatic = new User($db);
$form = new Form($db); $form = new Form($db);
$formfile = new FormFile($db); $formfile = new FormFile($db);
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewGroup"), '', 'object_group'); print load_fiche_titre($langs->trans("NewGroup"), '', 'object_group');
dol_set_focus('#nom'); dol_set_focus('#nom');

View File

@ -272,7 +272,7 @@ if ($result > 0) {
print '</tr>'; print '</tr>';
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
// $listofemails=$object->thirdparty_and_contact_email_array(); // $listofemails=$object->thirdparty_and_contact_email_array();
if ($object->email) { if ($object->email) {
$actions = array(); $actions = array();

View File

@ -158,7 +158,7 @@ $help_url = 'EN:Module_Products#Variants';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("ProductAttribute")), '', 'object_' . $object->picto); print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("ProductAttribute")), '', 'object_' . $object->picto);
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';

View File

@ -240,7 +240,7 @@ llxHeader('', $title, $help_url);
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
if (empty($permissiontoadd)) { if (empty($permissiontoadd)) {
accessforbidden($langs->trans('NotEnoughPermissions'), 0, 1); accessforbidden($langs->trans('NotEnoughPermissions'), 0, 1);
exit; exit;

View File

@ -118,7 +118,7 @@ $formfile = new FormFile($db);
llxHeader('', 'WebsiteAccount', ''); llxHeader('', 'WebsiteAccount', '');
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("WebsiteAccount"))); print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("WebsiteAccount")));
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';

View File

@ -186,7 +186,7 @@ llxHeader('', $title, $help_url);
<?php <?php
// Part to create // Part to create
if ($action == 'create') { if ($action == 'create' || (empty($action) && empty($id))) {
print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Workstation")), '', 'object_'.$object->picto); print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Workstation")), '', 'object_'.$object->picto);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';