From fb1ff3388e1f79ad2b68b78421138d2fb93c6b1b Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 18 Aug 2023 08:03:22 +0000 Subject: [PATCH] * Hide client in quickon --- module/repo/ui/create.html.php | 2 +- module/repo/ui/edit.html.php | 2 +- module/repo/zen.php | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/module/repo/ui/create.html.php b/module/repo/ui/create.html.php index d13bf80426..5cf6a14984 100644 --- a/module/repo/ui/create.html.php +++ b/module/repo/ui/create.html.php @@ -118,7 +118,7 @@ formPanel ), formRow ( - setClass('hide-service'), + ($config->isContainer || $config->inQuickon) ? setClass('hidden') : setClass('hide-service'), formGroup ( set::name("client"), diff --git a/module/repo/ui/edit.html.php b/module/repo/ui/edit.html.php index 57111818dd..d7b6a0833f 100644 --- a/module/repo/ui/edit.html.php +++ b/module/repo/ui/edit.html.php @@ -122,7 +122,7 @@ formPanel ), formRow ( - setClass('hide-service'), + ($config->isContainer || $config->inQuickon) ? setClass('hidden') : setClass('hide-service'), formGroup ( set::name("client"), diff --git a/module/repo/zen.php b/module/repo/zen.php index c940d513e7..81468313af 100644 --- a/module/repo/zen.php +++ b/module/repo/zen.php @@ -22,7 +22,14 @@ class repoZen extends repo */ protected function prepareCreate(form $formData, bool $isPipelineServer): object|false { - if(!$this->checkClient()) return false; + if($this->config->inContainer || $this->config->inQuickon) + { + $formData->data->client = $_POST['client'] = $this->post->SCM == 'Subversion' ? 'svn' : 'git'; + } + else + { + if(!$this->checkClient()) return false; + } if(!$this->checkConnection()) return false; $repo = $formData