dont render required fields indicator if forceOPFile: true, but maxfiles is 0 since the file form will not be visible

merge-requests/208/head
fatchan 5 years ago
parent 2d07621c6b
commit 1aa864adac
  1. 4
      views/includes/postform.pug

@ -34,7 +34,7 @@ section.form-wrapper.flex-center
if !isThread && board.settings.forceOPMessage if !isThread && board.settings.forceOPMessage
.required * .required *
textarea(name='message', rows='5', autocomplete='off' maxlength='4000' required=!isThread && board.settings.forceOPMessage) textarea(name='message', rows='5', autocomplete='off' maxlength='4000' required=!isThread && board.settings.forceOPMessage)
if board.settings.maxFiles !== 0 if board.settings.maxFiles > 0
section.postform-row section.postform-row
.postform-label Files .postform-label Files
if !isThread && board.settings.forceOPFile if !isThread && board.settings.forceOPFile
@ -55,7 +55,7 @@ section.form-wrapper.flex-center
.postform-col .postform-col
iframe.captcha(src='/captcha.html' width=200 height=110 scrolling='no') iframe.captcha(src='/captcha.html' width=200 height=110 scrolling='no')
input(type='text', name='captcha', autocomplete='off' placeholder='captcha text' maxlength='6' required) input(type='text', name='captcha', autocomplete='off' placeholder='captcha text' maxlength='6' required)
if !isThread && (board.settings.forceOPFile || board.settings.forceOPMessage || board.settings.forceOPSubject) if !isThread && ((board.settings.forceOPFile && board.settings.maxFiles > 0) || board.settings.forceOPMessage || board.settings.forceOPSubject)
small small
span.required * span.required *
| = required field | = required field

Loading…
Cancel
Save