Skip to content

Commit

Permalink
Merge 385c444 into fbf4eb3
Browse files Browse the repository at this point in the history
  • Loading branch information
ShinjiTanimoto committed Oct 27, 2023
2 parents fbf4eb3 + 385c444 commit c075d9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/assets/javascripts/cms/lib/syntax_checker.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,10 @@ this.Syntax_Checker = (function () {
Syntax_Checker.afterCheck();
}

if (Syntax_Checker.errors.length == 1 && Syntax_Checker.errors[0]['msg'] == "<%= I18n.t('cms.confirm.disallow_edit_ignore_syntax_check') %>") {
Syntax_Checker.reset();
}

Syntax_Checker.resultBox.showResult(checks, Syntax_Checker.errors);
}

Expand Down
2 changes: 1 addition & 1 deletion app/models/cms/syntax_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def check(cur_site:, cur_user:, contents:)
end
end

if !context.errors.empty? && !cur_user.cms_role_permit_any?(cur_site, "edit_cms_ignore_syntax_check")
if !cur_user.cms_role_permit_any?(cur_site, "edit_cms_ignore_syntax_check")
context.errors << {
msg: I18n.t('cms.confirm.disallow_edit_ignore_syntax_check')
}
Expand Down

0 comments on commit c075d9f

Please sign in to comment.