-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
make field date_start accessable for GETPOST in proposal #27063
Conversation
80c5f24
to
384aa6c
Compare
htdocs/comm/propal/card.php
Outdated
@@ -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); |
There was a problem hiding this comment.
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) ?
There was a problem hiding this comment.
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
384aa6c
to
50bbe66
Compare
@eldy corrected and force pushed |
can I change this to branch |
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; |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 ?
makes the field
date_start
programmatically accessable on the proposal add form