Beispiel #1
0
echo $arCurrentValues["show_comment"] == "N" ? " selected" : "";
?>
><?php 
echo GetMessage("BPAA_PD_NO");
?>
</option>
		</select>
	</td>
</tr>
<tr>
	<td align="right"><?php 
echo GetMessage("BPAR_PD_COMMENT_LABEL_MESSAGE");
?>
:</td>
	<td><?php 
echo CBPDocument::ShowParameterField("string", 'comment_label_message', $arCurrentValues['comment_label_message'], array('size' => '50'));
?>
</td>
</tr>
<tr>
	<td align="right"><?php 
echo GetMessage("BPAA_PD_TIMEOUT_DURATION");
?>
:<br/><?php 
echo GetMessage("BPAA_PD_TIMEOUT_DURATION_HINT");
?>
</td>
	<td valign="top">
		<input type="text" name="timeout_duration" id="id_timeout_duration" value="<?php 
echo htmlspecialcharsbx($arCurrentValues["timeout_duration"]);
?>
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
?>

<?php 
foreach ($arAllowableOperations as $operationKey => $operationValue) {
    ?>
	<tr>
		<td align="right" width="40%"><?php 
    echo str_replace("#OP#", $operationValue, GetMessage("BPSA_PD_PERM"));
    ?>
:</td>
		<td width="60%">
			<?php 
    echo CBPDocument::ShowParameterField("user", 'permission_' . $operationKey, $arCurrentValues["permission_" . $operationKey], array());
    ?>
		</td>
	</tr>
	<?php 
}
?>
<tr>
	<td align="right" width="40%"><?php 
echo GetMessage("BPSA_PD_PERM_REWRITE");
?>
:</td>
	<td width="60%">
		<input type="checkbox" name="rewrite" value="Y"<?php 
echo $arCurrentValues["rewrite"] != "N" ? " checked" : "";
?>
Beispiel #3
0
    public static function GetPropertiesDialog($documentType, $activityName, $workflowTemplate, $workflowParameters, $workflowVariables, $currentValues = null, $formName = "")
    {
        $runtime = CBPRuntime::GetRuntime();
        $map = array('AuthUserId', 'SetStatusMessage', 'StatusMessage', 'UseSubscription', 'TimeoutDuration', 'TimeoutDurationType');
        $activityData = self::getRestActivityData();
        $properties = isset($activityData['PROPERTIES']) && is_array($activityData['PROPERTIES']) ? $activityData['PROPERTIES'] : array();
        foreach ($properties as $name => $property) {
            if (!in_array($name, $map)) {
                $map[] = $name;
            }
        }
        if (!is_array($currentValues)) {
            $currentValues = array();
            $currentActivity =& CBPWorkflowTemplateLoader::FindActivityByName($workflowTemplate, $activityName);
            if (is_array($currentActivity['Properties'])) {
                foreach ($map as $k) {
                    if (array_key_exists($k, $currentActivity['Properties'])) {
                        if ($k == 'AuthUserId') {
                            $currentValues[strtolower($k)] = CBPHelper::UsersArrayToString('user_' . $currentActivity['Properties'][$k], $workflowTemplate, $documentType);
                        } else {
                            $currentValues[strtolower($k)] = $currentActivity['Properties'][$k];
                        }
                    } else {
                        if (!is_array($currentValues) || !array_key_exists($map[$k], $currentValues)) {
                            $currentValues[strtolower($k)] = "";
                        }
                    }
                }
            } else {
                foreach ($map as $k) {
                    $currentValues[strtolower($k)] = "";
                }
            }
        }
        if (strlen($currentValues['statusmessage']) <= 0) {
            $currentValues['statusmessage'] = Loc::getMessage('BPRA_DEFAULT_STATUS_MESSAGE');
        }
        if (strlen($currentValues["timeoutdurationtype"]) <= 0) {
            $currentValues["timeoutdurationtype"] = "s";
        }
        if ((int) $currentValues["authuserid"] <= 0) {
            $currentValues["authuserid"] = CBPHelper::UsersArrayToString('user_' . $activityData['AUTH_USER_ID'], $workflowTemplate, $documentType);
        }
        if (!empty($activityData['USE_SUBSCRIPTION'])) {
            $currentValues['usesubscription'] = $activityData['USE_SUBSCRIPTION'];
        }
        /** @var CBPDocumentService $documentService */
        $documentService = $runtime->GetService("DocumentService");
        $activityDocumentType = is_array($activityData['DOCUMENT_TYPE']) ? $activityData['DOCUMENT_TYPE'] : $documentType;
        foreach ($properties as $name => $property) {
            $required = CBPHelper::getBool($property['REQUIRED']);
            $value = !CBPHelper::isEmptyValue($currentValues[strtolower($name)]) ? $currentValues[strtolower($name)] : $property['DEFAULT'];
            ?>
			<tr>
				<td align="right" width="40%" valign="top">
					<span class="<?php 
            echo $required ? 'adm-required-field' : '';
            ?>
">
						<?php 
            echo htmlspecialcharsbx(RestActivityTable::getLocalization($property['NAME'], LANGUAGE_ID));
            ?>
:
					</span>
					<?php 
            if (isset($property['DESCRIPTION'])) {
                ?>
					<br/><?php 
                echo htmlspecialcharsbx(RestActivityTable::getLocalization($property['DESCRIPTION'], LANGUAGE_ID));
                ?>
					<?php 
            }
            ?>
				</td>
				<td width="60%">
					<?php 
            echo $documentService->getFieldInputControl($activityDocumentType, $property, array('Field' => strtolower($name), 'Form' => $formName), $value, true, false);
            ?>
				</td>
			</tr>

		<?php 
        }
        if (static::checkAdminPermissions()) {
            ?>
			<tr>
				<td align="right" width="40%" valign="top"><span class=""><?php 
            echo Loc::getMessage("BPRA_PD_USER_ID");
            ?>
:</span></td>
				<td width="60%">
					<?php 
            echo CBPDocument::ShowParameterField("user", 'authuserid', $currentValues['authuserid'], array('rows' => '1'));
            ?>
				</td>
			</tr>
		<?php 
        }
        ?>
			<tr>
				<td align="right"><?php 
        echo Loc::getMessage("BPRA_PD_SET_STATUS_MESSAGE");
        ?>
:</td>
				<td>
					<select name="setstatusmessage">
						<option value="Y"<?php 
        echo $currentValues["setstatusmessage"] == "Y" ? " selected" : "";
        ?>
><?php 
        echo Loc::getMessage("BPRA_PD_YES");
        ?>
</option>
						<option value="N"<?php 
        echo $currentValues["setstatusmessage"] == "N" ? " selected" : "";
        ?>
><?php 
        echo Loc::getMessage("BPRA_PD_NO");
        ?>
</option>
					</select>
				</td>
			</tr>
			<tr>
				<td align="right"><?php 
        echo Loc::getMessage("BPRA_PD_STATUS_MESSAGE");
        ?>
:</td>
				<td valign="top"><?php 
        echo CBPDocument::ShowParameterField("string", 'statusmessage', $currentValues['statusmessage'], array('size' => '45'));
        ?>
</td>
			</tr>
			<tr>
				<td align="right"><?php 
        echo Loc::getMessage("BPRA_PD_USE_SUBSCRIPTION");
        ?>
:</td>
				<td>
					<select name="usesubscription" <?php 
        echo !empty($activityData['USE_SUBSCRIPTION']) ? 'disabled' : '';
        ?>
>
						<option value="Y"<?php 
        echo $currentValues["usesubscription"] == 'Y' ? " selected" : "";
        ?>
><?php 
        echo Loc::getMessage("BPRA_PD_YES");
        ?>
</option>
						<option value="N"<?php 
        echo $currentValues["usesubscription"] == 'N' ? " selected" : "";
        ?>
><?php 
        echo Loc::getMessage("BPRA_PD_NO");
        ?>
</option>
					</select>
				</td>
			</tr>
			<?php 
        if ($activityData['USE_SUBSCRIPTION'] != 'N') {
            ?>
			<tr>
				<td align="right"><?php 
            echo Loc::getMessage("BPRA_PD_TIMEOUT_DURATION");
            ?>
:<br/><?php 
            echo Loc::getMessage("BPRA_PD_TIMEOUT_DURATION_HINT");
            ?>
</td>
				<td valign="top">
					<input type="text" name="timeoutduration" id="id_timeoutduration" value="<?php 
            echo htmlspecialcharsbx($currentValues["timeoutduration"]);
            ?>
" size="20" />
					<input type="button" value="..." onclick="BPAShowSelector('id_timeoutduration', 'int');" />
					<select name="timeoutdurationtype">
						<option value="s"<?php 
            echo $currentValues["timeoutdurationtype"] == "s" ? " selected" : "";
            ?>
><?php 
            echo Loc::getMessage("BPRA_PD_TIME_S");
            ?>
</option>
						<option value="m"<?php 
            echo $currentValues["timeoutdurationtype"] == "m" ? " selected" : "";
            ?>
><?php 
            echo Loc::getMessage("BPRA_PD_TIME_M");
            ?>
</option>
						<option value="h"<?php 
            echo $currentValues["timeoutdurationtype"] == "h" ? " selected" : "";
            ?>
><?php 
            echo Loc::getMessage("BPRA_PD_TIME_H");
            ?>
</option>
						<option value="d"<?php 
            echo $currentValues["timeoutdurationtype"] == "d" ? " selected" : "";
            ?>
><?php 
            echo Loc::getMessage("BPRA_PD_TIME_D");
            ?>
</option>
					</select>
				</td>
			</tr>
			<?php 
        }
    }
    ?>
</option>
			<?php 
}
?>
		</select>
	</td>
</tr>
<tr>
	<td align="right" width="40%" valign="top"><span class="adm-required-field"><?php 
echo GetMessage("BPCRU_PD_USER1");
?>
:</span></td>
	<td width="60%">
		<?php 
echo CBPDocument::ShowParameterField("user", 'reserve_user_parameter', $arCurrentValues['reserve_user_parameter'], array('rows' => '2'));
?>
	</td>
</tr>
<tr>
	<td align="right"><?php 
echo GetMessage("BPCRU_PD_SKIP_ABSENT");
?>
:</td>
	<td>
		<select name="skip_absent">
			<option value="Y"<?php 
echo $arCurrentValues["skip_absent"] != "N" ? " selected" : "";
?>
><?php 
echo GetMessage("BPCRU_PD_YES");
	var act_id = BX('id_activity_name');
	if(act_id.style.display == 'none')
		act_id.style.display = '';
	else
		act_id.style.display = 'none';
}
</script>
<tr>
	<td align="right" width="40%"><?php 
echo GetMessage("BIZPROC_AS_ACT_TITLE");
?>
</td>
	<td width="60%">
		<table width="100%"><tr>
		<td width="95%"><?php 
echo CBPDocument::ShowParameterField("string", "title", $val, array("size" => 50, "id" => "bpastitle"));
?>
</td>
		<td width="5%">[<a href="javascript:void(0)" onclick="HideShowId()" title="<?php 
echo GetMessage("BP_ACT_SET_ID_SHOWHIDE");
?>
"><?php 
echo GetMessage("BP_ACT_SET_ID");
?>
</a>]</td>
		</tr></table>
	</td>
</tr>
<tr <?php 
if (!$bShowId) {
    ?>
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
?>

<?php 
?>
<tr>
	<td align="right" width="40%"><?php 
echo GetMessage("BPSFA_PD_STATE");
?>
:</td>
	<td width="60%">
		<?php 
echo CBPDocument::ShowParameterField("string", 'target_state_title', $arCurrentValues['target_state_title'], array('size' => '50'));
?>
	</td>
</tr>
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
?>

<tr>
	<td align="right" width="40%"><?php 
echo GetMessage("BPHEEA_PD_USERS");
?>
:</td>
	<td width="60%">
		<?php 
echo CBPDocument::ShowParameterField("user", 'permission', $arCurrentValues["permission"], array());
?>
	</td>
</tr>

<?php 
if ($allowSetStatus) {
    ?>
<tr>
	<td align="right" width="40%"><?php 
    echo GetMessage("BPHEEA_PD_SET_STATE");
    ?>
:</td>
	<td width="60%">
		<select name="setstate">
		<option value="">(<?php 
    echo GetMessage("BPHEEA_PD_NOT_SET");