forked from Gitlink/forgeplus
fix: system notification edit error
This commit is contained in:
parent
1b87a7a733
commit
0d60e58304
|
@ -33,7 +33,6 @@ class Admins::SystemNotificationsController < Admins::BaseController
|
|||
end
|
||||
|
||||
def update
|
||||
|
||||
respond_to do |format|
|
||||
if @notification.update_attributes(notification_params)
|
||||
format.html do
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
# id :integer not null, primary key
|
||||
# subject :string(255)
|
||||
# sub_subject :string(255)
|
||||
# content :string(255)
|
||||
# content :text(65535)
|
||||
# is_top :boolean
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="box search-form-container project-list-form">
|
||||
<div style="line-height: 38px;" class="flex-1"><%= type == "create" ? "新建" : "编辑" %>忽略文件</div>
|
||||
<%= link_to "返回", admins_project_ignores_path, class: "btn btn-default pull-right" %>
|
||||
<div style="line-height: 38px;" class="flex-1"><%= type == "create" ? "新建" : "编辑" %>系统通知</div>
|
||||
<%= link_to "返回", admins_system_notifications_path, class: "btn btn-default pull-right" %>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
$("#admins-system-notification-content").html("<%= j render(partial: 'admins/system_notifications/form', locals: {type: 'create'}) %>")
|
||||
$("#admins-system-notification-content").html("<%= j render(partial: 'admins/system_notifications/form', locals: {type: 'update'}) %>")
|
||||
createMDEditor('system-notification-content-editor', { height: 500, placeholder: '请输入邮件模版' });
|
|
@ -0,0 +1,5 @@
|
|||
class ChangeSystemNotificationContentColumn < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
change_column :system_notifications, :content, :text
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue