objectManager: Add support for hiding the reject button, use it for buglinks
This commit is contained in:
committed by
Chris Morgan
parent
e70383def8
commit
f2e17d3af3
@@ -482,6 +482,11 @@ class Bug
|
||||
echo $oTable->GetString();
|
||||
}
|
||||
|
||||
function objectHideReject()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// NOTE: we don't have any editing support for this entry at this time
|
||||
// so output the entry and a field to identify the bug id
|
||||
function outputEditor()
|
||||
|
||||
@@ -271,6 +271,14 @@ class ObjectManager
|
||||
$this->handleMultiPageControls($aClean, FALSE);
|
||||
}
|
||||
|
||||
private function getOptionalSetting($sFunction, $bDefault)
|
||||
{
|
||||
if(!method_exists($this->sClass, $sFunction))
|
||||
return $bDefault;
|
||||
|
||||
return $this->getObject()->$sFunction();
|
||||
}
|
||||
|
||||
/* display the entry for editing */
|
||||
public function display_entry_for_editing($aClean, $sErrors)
|
||||
{
|
||||
@@ -363,7 +371,7 @@ class ObjectManager
|
||||
'class="button" />',"\n";
|
||||
}
|
||||
|
||||
if(!$this->bIsRejected)
|
||||
if(!$this->bIsRejected && !$this->getOptionalSetting("objectHideReject", FALSE))
|
||||
{
|
||||
echo '<input name="sSubmit" type="submit" value="Reject" class="button" '.
|
||||
'/>',"\n";
|
||||
|
||||
Reference in New Issue
Block a user