mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-02 15:08:45 +02:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user