소스 검색

Hide reject media checkbox when not relevant. (#8426)

master
M Somerville 5 년 전
committed by Eugen Rochko
부모
커밋
29da56cf75
2개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. +7
    -0
      app/javascript/packs/admin.js
  2. +3
    -0
      app/views/admin/domain_blocks/new.html.haml

+ 7
- 0
app/javascript/packs/admin.js 파일 보기

@@ -39,3 +39,10 @@ delegate(document, '.media-spoiler-hide-button', 'click', () => {
element.click();
});
});

delegate(document, '#domain_block_severity', 'change', ({ target }) => {
const rejectMediaDiv = document.querySelector('.input.with_label.domain_block_reject_media');
if (rejectMediaDiv) {
rejectMediaDiv.style.display = (target.value === 'suspend') ? 'none' : 'block';
}
});

+ 3
- 0
app/views/admin/domain_blocks/new.html.haml 파일 보기

@@ -1,3 +1,6 @@
- content_for :header_tags do
= javascript_pack_tag 'admin', integrity: true, async: true, crossorigin: 'anonymous'

- content_for :page_title do
= t('.title')



불러오는 중...
취소
저장