切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
anyv
6 years ago
提交
2424f18d2288353125b826bba02bf32bcc142216
1 个父辈
6cb6553b
1 个管道 的构建
通过
耗费 0 秒
分类编辑
变更
2
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
14 行增加
和
4 行删除
app/admin/controller/LabelController.php
public/themes/admin_simpleboot3/admin/label/classify_edit.html
app/admin/controller/LabelController.php
查看文件 @
2424f18
...
...
@@ -42,10 +42,19 @@ class LabelController extends AdminBaseController{
*/
public
function
classify_edit
(){
$id
=
$this
->
request
->
param
();
$data
=
Db
::
name
(
'classification'
)
->
where
(
'id'
,
$id
[
'id'
])
->
find
();
$this
->
assign
(
'data'
,
$data
);
return
$this
->
fetch
();
if
(
$this
->
request
->
isPost
()){
$data
=
Db
::
name
(
'classification'
)
->
update
(
$_POST
);
if
(
$data
){
$this
->
success
(
'保存成功'
,
url
(
'Label/classify_edit'
,
array
(
'id'
=>
$_POST
[
'id'
])));
}
else
{
$this
->
error
(
'保存失败!'
);
}
}
else
{
$id
=
$this
->
request
->
param
();
$data
=
Db
::
name
(
'classification'
)
->
where
(
'id'
,
$id
[
'id'
])
->
find
();
$this
->
assign
(
'data'
,
$data
);
return
$this
->
fetch
();
}
}
...
...
public/themes/admin_simpleboot3/admin/label/classify_edit.html
查看文件 @
2424f18
...
...
@@ -16,6 +16,7 @@
<input
class=
"form-control"
type=
"text"
name=
"name"
id=
"title"
required
value=
"{$data.name}"
placeholder=
"请输入分类名称"
/>
</td>
<input
type=
"hidden"
name=
"id"
value=
"{$data.id}"
>
</tr>
</table>
<div
class=
"form-group"
>
...
...
请
注册
或
登录
后发表评论