This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
AI开发
Register
Sign In
Gitlink
/
forgeplus
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
16
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
Merge pull request '新增关闭站点时必须填写理由' (
#245
) from KingChan/forgeplus:chenjing into standalone_develop
pull/347/head
KingChan
2 years ago
parent
d79213d14f
1cd25c188c
commit
515bf4663d
1 changed files
with
6 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-2
app/controllers/admins/site_pages_controller.rb
+ 6
- 2
app/controllers/admins/site_pages_controller.rb
View File
@@ -29,8 +29,12 @@ class Admins::SitePagesController < Admins::BaseController
end
def update
@site_page.update(update_params)
flash[:success] = '保存成功'
if update_params[:state] == "false" && update_params[:state_description].blank?
flash[:danger] = '关闭站点理由不能为空'
else
@site_page.update(update_params)
flash[:success] = '保存成功'
end
render 'edit'
end
Write
Preview
Loading…
Cancel
Save