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

@@ -352,30 +352,6 @@ EOF
// Closing container
$oOutput->AddHtml('</div>');
// JS FieldChange trigger (:input are not always at the same depth)
$oOutput->AddJs(
<<<EOF
$("#{$this->oField->GetGlobalId()}").off("change keyup").on("change keyup", function(){
var me = this;
$(this).closest(".field_set").trigger("field_change", {
id: $(me).attr("id"),
name: $(me).closest(".form_field").attr("data-field-id"),
value: $(me).val()
});
});
EOF
);
// Attaching JS widget
$oOutput->AddJs(
<<<EOF
$("[data-field-id='{$this->oField->GetId()}'][data-form-path='{$this->oField->GetFormPath()}']").portal_form_field({
'validators': {$this->GetValidatorsAsJson()}
});
EOF
);
}
return $oOutput;