Changes for page 新しい学校ページを作成
Last modified by Super Admin on 2026/03/22 00:39
From version
19.1
edited by Super Admin
on 2026/03/08 23:59
on 2026/03/08 23:59
Change comment:
There is no comment for this version
To version
7.1
edited by XWikiGuest
on 2026/03/06 16:47
on 2026/03/06 16:47
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. superadmin1 +XWiki.XWikiGuest - Content
-
... ... @@ -3,7 +3,7 @@ 3 3 4 4 #set($currentUser = $xcontext.user) 5 5 #if($currentUser == 'XWiki.XWikiGuest') 6 - {{error}}学校ページの作成にはログインが必要です。[[ログイン>>path:/bin/login/XWiki/XWikiLogin]]してください。{{/error}} 6 + {{error}}学校ページの作成にはログインが必要です。[[ログイン>>path:/xwiki/bin/login/XWiki/XWikiLogin]]してください。{{/error}} 7 7 #stop 8 8 #end 9 9 ... ... @@ -12,9 +12,8 @@ 12 12 #set($schoolCode = $request.schoolCode) 13 13 #set($schoolName = $request.schoolName) 14 14 15 - ## バリデーション: 学校コードが13文字の文科省形式であること(例: D112310000377) 16 - ## 形式: 学校種(C1/C2/D1/D2) + 都道府県(2桁) + 設置区分(1桁) + 学校番号(7桁) + 検査数字(1桁) 17 - #if(!$schoolCode || $schoolCode.length() != 13 || !$schoolCode.matches('^[CD][12]\d{11}$')) 15 + ## バリデーション: 学校コードが13桁の数字であること(文科省形式) 16 + #if(!$schoolCode || $schoolCode.length() != 13 || !$schoolCode.matches('^\d{13}$')) 18 18 {{error}}学校コードが不正です。学校名検索から選択してください。{{/error}} 19 19 #stop 20 20 #end ... ... @@ -47,7 +47,7 @@ 47 47 <div class="form-group"> 48 48 <label class="form-label">学校を検索 <span class="required-mark">*</span></label> 49 49 <div class="search-input-wrap"> 50 - <input type="text" id="schoolSearchInput" class="form-input se arch-input-padded"49 + <input type="text" id="schoolSearchInput" class="form-input" style="padding-left:36px;" 51 51 placeholder="学校名で検索(例: 日比谷、渋谷、北野...)" 52 52 autocomplete="off" /> 53 53 <span class="search-input-icon"><svg class="ico" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg></span> ... ... @@ -82,7 +82,7 @@ 82 82 <div class="create-ready-box"> 83 83 <svg class="ico" viewBox="0 0 24 24" stroke-width="2.5"><path d="M20 6L9 17l-5-5"/></svg> この学校のページはまだ作成されていません。 84 84 </div> 85 - <button type="submit" class="btn-save btn-full-width">ページを作成</button>84 + <button type="submit" class="btn-save" style="width:100%;">ページを作成</button> 86 86 </div> 87 87 </form> 88 88 ... ... @@ -101,7 +101,7 @@ 101 101 102 102 // schools.json をロード(XWiki添付ファイルとして配置) 103 103 // 配置先: SeitokaiCode.SchoolMasterData の添付ファイル 104 - fetch('/rest/wikis/xwiki/spaces/SeitokaiCode/pages/SchoolMasterData/attachments/schools.json') 103 + fetch('/xwiki/rest/wikis/xwiki/spaces/SeitokaiCode/pages/SchoolMasterData/attachments/schools.json') 105 105 .then(function(r) { return r.json(); }) 106 106 .then(function(data) { schools = data; schoolsLoaded = true; }) 107 107 .catch(function() { ... ... @@ -168,13 +168,13 @@ 168 168 169 169 // 重複チェック(XWikiにページが存在するか確認) 170 170 var targetPage = 'Schools.' + school.code + '.WebHome'; 171 - fetch('/rest/wikis/xwiki/spaces/Schools/spaces/' + school.code + '/pages/WebHome') 170 + fetch('/xwiki/rest/wikis/xwiki/spaces/Schools/spaces/' + school.code + '/pages/WebHome') 172 172 .then(function(r) { 173 173 if (r.ok) { 174 174 // 既存ページあり 175 175 document.getElementById('duplicateWarning').style.display = 'block'; 176 176 document.getElementById('duplicateLink').href = 177 - '/bin/view/Schools/' + school.code + '/'; 176 + '/xwiki/bin/view/Schools/' + school.code + '/'; 178 178 document.getElementById('submitArea').style.display = 'none'; 179 179 } else { 180 180 // 新規作成OK