From a655345c9aa06cc35cd133adba908b2e52e3e5f2 Mon Sep 17 00:00:00 2001 From: xierz Date: Mon, 19 Oct 2020 10:57:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AD=90=E6=A0=8F=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/manager/cms/category/form.ftl | 10 +++++++--- src/main/webapp/WEB-INF/manager/cms/category/index.ftl | 7 +++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/main/webapp/WEB-INF/manager/cms/category/form.ftl b/src/main/webapp/WEB-INF/manager/cms/category/form.ftl index 67685eea..657ae2f5 100644 --- a/src/main/webapp/WEB-INF/manager/cms/category/form.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/category/form.ftl @@ -540,11 +540,15 @@ this.categoryUrlOptionsGet(); this.categoryFlagOptionsGet(); this.form.id = ms.util.getParameter("id"); + this.form.child = ms.util.getParameter("child"); - if (this.form.id) { + this.categoryTypeDisabled = false; + if (this.form.id != undefined && this.form.child == undefined) { + this.categoryTypeDisabled = true; this.get(this.form.id); - } else { - this.categoryTypeDisabled = false; + } else if (this.form.child) { + this.form.id = null; + this.form.categoryId = this.form.child; } } }); diff --git a/src/main/webapp/WEB-INF/manager/cms/category/index.ftl b/src/main/webapp/WEB-INF/manager/cms/category/index.ftl index e8448515..86626509 100644 --- a/src/main/webapp/WEB-INF/manager/cms/category/index.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/category/index.ftl @@ -64,6 +64,9 @@