FIXME: conflits params URL et POST
This commit is contained in:
parent
592789c597
commit
69385e6fbf
@ -14,6 +14,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// FIXME: conflit entre paramètres d'URL et paramètres POST (action=filter vs. action=add)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/multicurrency/multicurrency_rates.php
|
* \file htdocs/multicurrency/multicurrency_rates.php
|
||||||
@ -197,8 +198,9 @@ function _mainView($db, $TVisibleColumn, $mode='view', $targetId=NULL) {
|
|||||||
// entire form is inside cell because HTML does not allow forms inside tables unless they are inside cells
|
// entire form is inside cell because HTML does not allow forms inside tables unless they are inside cells
|
||||||
echo '<td>'
|
echo '<td>'
|
||||||
.'<form method="post" id="form-add-new">'
|
.'<form method="post" id="form-add-new">'
|
||||||
.'<input type="hidden" name="action" value="add" />'
|
.'<button class="button" name="action" value="add">'
|
||||||
.'<input class="button" type="submit" value="' . $langs->trans('Add') . '"></a>'
|
. $langs->trans('Add')
|
||||||
|
. '</button>'
|
||||||
.'</form>'
|
.'</form>'
|
||||||
.'</td>';
|
.'</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
@ -307,9 +309,7 @@ function _getCellDefault($rawValue, $mode='view', $inputName='', $formId=NULL) {
|
|||||||
'value' => $rawValue,
|
'value' => $rawValue,
|
||||||
'name' => $inputName,
|
'name' => $inputName,
|
||||||
);
|
);
|
||||||
if ($formId !== NULL) {
|
if ($formId !== NULL) {$inputAttributes['form'] = $formId;}
|
||||||
$inputAttributes['form'] = $formId;
|
|
||||||
}
|
|
||||||
return _tagWithAttributes('input', $inputAttributes);
|
return _tagWithAttributes('input', $inputAttributes);
|
||||||
case 'raw':
|
case 'raw':
|
||||||
return $rawValue;
|
return $rawValue;
|
||||||
@ -345,9 +345,7 @@ function _getCellDate($rawValue, $mode='view', $inputName='', $formId=NULL) {
|
|||||||
'value' => preg_replace('/^(.*?) .*/', '$1', $rawValue),
|
'value' => preg_replace('/^(.*?) .*/', '$1', $rawValue),
|
||||||
'name' => $inputName,
|
'name' => $inputName,
|
||||||
);
|
);
|
||||||
if ($formId !== NULL) {
|
if ($formId !== NULL) {$inputAttributes['form'] = $formId;}
|
||||||
$inputAttributes['form'] = $formId;
|
|
||||||
}
|
|
||||||
return _tagWithAttributes('input', $inputAttributes);
|
return _tagWithAttributes('input', $inputAttributes);
|
||||||
case 'raw':
|
case 'raw':
|
||||||
return $rawValue;
|
return $rawValue;
|
||||||
@ -391,9 +389,7 @@ function _getCellNumber($rawValue, $mode='view', $inputName='', $formId=NULL) {
|
|||||||
'pattern' => '\d+(?:[.,]\d+)?',
|
'pattern' => '\d+(?:[.,]\d+)?',
|
||||||
'required' => 'required',
|
'required' => 'required',
|
||||||
);
|
);
|
||||||
if ($formId !== NULL) {
|
if ($formId !== NULL) {$inputAttributes['form'] = $formId;}
|
||||||
$inputAttributes['form'] = $formId;
|
|
||||||
}
|
|
||||||
return _tagWithAttributes('input', $inputAttributes);
|
return _tagWithAttributes('input', $inputAttributes);
|
||||||
case 'raw':
|
case 'raw':
|
||||||
return $rawValue;
|
return $rawValue;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user