Skip to content

Commit

Permalink
Hide command if using job
Browse files Browse the repository at this point in the history
  • Loading branch information
Universal-Omega authored Feb 18, 2024
1 parent 9a210d2 commit 226cc7c
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions includes/ImportDumpRequestViewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,16 +201,19 @@ public function getFormDescriptor(): array {
$status = $this->importDumpRequestManager->getStatus();

if ( $this->importDumpRequestManager->fileExists() ) {
$fileInfo = $this->context->msg( 'importdump-info-command' )->plaintextParams(
$this->importDumpRequestManager->getCommand()
)->parse();
$fileInfo = '';
if ( !$this->config->get( 'ImportDumpEnableAutomatedJob' ) ) {
$fileInfo = $this->context->msg( 'importdump-info-command' )->plaintextParams(
$this->importDumpRequestManager->getCommand()
)->parse();

$fileInfo .= Html::element( 'button', [
'type' => 'button',
'onclick' => 'navigator.clipboard.writeText( $( \'.mw-message-box-notice code\' ).text() );',
],
$this->context->msg( 'importdump-button-copy' )->text()
);
$fileInfo .= Html::element( 'button', [
'type' => 'button',
'onclick' => 'navigator.clipboard.writeText( $( \'.mw-message-box-notice code\' ).text() );',
],
$this->context->msg( 'importdump-button-copy' )->text()
);
}

if ( $this->importDumpRequestManager->getFileSize() > 0 ) {
$fileInfo .= Html::element( 'br' );
Expand Down

0 comments on commit 226cc7c

Please sign in to comment.