/** * @see Workflow_Transition_Condition::fetch() */ public function fetch() { $html = ''; $html .= $GLOBALS['Language']->getText('workflow_admin', 'label_define_transition_permissions'); $html .= '<br />'; $html .= '<p>'; $html .= plugin_tracker_permission_fetch_selection_field(self::PERMISSION_TRANSITION, $this->transition->getId(), $this->transition->getGroupId()); $html .= '</p>'; return $html; }
/** * Display the html field in the admin ui * @return string html */ protected function fetchAdminFormElement() { $html = ''; $value = ''; if ($this->hasDefaultValue()) { $value = $this->getDefaultValue(); } $html .= '<p class="tracker_field_permissionsonartifact">'; $html .= '<input type="hidden" name="use_artifact_permissions" value="0" />'; $html .= '<input type="checkbox" name="artifact[' . $this->getId() . '][use_artifact_permissions]" id="artifact_' . $this->getId() . '_use_artifact_permissions" value="1"/>'; $html .= '<label for="artifact_' . $this->getId() . '_use_artifact_permissions">' . $GLOBALS['Language']->getText('plugin_tracker_include_artifact', 'permissions_label') . '</label>'; $html .= '</p>'; $html .= plugin_tracker_permission_fetch_selection_field('PLUGIN_TRACKER_ARTIFACT_ACCESS', 0, 0, 'artifact[' . $this->getId() . '][u_groups][]'); return $html; }
/** * Return permission form for the transition * * @param Transition $transition The transition * * @return string html */ protected function fetchWorkflowPermissions($transition) { $html = ''; $html .= '<ul class="workflow_conditions">'; $html .= '<li class="workflow_conditions_perms">'; $html .= $GLOBALS['Language']->getText('workflow_admin', 'label_define_transition_permissions'); $html .= '<br />'; $html .= '<p>'; $html .= plugin_tracker_permission_fetch_selection_field('PLUGIN_TRACKER_WORKFLOW_TRANSITION', $transition->getTransitionId(), $this->tracker->group_id); $html .= '</p>'; $html .= '</li></ul>'; return $html; }