include ../mixins/filelabel.pug - const isThread = thread != null; - const subjectRequired = (!isThread && board.settings.forceThreadSubject); - const messageRequired = (!isThread && board.settings.forceThreadMessage) || (isThread && board.settings.forceReplyMessage); - const fileRequired = (!isThread && board.settings.forceThreadFile) || (isThread && board.settings.forceReplyFile); section.form-wrapper.flex-center form.form-post#postform(action=`/forms/board/${board._id}/${modview ? 'mod' : ''}post`, enctype='multipart/form-data', method='POST' data-reset-on-submit='true') if modview input(type='hidden' name='_csrf' value=csrf) input(type='hidden' name='thread' value=isThread ? thread.postId : null) section.row.jsonly .noselect#postform-dragHandle #{isThread ? 'New Reply' : 'New Thread'} if board.settings.forceAnon && !modview section.row .label Sage label.postform-style.ph-5 input(type='checkbox', name='email', value='sage') a.close.postform-style(href='#!') × include ./subjectfield.pug else section.row .label #{__("Name")} input.mr-1(type='text', name='name', placeholder=board.settings.defaultName maxlength=globalLimits.fieldLength.name) a.close.postform-style(href='#!') × if board.settings.sageOnlyEmail && !modview section.row .label Sage label.postform-style.ph-5 input(type='checkbox', name='email', value='sage') else section.row .label Email input(type='text', name='email', autocomplete='off' maxlength=globalLimits.fieldLength.email) include ./subjectfield.pug section.row .label span Message if messageRequired span.required * - const minLength = (isThread ? board.settings.minReplyMessageLength : board.settings.minThreadMessageLength) || 0; - const maxLength = Math.min((isThread ? board.settings.maxReplyMessageLength : board.settings.maxThreadMessageLength), globalLimits.fieldLength.message) || globalLimits.fieldLength.message; textarea#message(name='message', rows='5', autocomplete='off' minlength=minLength maxlength=maxLength required=messageRequired) if board.settings.maxFiles > 0 && Object.values(board.settings.allowedFileTypes).some(x => x === true) - const maxFiles = board.settings.maxFiles; section.row .label span File#{maxFiles > 1 ? 's' : ''} if fileRequired span.required * | | if maxFiles > 1 small Max #{maxFiles} files small #{postFilesSize} total span.col +filelabel('file', maxFiles) input#file(type='file', name='file' multiple required=fileRequired ) .upload-list(data-spoilers=(board.settings.userPostSpoiler ? 'true' : 'false') data-strip-filenames='true') if board.settings.userPostSpoiler noscript label.noselect.postform-style.ph-5.ml-1.fh input(type='checkbox', name='spoiler_all', value='true') | Spoiler if board.settings.enableTegaki && board.settings.allowedFileTypes.image === true section.row.jsonly .label Tegaki input.dummy-link.tegaki-button(type='button', value='Draw') if board.settings.allowedFileTypes.other === true label.noselect.postform-style.ph-5.ml-1.fh input(type='checkbox' name='tegakireplay') | Replayable? if board.settings.userPostSpoiler || board.settings.userPostDelete || board.settings.userPostUnlink || modview section.row .label Password input(type='password', name='postpassword', placeholder='Password to delete/spoiler/unlink later' maxlength='50' autocomplete='new-password') if modview || board.settings.customFlags === true - const boardFlags = Object.entries(board.flags) if boardFlags.length > 0 section.row .label Flag select#customflag(name='customflag') option(value='') #{board.settings.geoFlags === true ? 'Geographic Flag' : 'None'} each flag in boardFlags option(value=flag[0] data-src=`/flag/${board._id}/${flag[1]}`) #{flag[0]} img.jsonly#selected-flag if ((board.settings.captchaMode === 1 && !isThread) || board.settings.captchaMode === 2) && !modview if captchaOptions.type === 'text' include ./captchasidelabel.pug else include ./captchaexpand.pug input#submitpost(type='submit', value=`New ${isThread ? 'Reply' : 'Thread'}`) a.collapse.no-decoration.post-button(href='#postform') [#{isThread ? 'New Reply' : 'New Thread'}]