Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make field date_start accessable for GETPOST in proposal #27063

Merged

Conversation

cfoellmann
Copy link
Contributor

makes the field date_start programmatically accessable on the proposal add form

@cfoellmann cfoellmann force-pushed the 19/PR/proposal-hookable-deliverydate branch from 80c5f24 to 384aa6c Compare December 13, 2023 10:24
@@ -2008,7 +2008,8 @@
$sday = date("d", $tmpdte);
print $form->selectDate($syear."-".$smonth."-".$sday, 'date_livraison', '', '', '', "addprop");
} else {
print $form->selectDate(-1, 'date_livraison', '', '', '', "addprop", 1, 1);
$tmp_date_start = GETPOST('date_start') ? : -1;
print $form->selectDate($tmp_date_start, 'date_livraison', '', '', '', "addprop", 1, 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why using name date_start and not date_livraison (in english date_delivery) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are totally right.
I did this because we use it as a "start date" but it makes no sense in code. Force push is done

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Dec 14, 2023
@cfoellmann cfoellmann force-pushed the 19/PR/proposal-hookable-deliverydate branch from 384aa6c to 50bbe66 Compare December 14, 2023 07:58
@cfoellmann
Copy link
Contributor Author

@eldy corrected and force pushed

@cfoellmann
Copy link
Contributor Author

can I change this to branch 19.0

@cfoellmann
Copy link
Contributor Author

ready for 19/20

@@ -2008,7 +2008,8 @@
$sday = date("d", $tmpdte);
print $form->selectDate($syear."-".$smonth."-".$sday, 'date_livraison', '', '', '', "addprop");
} else {
print $form->selectDate(-1, 'date_livraison', '', '', '', "addprop", 1, 1);
$tmp_date_delivery = GETPOST('date_delivery') ? : -1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getpost key name is 'date_delivery'
But name of field 'date_livraison'
Should not be the same ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that everything should be English and whenever possible.
But if you insist on changing this I can

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think too that we must migrate step by step to english. But whatever is language, the name of variable must be consistent in all page.
So if the name of param is xxx for assignement, you should use xxx to read it. But here, there is 2 different name. Is it done on purpose ?

@eldy eldy merged commit 44371d6 into Dolibarr:develop Nov 13, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Some questions or discussions are opened and wait answers of author or other people to be processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants