s4

changeset 513:3fcaea2892a8

File accept warnings added
author HIROSE Yuuji <yuuji@gentei.org>
date Tue, 02 Apr 2019 17:34:31 +0900
parents 24a5010a131b
children fa3f78ce3e26
files s4-blog.sh s4-funcs.sh
diffstat 2 files changed, 10 insertions(+), 5 deletions(-) [+]
line diff
     1.1 --- a/s4-blog.sh	Thu Mar 14 16:23:50 2019 +0900
     1.2 +++ b/s4-blog.sh	Tue Apr 02 17:34:31 2019 +0900
     1.3 @@ -397,14 +397,16 @@
     1.4  ' *語群* ' で強調(両側の空白必要、** でもっと強調。*の代わりに _ でも可)
     1.5  - [ ] と - [x] でチェックボックス"
     1.6    touchhelp="${touchpanel:+<p class=\"help\">$help</p>}"
     1.7 +  filehelp="《添付の注意》
     1.8 +$file_accept_help"
     1.9    textform='<div class="fold">
    1.10  <input type="checkbox" id="cmt" checked><label
    1.11   accesskey="c" title="C" for="cmt">コメントする</label><div>
    1.12  <table class="b">
    1.13  <tr><td><textarea name="text" cols="72" rows="4" title="'"$help"'">
    1.14 -</textarea>'"$touchhelp"'</td></tr>
    1.15 -<tr><td>添付ファイル:
    1.16 -<input type="file" name="image"'" $file_accept multiple></td></tr>"'
    1.17 +</textarea>'"$touchhelp</td></tr>
    1.18 +<tr><td>添付ファイル(${filesize_max_MB}以下):"'
    1.19 +<input type="file" name="image"'" $file_accept title=\"$filehelp\" multiple></td></tr>"'
    1.20  </table>
    1.21  <input type="submit" value="送信">
    1.22  <input type="reset" value="リセット"></div></div>
     2.1 --- a/s4-funcs.sh	Thu Mar 14 16:23:50 2019 +0900
     2.2 +++ b/s4-funcs.sh	Tue Apr 02 17:34:31 2019 +0900
     2.3 @@ -30,11 +30,14 @@
     2.4  maximagexy=1600x1600
     2.5  ### maximagexy=400x400
     2.6  filesize_max=$((5*1024*1024))
     2.7 +filesize_max_MB="$((filesize_max/1024/1024))MB"
     2.8  file_accept='accept="image/*,text/*,audio/*,application/vnd.oasis.*,application/pdf,application/x-*"'
     2.9  file_accept_egrep='^(text/|message/|image/|audio/|video/|application/(vnd.oasis|pdf|epub|xml|zip||[xz]-))'
    2.10 -file_warn="
    2.11 -添付可能ファイル: 5MB以内のテキスト、画像、音声、動画、ODT、PDF、
    2.12 +file_accept_help="添付可能ファイル: テキスト、画像、音声、動画、ODT、PDF、
    2.13  圧縮ファイル、データベースファイル
    2.14 +(いずれも ${filesize_max_MB} 以内)
    2.15 +"
    2.16 +file_warn="$file_accept_help
    2.17  [編集]リンクから修正してください。"
    2.18  blogreadflagrowid=0
    2.19  blogcutoffflagrowid=-1