Documentation

ShowTaskForm

return CBPActivity::CallStaticMethod(
     $arTask["ACTIVITY"],
     "ShowTaskForm",
     array(
         $arTask,
         $userId,
         $userName,
         $arRequest
     )
)

This method returns an array of two elements: first - part of HTML form (field for comment, fields to input additional data), second - HTML form buttons (Acknowledged, Confirm and etc.)

Note: This method receives an array of configuration parameters and generates scripts, required to show file dialog. Static method.

Method parameters

ParameterDescription
$arTaskArray with task parameters.
$userIdUser that requests task form.
$userNameUser name.
$arRequestData to fill out the form (for example, when the user has filled out the form, but it didn't pass validation - the data that user has inputted previously is passed so that the inputted information wouldn't be lost when the page reloads).

Examples

return array(
    '<tr><td valign="top" width="40%" align="right" class="bizproc-field-name">'.(strlen($arTask["PARAMETERS"]["CommentLabelMessage"]) > 0 ? 
    $arTask["PARAMETERS"]["CommentLabelMessage"] : GetMessage("BPAA_ACT_COMMENT")).':</td>'.
    '<td valign="top" width="60%" class="bizproc-field-value">'.
    '<textarea rows="3" cols="50" name="task_comment"></textarea>'.
    '</td></tr>',
    '<input type="submit" name="approve" value="'.(strlen($arTask["PARAMETERS"]["TaskButton1Message"]) > 0 ? 
    $arTask["PARAMETERS"]["TaskButton1Message"] : GetMessage("BPAA_ACT_BUTTON1")).'"/>'.
    '<input type="submit" name="nonapprove" value="'.(strlen($arTask["PARAMETERS"]["TaskButton2Message"]) > 0 ? 
    $arTask["PARAMETERS"]["TaskButton2Message"] : GetMessage("BPAA_ACT_BUTTON2")).'"/>'
);


© «Bitrix24», 2001-2024
Up