N°743 Portal: Only editable fields are now passed in forms submit, fixing issue where a portal user could unwillingly change the UserRequest status if a Support Agent had assign the ticket while the portal user was editing.

SVN:trunk[4855]
This commit is contained in:
Guillaume Lajarige
2017-08-09 10:10:53 +00:00
parent df4cad3ff1
commit 7287cab6f4
3 changed files with 132 additions and 155 deletions

View File

@@ -287,11 +287,14 @@ EOF
EOF
);
// Attaching JS widget
$sObjectInformationsUrl = $this->oField->GetInformationEndpoint();
$oOutput->AddJs(
// Additional features if in edition mode
if (!$this->oField->GetReadOnly())
{
// Attaching JS widget
$sObjectInformationsUrl = $this->oField->GetInformationEndpoint();
$oOutput->AddJs(
<<<EOF
$("[data-field-id='{$this->oField->GetId()}'][data-form-path='{$this->oField->GetFormPath()}']").portal_form_field({
$("[data-field-id='{$this->oField->GetId()}'][data-form-path='{$this->oField->GetFormPath()}']").portal_form_field({
'validators': {$this->GetValidatorsAsJson()},
'get_current_value_callback': function(me, oEvent, oData){
var value = null;
@@ -386,11 +389,8 @@ EOF
}
});
EOF
);
);
// Additional features if in edition mode
if (!$this->oField->GetReadOnly())
{
// Rendering table
// - Vars
$sButtonRemoveId = 'btn_remove_' . $this->oField->GetGlobalId();