本文整理汇总了PHP中TicketValidation::dropdownValidator方法的典型用法代码示例。如果您正苦于以下问题:PHP TicketValidation::dropdownValidator方法的具体用法?PHP TicketValidation::dropdownValidator怎么用?PHP TicketValidation::dropdownValidator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TicketValidation
的用法示例。
在下文中一共展示了TicketValidation::dropdownValidator方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showForm
//.........这里部分代码省略.........
} else {
$idurgency = "value_urgency" . mt_rand();
echo "<input id='{$idurgency}' type='hidden' name='urgency' value='" . $this->fields["urgency"] . "'>";
echo $tt->getBeginHiddenFieldValue('urgency');
echo parent::getUrgencyName($this->fields["urgency"]);
echo $tt->getEndHiddenFieldValue('urgency', $this);
}
echo "</td>";
// Display validation state
echo "<th>";
if (!$ID) {
echo $tt->getBeginHiddenFieldText('_add_validation');
printf(__('%1$s%2$s'), __('Approval request'), $tt->getMandatoryMark('_add_validation'));
echo $tt->getEndHiddenFieldText('_add_validation');
} else {
echo $tt->getBeginHiddenFieldText('global_validation');
_e('Approval');
echo $tt->getEndHiddenFieldText('global_validation');
}
echo "</th>";
echo "<td>";
if (!$ID) {
echo $tt->getBeginHiddenFieldValue('_add_validation');
$validation_right = '';
if ($values['type'] == self::INCIDENT_TYPE && Session::haveRight('ticketvalidation', TicketValidation::CREATEINCIDENT)) {
$validation_right = 'validate_incident';
}
if ($values['type'] == self::DEMAND_TYPE && Session::haveRight('ticketvalidation', TicketValidation::CREATEREQUEST)) {
$validation_right = 'validate_request';
}
if (!empty($validation_right)) {
echo "<input type='hidden' name='_add_validation' value='" . $values['_add_validation'] . "'>";
$params = array('name' => "users_id_validate", 'entity' => $this->fields['entities_id'], 'right' => $validation_right, 'users_id_validate' => $values['users_id_validate']);
TicketValidation::dropdownValidator($params);
}
echo $tt->getEndHiddenFieldValue('_add_validation', $this);
if ($tt->isPredefinedField('global_validation')) {
echo "<input type='hidden' name='global_validation' value='" . $tt->predefined['global_validation'] . "'>";
}
} else {
echo $tt->getBeginHiddenFieldValue('global_validation');
if (Session::haveRightsOr('ticketvalidation', TicketValidation::getCreateRights()) && $canupdate) {
TicketValidation::dropdownStatus('global_validation', array('global' => true, 'value' => $this->fields['global_validation']));
} else {
echo TicketValidation::getStatus($this->fields['global_validation']);
}
echo $tt->getEndHiddenFieldValue('global_validation', $this);
}
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<th>" . $tt->getBeginHiddenFieldText('impact');
printf(__('%1$s%2$s'), __('Impact'), $tt->getMandatoryMark('impact'));
echo $tt->getEndHiddenFieldText('impact') . "</th>";
echo "<td>";
echo $tt->getBeginHiddenFieldValue('impact');
if ($canupdate) {
$idimpact = self::dropdownImpact(array('value' => $this->fields["impact"]));
} else {
$idimpact = "value_impact" . mt_rand();
echo "<input id='{$idimpact}' type='hidden' name='impact' value='" . $this->fields["impact"] . "'>";
echo parent::getImpactName($this->fields["impact"]);
}
echo $tt->getEndHiddenFieldValue('impact', $this);
echo "</td>";
echo "<th>" . $tt->getBeginHiddenFieldText('locations_id');
printf(__('%1$s%2$s'), __('Location'), $tt->getMandatoryMark('locations_id'));