From 29ebc67e43b92a53a311f57bd4db416341ece7f3 Mon Sep 17 00:00:00 2001 From: daitingting Date: Wed, 27 Dec 2023 02:07:07 +0000 Subject: [PATCH] * Set desc's control is editor. --- module/zahost/config/form.php | 4 ++-- module/zahost/ui/view.html.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/zahost/config/form.php b/module/zahost/config/form.php index 3814b9aad1..6b119439da 100644 --- a/module/zahost/config/form.php +++ b/module/zahost/config/form.php @@ -16,7 +16,7 @@ $config->zahost->form->create['type'] = array('required' => false, 'type' $config->zahost->form->create['status'] = array('required' => false, 'type' => 'string', 'default' => 'wait'); $config->zahost->form->create['createdBy'] = array('required' => false, 'type' => 'string', 'default' => isset($app->user->account) ? $app->user->account : ''); $config->zahost->form->create['createdDate'] = array('required' => false, 'type' => 'date', 'default' => helper::now()); -$config->zahost->form->create['desc'] = array('required' => false, 'type' => 'string', 'default' => ''); +$config->zahost->form->create['desc'] = array('required' => false, 'type' => 'string', 'default' => '', 'control' => 'editor'); $config->zahost->form->create['zap'] = array('required' => false, 'type' => 'string', 'default' => $config->zahost->defaultPort); $config->zahost->form->edit = array(); @@ -29,4 +29,4 @@ $config->zahost->form->edit['memory'] = array('required' => true, 'type' => $config->zahost->form->edit['diskSize'] = array('required' => true, 'type' => 'float', 'default' => 0); $config->zahost->form->edit['editedBy'] = array('required' => false, 'type' => 'string', 'default' => isset($app->user->account) ? $app->user->account : ''); $config->zahost->form->edit['editedDate'] = array('required' => false, 'type' => 'date', 'default' => helper::now()); -$config->zahost->form->edit['desc'] = array('required' => false, 'type' => 'string', 'default' => ''); +$config->zahost->form->edit['desc'] = array('required' => false, 'type' => 'string', 'default' => '', 'control' => 'editor'); diff --git a/module/zahost/ui/view.html.php b/module/zahost/ui/view.html.php index 8427e12b74..3830809539 100644 --- a/module/zahost/ui/view.html.php +++ b/module/zahost/ui/view.html.php @@ -192,7 +192,8 @@ detailBody section ( set::title($lang->zahost->desc), - !empty($zahost->desc) ? html(htmlspecialchars_decode($zahost->desc)) : $lang->noData + set::content($zahost->desc), + set::useHtml(true) ) ), sectionList