Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
em
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ichikawa
em
Commits
e6414617
Commit
e6414617
authored
Jan 12, 2024
by
Kim Gyeongeun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#56952 設問設定機能追加(アンケート区分別、グレーアウトが効かない問題修正)
#56950 アンケートの設問コピー機能(条件付必須項目がコピーされない問題修正)
parent
bce18cc5
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
352 additions
and
27 deletions
+352
-27
src/main/java/jp/agentec/sinaburocast/service/QuestionService.java
+25
-3
src/main/webapp/WEB-INF/view/mb/user/enquete/enquete_pub.html
+41
-0
src/main/webapp/WEB-INF/view/mb/user/enquete/enquete_web_rec.html
+41
-0
src/main/webapp/WEB-INF/view/sp/user/enquete/enquete_pub.html
+71
-0
src/main/webapp/WEB-INF/view/sp/user/enquete/enquete_web_rec.html
+71
-0
src/main/webapp/WEB-INF/view/user/enquete/enquete_pub.html
+52
-12
src/main/webapp/WEB-INF/view/user/enquete/enquete_web_rec.html
+51
-12
No files found.
src/main/java/jp/agentec/sinaburocast/service/QuestionService.java
View file @
e6414617
...
@@ -96,7 +96,7 @@ public class QuestionService extends AbstractService<Question> {
...
@@ -96,7 +96,7 @@ public class QuestionService extends AbstractService<Question> {
}
}
public
List
<
Question
>
findAllByEnqueteId
(
Integer
eid
)
{
public
List
<
Question
>
findAllByEnqueteId
(
Integer
eid
)
{
return
select
().
where
(
new
SimpleWhere
().
eq
(
"enqueteId"
,
eid
).
eq
(
"delFlg"
,
SinaburoConstant
.
DelFlg
.
NOT_DEL
)).
getResultList
();
return
select
().
where
(
new
SimpleWhere
().
eq
(
"enqueteId"
,
eid
).
eq
(
"delFlg"
,
SinaburoConstant
.
DelFlg
.
NOT_DEL
)).
orderBy
(
"questionId"
).
getResultList
();
}
}
...
@@ -276,18 +276,40 @@ public class QuestionService extends AbstractService<Question> {
...
@@ -276,18 +276,40 @@ public class QuestionService extends AbstractService<Question> {
List
<
Question
>
questionList
=
findAllByEnqueteId
(
originEnqueteId
);
List
<
Question
>
questionList
=
findAllByEnqueteId
(
originEnqueteId
);
// アンケートに設問がない場合
// アンケートに設問がない場合
if
(
CollectionUtils
.
isEmpty
(
questionList
))
{
return
;}
if
(
CollectionUtils
.
isEmpty
(
questionList
))
{
return
;}
HashMap
<
Integer
,
Integer
>
questionIdMap
=
new
HashMap
<
Integer
,
Integer
>();
HashMap
<
String
,
String
>
answerIdStrMap
=
new
HashMap
<
String
,
String
>();
Integer
originQuestionId
;
Integer
originAnswerId
;
for
(
Question
question
:
questionList
)
{
for
(
Question
question
:
questionList
)
{
originQuestionId
=
question
.
questionId
;
question
.
enqueteId
=
newEnqueteId
;
question
.
enqueteId
=
newEnqueteId
;
question
.
version
=
0
;
question
.
version
=
0
;
// 詳細項目情報取得
// 詳細項目情報取得
List
<
Answer
>
answerList
=
answerService
.
findAllByEnqueteId
(
originEnqueteId
,
question
.
q
uestionId
);
List
<
Answer
>
answerList
=
answerService
.
findAllByEnqueteId
(
originEnqueteId
,
originQ
uestionId
);
insertQuestion
(
question
,
loginId
);
insertQuestion
(
question
,
loginId
);
questionIdMap
.
put
(
originQuestionId
,
question
.
questionId
);
for
(
Answer
answer
:
answerList
)
{
for
(
Answer
answer
:
answerList
)
{
originAnswerId
=
answer
.
answerId
;
answer
.
enqueteId
=
newEnqueteId
;
// 新しいquestionIdをセット
// 新しいquestionIdをセット
answer
.
questionId
=
question
.
questionId
;
answer
.
questionId
=
question
.
questionId
;
answer
.
version
=
0
;
answer
.
version
=
0
;
answerService
.
insertAnswer
(
answer
,
loginId
);
answerService
.
insertAnswer
(
answer
,
loginId
);
answerIdStrMap
.
put
(
String
.
valueOf
(
originAnswerId
),
String
.
valueOf
(
answer
.
answerId
));
}
}
// 条件付必須情報コピー
List
<
Question
>
copiedQuestionList
=
findAllByEnqueteId
(
newEnqueteId
);
String
answerIdArrayStr
=
""
;
for
(
Question
copiedQuestion
:
copiedQuestionList
)
{
if
(
copiedQuestion
.
condRequiredQuestionNo
!=
null
&&
!
copiedQuestion
.
condRequiredQuestionNo
.
equals
(
0
))
{
copiedQuestion
.
condRequiredQuestionNo
=
questionIdMap
.
get
(
copiedQuestion
.
condRequiredQuestionNo
);
for
(
String
answerIdStr
:
copiedQuestion
.
condRequiredAnswer
.
split
(
","
))
{
answerIdArrayStr
+=
answerIdStrMap
.
get
(
answerIdStr
)
+
","
;
}
copiedQuestion
.
condRequiredAnswer
=
answerIdArrayStr
.
replaceAll
(
",$"
,
""
);
update
(
copiedQuestion
,
loginId
);
answerIdArrayStr
=
""
;
}
}
}
}
}
}
...
...
src/main/webapp/WEB-INF/view/mb/user/enquete/enquete_pub.html
View file @
e6414617
#set($title = "アンケート")
#set($title = "アンケート")
<script
type=
"text/javascript"
src=
"/em/js/jquery-1.3.1.min.js"
></script>
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
$
(
function
()
{
//条件付必須チェック
$
(
"input[type=radio], input[type=checkbox], input[type=select]"
).
click
(
function
()
{
var
thisQuestionId
=
$
(
this
).
attr
(
"class"
);
var
thisAnswerId
=
$
(
this
).
attr
(
"id"
);
//表示、非表示対象
if
(
$
{
question
.
condRequiredQuestionNo
}
&&
$
{
question
.
condRequiredQuestionNo
}
==
thisQuestionId
)
{
if
(
"${question.condRequiredAnswer}"
.
split
(
","
).
indexOf
(
thisAnswerId
)
<
0
)
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"checked"
,
false
);
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
true
);
}
else
if
(
"${question.controlId}"
==
"2"
||
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
||
"${question.controlId}"
==
"6"
)
{
$
(
"#${question.questionId}"
).
val
(
""
);
$
(
"#${question.questionId}"
).
attr
(
"disabled"
,
true
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
$
(
".${question.questionId}"
).
val
(
""
);
$
(
".${question.questionId}"
).
attr
(
"disabled"
,
true
);
$
(
".${question.questionId}"
).
next
().
hide
();
}
}
else
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
false
);
}
else
if
(
"${question.controlId}"
==
"2"
||
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
||
"${question.controlId}"
==
"6"
)
{
$
(
"#${question.questionId}"
).
attr
(
"disabled"
,
false
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
$
(
".${question.questionId}"
).
attr
(
"disabled"
,
false
);
$
(
".${question.questionId}"
).
next
().
show
();
}
}
}
});
});
// -->
</script>
#end
#end
<!-- preHeader -->
<!-- preHeader -->
#parse( "/WEB-INF/view/common/preHeader_mb.vm" )
#parse( "/WEB-INF/view/common/preHeader_mb.vm" )
<body
style=
"font-family: monospace; width: 240px; border: 2px solid black;"
>
<body
style=
"font-family: monospace; width: 240px; border: 2px solid black;"
>
...
...
src/main/webapp/WEB-INF/view/mb/user/enquete/enquete_web_rec.html
View file @
e6414617
#set($title = "アンケート")
#set($title = "アンケート")
<script
type=
"text/javascript"
src=
"/em/js/jquery-1.3.1.min.js"
></script>
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
$
(
function
()
{
//条件付必須チェック
$
(
"input[type=radio], input[type=checkbox], input[type=select]"
).
click
(
function
()
{
var
thisQuestionId
=
$
(
this
).
attr
(
"class"
);
var
thisAnswerId
=
$
(
this
).
attr
(
"id"
);
//表示、非表示対象
if
(
$
{
question
.
condRequiredQuestionNo
}
&&
$
{
question
.
condRequiredQuestionNo
}
==
thisQuestionId
)
{
if
(
"${question.condRequiredAnswer}"
.
split
(
","
).
indexOf
(
thisAnswerId
)
<
0
)
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"checked"
,
false
);
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
true
);
}
else
if
(
"${question.controlId}"
==
"2"
||
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
||
"${question.controlId}"
==
"6"
)
{
$
(
"#${question.questionId}"
).
val
(
""
);
$
(
"#${question.questionId}"
).
attr
(
"disabled"
,
true
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
$
(
".${question.questionId}"
).
val
(
""
);
$
(
".${question.questionId}"
).
attr
(
"disabled"
,
true
);
$
(
".${question.questionId}"
).
next
().
hide
();
}
}
else
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
false
);
}
else
if
(
"${question.controlId}"
==
"2"
||
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
||
"${question.controlId}"
==
"6"
)
{
$
(
"#${question.questionId}"
).
attr
(
"disabled"
,
false
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
$
(
".${question.questionId}"
).
attr
(
"disabled"
,
false
);
$
(
".${question.questionId}"
).
next
().
show
();
}
}
}
});
});
// -->
</script>
#end
#end
<!-- preHeader -->
<!-- preHeader -->
#parse( "/WEB-INF/view/common/preHeader_mb.vm" )
#parse( "/WEB-INF/view/common/preHeader_mb.vm" )
<body
style=
"font-family: monospace; width: 240px; border: 2px solid black;"
>
<body
style=
"font-family: monospace; width: 240px; border: 2px solid black;"
>
...
...
src/main/webapp/WEB-INF/view/sp/user/enquete/enquete_pub.html
View file @
e6414617
#set($title = "アンケート回答")
#set($title = "アンケート回答")
<script
type=
"text/javascript"
src=
"/em/js/jquery-1.3.1.min.js"
></script>
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
window
.
onload
=
function
()
{
$
(
"input[type=text], input[type=date], textArea[type=text]"
).
each
(
function
(){
if
(
$
(
this
).
prop
(
"disabled"
))
{
$
(
this
).
val
(
""
);
$
(
this
).
textinput
().
textinput
(
"disable"
);
if
(
$
(
this
).
prop
(
"type"
)
==
"date"
)
{
$
(
this
).
next
().
hide
();
}
}
});
}
// -->
</script>
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
$
(
function
()
{
//条件付必須チェック
$
(
"input[type=radio], input[type=checkbox], input[type=select]"
).
click
(
function
()
{
var
idArray
=
$
(
this
).
attr
(
"class"
).
split
(
" "
);
var
thisQuestionId
=
idArray
[
0
];
var
thisAnswerId
=
idArray
[
1
];
//表示、非表示対象
if
(
$
{
question
.
condRequiredQuestionNo
}
&&
$
{
question
.
condRequiredQuestionNo
}
==
thisQuestionId
)
{
var
key
;
if
(
"${question.condRequiredAnswer}"
.
split
(
","
).
indexOf
(
thisAnswerId
)
<
0
)
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
key
=
"${answer.answerId}"
;
$
(
"."
+
key
).
prop
(
"checked"
,
false
);
$
(
"."
+
key
).
checkboxradio
(
'refresh'
).
checkboxradio
(
'disable'
);
}
else
if
(
"${question.controlId}"
==
"2"
||
$
{
question
.
controlId
}
==
"6"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
val
(
""
);
$
(
"."
+
key
).
selectmenu
(
"refresh"
).
selectmenu
(
"disable"
);
}
else
if
(
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
val
(
""
);
$
(
"."
+
key
).
textinput
(
"disable"
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
val
(
""
);
$
(
"."
+
key
).
textinput
(
"disable"
);
$
(
"."
+
key
).
next
().
hide
();
}
}
else
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
key
=
"${answer.answerId}"
;
$
(
"."
+
key
).
checkboxradio
(
'enable'
);
}
else
if
(
"${question.controlId}"
==
"2"
||
"${question.controlId}"
==
"6"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
selectmenu
(
"enable"
);
}
else
if
(
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
textinput
(
"enable"
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
textinput
(
"enable"
);
$
(
"."
+
key
).
next
().
show
();
}
}
}
});
});
// -->
</script>
#end
#end
<!-- preHeader -->
<!-- preHeader -->
#set($ajaxdisable = "1")
#set($ajaxdisable = "1")
#parse( "/WEB-INF/view/common/preHeader_sp.vm" )
#parse( "/WEB-INF/view/common/preHeader_sp.vm" )
...
...
src/main/webapp/WEB-INF/view/sp/user/enquete/enquete_web_rec.html
View file @
e6414617
#set($title = "アンケート回答")
#set($title = "アンケート回答")
<script
type=
"text/javascript"
src=
"/em/js/jquery-1.3.1.min.js"
></script>
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
window
.
onload
=
function
()
{
$
(
"input[type=text], input[type=date], textArea[type=text]"
).
each
(
function
(){
if
(
$
(
this
).
prop
(
"disabled"
))
{
$
(
this
).
val
(
""
);
$
(
this
).
textinput
().
textinput
(
"disable"
);
if
(
$
(
this
).
prop
(
"type"
)
==
"date"
)
{
$
(
this
).
next
().
hide
();
}
}
});
}
// -->
</script>
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
$
(
function
()
{
//条件付必須チェック
$
(
"input[type=radio], input[type=checkbox], input[type=select]"
).
click
(
function
()
{
var
idArray
=
$
(
this
).
attr
(
"class"
).
split
(
" "
);
var
thisQuestionId
=
idArray
[
0
];
var
thisAnswerId
=
idArray
[
1
];
//表示、非表示対象
if
(
$
{
question
.
condRequiredQuestionNo
}
&&
$
{
question
.
condRequiredQuestionNo
}
==
thisQuestionId
)
{
var
key
;
if
(
"${question.condRequiredAnswer}"
.
split
(
","
).
indexOf
(
thisAnswerId
)
<
0
)
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
key
=
"${answer.answerId}"
;
$
(
"."
+
key
).
prop
(
"checked"
,
false
);
$
(
"."
+
key
).
checkboxradio
(
'refresh'
).
checkboxradio
(
'disable'
);
}
else
if
(
"${question.controlId}"
==
"2"
||
$
{
question
.
controlId
}
==
"6"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
val
(
""
);
$
(
"."
+
key
).
selectmenu
(
"refresh"
).
selectmenu
(
"disable"
);
}
else
if
(
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
val
(
""
);
$
(
"."
+
key
).
textinput
(
"disable"
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
val
(
""
);
$
(
"."
+
key
).
textinput
(
"disable"
);
$
(
"."
+
key
).
next
().
hide
();
}
}
else
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
key
=
"${answer.answerId}"
;
$
(
"."
+
key
).
checkboxradio
(
'enable'
);
}
else
if
(
"${question.controlId}"
==
"2"
||
"${question.controlId}"
==
"6"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
selectmenu
(
"enable"
);
}
else
if
(
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
textinput
(
"enable"
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
key
=
"${question.questionId}"
;
$
(
"."
+
key
).
textinput
(
"enable"
);
$
(
"."
+
key
).
next
().
show
();
}
}
}
});
});
// -->
</script>
#end
#end
<!-- preHeader -->
<!-- preHeader -->
#set($ajaxdisable = "1")
#set($ajaxdisable = "1")
#parse( "/WEB-INF/view/common/preHeader_sp.vm" )
#parse( "/WEB-INF/view/common/preHeader_sp.vm" )
...
...
src/main/webapp/WEB-INF/view/user/enquete/enquete_pub.html
View file @
e6414617
...
@@ -28,6 +28,46 @@
...
@@ -28,6 +28,46 @@
#end
#end
#end
#end
</head>
</head>
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
$
(
function
()
{
//条件付必須チェック
$
(
"input[type=radio], input[type=checkbox], input[type=select]"
).
click
(
function
()
{
var
thisQuestionId
=
$
(
this
).
attr
(
"class"
);
var
thisAnswerId
=
$
(
this
).
attr
(
"id"
);
//表示、非表示対象
if
(
$
{
question
.
condRequiredQuestionNo
}
&&
$
{
question
.
condRequiredQuestionNo
}
==
thisQuestionId
)
{
if
(
"${question.condRequiredAnswer}"
.
split
(
","
).
indexOf
(
thisAnswerId
)
<
0
)
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"checked"
,
false
);
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
true
);
}
else
if
(
"${question.controlId}"
==
"2"
||
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
||
"${question.controlId}"
==
"6"
)
{
$
(
"#${question.questionId}"
).
val
(
''
);
$
(
"#${question.questionId}"
).
attr
(
"disabled"
,
true
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
$
(
".${question.questionId}"
).
val
(
''
);
$
(
".${question.questionId}"
).
attr
(
"disabled"
,
true
);
$
(
".${question.questionId}"
).
next
().
hide
();
}
}
else
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
false
);
}
else
if
(
"${question.controlId}"
==
"2"
||
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
||
"${question.controlId}"
==
"6"
)
{
$
(
"#${question.questionId}"
).
attr
(
"disabled"
,
false
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
$
(
".${question.questionId}"
).
attr
(
"disabled"
,
false
);
$
(
".${question.questionId}"
).
next
().
show
();
}
}
}
});
});
// -->
</script>
#end
#end
<body>
<body>
<div
id=
"wrapper"
>
<div
id=
"wrapper"
>
<div
id=
"logo"
><img
src=
"/em/images/ichikawa_logo01.jpg"
width=
"190"
height=
"65"
/>
<div
id=
"logo"
><img
src=
"/em/images/ichikawa_logo01.jpg"
width=
"190"
height=
"65"
/>
...
@@ -112,7 +152,7 @@
...
@@ -112,7 +152,7 @@
#if($!question.controlId == "2")
#if($!question.controlId == "2")
<td
align=
"left"
width=
"$tdWidthPercent%"
valign =
"top"
>
<td
align=
"left"
width=
"$tdWidthPercent%"
valign =
"top"
>
#set($answerIdValueName = "questionList[$questionIndex].answerList[0].answerIdValue")
#set($answerIdValueName = "questionList[$questionIndex].answerList[0].answerIdValue")
<select
name=
"$answerIdValueName"
>
<select
name=
"$answerIdValueName"
id=
"#he($!question.questionId)"
#
if
($!
question
.
questionInitDisable =
=
"
1
")
disabled
#
end
>
#foreach($selectAnswer in $question.answerList)
#foreach($selectAnswer in $question.answerList)
<option
value=
"$!selectAnswer.answerId"
#
if
($
enqueteForm
.
initCount =
="2"
&&
$!
selectAnswer
.
answerId =
=
$!
selectAnswer
.
answerIdValue
)
selected
#
elseif
($!
selectAnswer
.
defaultFlg =
=
"
1
"
&&
$
enqueteForm
.
initCount
!="
2
")
selected
#
end
>
$!escape.html($!selectAnswer.answer)
</option>
<option
value=
"$!selectAnswer.answerId"
#
if
($
enqueteForm
.
initCount =
="2"
&&
$!
selectAnswer
.
answerId =
=
$!
selectAnswer
.
answerIdValue
)
selected
#
elseif
($!
selectAnswer
.
defaultFlg =
=
"
1
"
&&
$
enqueteForm
.
initCount
!="
2
")
selected
#
end
>
$!escape.html($!selectAnswer.answer)
</option>
<!-- <option value="$!selectAnswer.answerId" #if($enqueteForm.initCount =="2" && $!selectAnswer.answerId == $!selectAnswer.answerIdValue) selected $!selectAnswer.answerId , $!selectAnswer.answerIdValue #elseif($!selectAnswer.defaultFlg == "1" ) selected $!selectAnswer.answerId , $!selectAnswer.answerIdValue #end >$!escape.html($!selectAnswer.answer)</option> -->
<!-- <option value="$!selectAnswer.answerId" #if($enqueteForm.initCount =="2" && $!selectAnswer.answerId == $!selectAnswer.answerIdValue) selected $!selectAnswer.answerId , $!selectAnswer.answerIdValue #elseif($!selectAnswer.defaultFlg == "1" ) selected $!selectAnswer.answerId , $!selectAnswer.answerIdValue #end >$!escape.html($!selectAnswer.answer)</option> -->
...
@@ -142,41 +182,41 @@
...
@@ -142,41 +182,41 @@
<!-- 0:RADIO インデクスを値にする。 -->
<!-- 0:RADIO インデクスを値にする。 -->
#if($!question.controlId == "0")
#if($!question.controlId == "0")
##if($!answer.freeTextFlg != "1"
&&
$!answer.freeTextFlg != "2")
##if($!answer.freeTextFlg != "1"
&&
$!answer.freeTextFlg != "2")
<input
type=
"radio"
name=
"$!answerIdValueRadioName"
value=
"$velocityCount"
#
if
($!
answer
.
answerIdValue =
=
$
velocityCount
.
toString
()
&&
$
enqueteForm
.
initCount =
="2")
checked
#{
end
}
<input
type=
"radio"
class=
"#he($!question.questionId)"
id=
"#he($!answer.answerId)"
name=
"$!answerIdValueRadioName"
value=
"$velocityCount"
#
if
($!
answer
.
answerIdValue =
=
$
velocityCount
.
toString
()
&&
$
enqueteForm
.
initCount =
="2")
checked
#{
end
}
#
if
($!
answer
.
defaultFlg =
=
1
&&
$
enqueteForm
.
initCount =
="1")
checked
#
end
#
if
($!
answer
.
defaultFlg =
=
1
&&
$
enqueteForm
.
initCount =
="1")
checked
#
end
>
$!escape.html($!answer.answer)
#
if
($!
question
.
questionInitDisable =
=
"
1
")
disabled
#
end
>
$!escape.html($!answer.answer)
##end
##end
##
<!-- 自由入力欄。freeTextFlg=1(あり)、2(必須) -->
##
<!-- 自由入力欄。freeTextFlg=1(あり)、2(必須) -->
#if($!answer.freeTextFlg == "1" || $!answer.freeTextFlg == "2")
#if($!answer.freeTextFlg == "1" || $!answer.freeTextFlg == "2")
<input
type=
"text"
name=
"$answerValue"
size=
"$!answer.freeTextColWidth"
value=
"$!escape.html($!answer.answerValue)"
/>
<input
type=
"text"
class=
"#he($!question.questionId)"
id=
"#he($!answer.answerId)"
name=
"$answerValue"
size=
"$!answer.freeTextColWidth"
value=
"$!escape.html($!answer.answerValue)"
/>
#end
#end
##
<!-- 1:CHECKBOX answer.answerNo値を値にする。-->
##
<!-- 1:CHECKBOX answer.answerNo値を値にする。-->
#elseif($!question.controlId == "1")
#elseif($!question.controlId == "1")
##if($!answer.freeTextFlg != "1"
&&
$!answer.freeTextFlg != "2")
##if($!answer.freeTextFlg != "1"
&&
$!answer.freeTextFlg != "2")
<input
type=
"checkbox"
name=
"$answerIdValueName"
value=
"$!escape.html($!answer.answerNo)"
#
if
($
answer
.
answerIdValue
!=
""
&&
$
enqueteForm
.
initCount =
="2")
checked
#
end
<input
type=
"checkbox"
class=
"#he($!question.questionId)"
id=
"#he($!answer.answerId)"
name=
"$answerIdValueName"
value=
"$!escape.html($!answer.answerNo)"
#
if
($
answer
.
answerIdValue
!=
""
&&
$
enqueteForm
.
initCount =
="2")
checked
#
end
#
if
($!
answer
.
defaultFlg =
=
1
&&
$
enqueteForm
.
initCount =
="1")
checked
#
end
#
if
($!
answer
.
defaultFlg =
=
1
&&
$
enqueteForm
.
initCount =
="1")
checked
#
end
>
$!escape.html($!answer.answer)
#
if
($!
question
.
questionInitDisable =
=
"
1
")
disabled
#
end
>
$!escape.html($!answer.answer)
##end
##end
##
<!-- 自由入力欄。freeTextFlg=1(あり)、2(必須) -->
##
<!-- 自由入力欄。freeTextFlg=1(あり)、2(必須) -->
#if($!answer.freeTextFlg == "1" || $!answer.freeTextFlg == "2")
#if($!answer.freeTextFlg == "1" || $!answer.freeTextFlg == "2")
<input
type=
"text"
name=
"$answerValue"
size=
"$!answer.freeTextColWidth"
value=
"$!escape.html($!answer.answerValue)"
/>
<input
type=
"text"
class=
"#he($!question.questionId)"
id=
"#he($!answer.answerId)"
name=
"$answerValue"
size=
"$!answer.freeTextColWidth"
value=
"$!escape.html($!answer.answerValue)"
#
if
($!
question
.
questionInitDisable =
=
"
1
")
disabled
#
end
/>
#end
#end
##
<!-- 3:TEXTAREA ユーザー入力値を値にする。-->
##
<!-- 3:TEXTAREA ユーザー入力値を値にする。-->
#elseif($!question.controlId == "3")
#elseif($!question.controlId == "3")
<textArea
type=
"text"
name=
"$answerIdValueName"
cols=
"$!question.dispWitdth"
rows=
"$!question.rowCount"
>
$!answer.answerIdValue
</textarea>
<textArea
type=
"text"
id=
"#he($!question.questionId)"
name=
"$answerIdValueName"
cols=
"$!question.dispWitdth"
rows=
"$!question.rowCount"
#
if
($!
question
.
questionInitDisable =
=
"
1
")
disabled
#
end
>
$!answer.answerIdValue
</textarea>
##
<!-- 4:TEXTFIELD ユーザー入力値を値にする。-->
##
<!-- 4:TEXTFIELD ユーザー入力値を値にする。-->
#elseif($!question.controlId == "4")
#elseif($!question.controlId == "4")
<input
type=
"text"
name=
"$answerIdValueName"
value=
"$!escape.html($!answer.answerIdValue)"
size=
"$!question.dispWitdth"
/>
<input
type=
"text"
id=
"#he($!question.questionId)"
name=
"$answerIdValueName"
value=
"$!escape.html($!answer.answerIdValue)"
size=
"$!question.dispWitdth"
#
if
($!
question
.
questionInitDisable =
=
"
1
")
disabled
#
end
/>
##
<!-- 5:日付入力 ユーザー入力値を値にする。-->
##
<!-- 5:日付入力 ユーザー入力値を値にする。-->
#elseif($!question.controlId == "5")
#elseif($!question.controlId == "5")
#set($dateIndex = $dateIndex+1)
#set($dateIndex = $dateIndex+1)
<input
name=
"$answerValue"
id=
"enqStartFrom${dateIndex}"
type=
"text"
class=
"w100 mgl10
"
value=
"$!escape.html($!answer.answerValue)"
>
<input
name=
"$answerValue"
id=
"enqStartFrom${dateIndex}"
type=
"text"
class=
"w100 mgl10
#he($!question.questionId)"
value=
"$!escape.html($!answer.answerValue)"
#
if
($!
question
.
questionInitDisable =
=
"
1
")
disabled
#
end
>
<div
style=
"display: none;"
><img
id=
"enqFrom${dateIndex}"
src=
"/em/images/icon_cal.gif"
style=
"padding-left:5px;padding-right:5px; vertical-align: middle;"
></div>
<div
style=
"display: none;"
><img
id=
"enqFrom${dateIndex}"
src=
"/em/images/icon_cal.gif"
style=
"padding-left:5px;padding-right:5px; vertical-align: middle;"
#
if
($!
question
.
questionInitDisable =
=
'
1
')
display:
none
;
#
end
"
></div>
<input
type=
"hidden"
name=
"$answerIdValueName"
value=
"$!answer.answerId"
/>
<input
type=
"hidden"
name=
"$answerIdValueName"
value=
"$!answer.answerId"
/>
#elseif($!question.controlId == "6")
#elseif($!question.controlId == "6")
<select
name=
"$answerIdValueName"
>
<select
name=
"$answerIdValueName"
id=
"#he($!question.questionId)"
#
if
($!
question
.
questionInitDisable =
=
"
1
")
disabled
#
end
>
#foreach($pecent1 in $enqueteForm.organizationListFor1Percent)
#foreach($pecent1 in $enqueteForm.organizationListFor1Percent)
<option
value=
"$!pecent1.organizationId"
#
if
($!
percentOrganizationId =
=
$!
pecent1
.
organizationId
)
selected
#
end
>
$!{pecent1.organizationNo} : $!escape.html($!{pecent1.organizationName})
</option>
<option
value=
"$!pecent1.organizationId"
#
if
($!
percentOrganizationId =
=
$!
pecent1
.
organizationId
)
selected
#
end
>
$!{pecent1.organizationNo} : $!escape.html($!{pecent1.organizationName})
</option>
#end
#end
...
...
src/main/webapp/WEB-INF/view/user/enquete/enquete_web_rec.html
View file @
e6414617
...
@@ -26,7 +26,46 @@
...
@@ -26,7 +26,46 @@
#end
#end
#end
#end
</head>
</head>
#foreach($question in $!enqueteForm.questionList)
#foreach($answer in $question.answerList)
<script
language=
"javascript"
type=
"text/javascript"
charset=
"utf-8"
>
<!--
$
(
function
()
{
//条件付必須チェック
$
(
"input[type=radio], input[type=checkbox], input[type=select]"
).
click
(
function
()
{
var
thisQuestionId
=
$
(
this
).
attr
(
"class"
);
var
thisAnswerId
=
$
(
this
).
attr
(
"id"
);
//表示、非表示対象
if
(
$
{
question
.
condRequiredQuestionNo
}
&&
$
{
question
.
condRequiredQuestionNo
}
==
thisQuestionId
)
{
if
(
"${question.condRequiredAnswer}"
.
split
(
","
).
indexOf
(
thisAnswerId
)
<
0
)
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"checked"
,
false
);
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
true
);
}
else
if
(
"${question.controlId}"
==
"2"
||
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
||
"${question.controlId}"
==
"6"
)
{
$
(
"#${question.questionId}"
).
val
(
''
);
$
(
"#${question.questionId}"
).
attr
(
"disabled"
,
true
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
$
(
".${question.questionId}"
).
val
(
''
);
$
(
".${question.questionId}"
).
attr
(
"disabled"
,
true
);
$
(
".${question.questionId}"
).
next
().
hide
();
}
}
else
{
if
(
"${question.controlId}"
==
"0"
||
"${question.controlId}"
==
"1"
)
{
$
(
"#${answer.answerId}"
).
attr
(
"disabled"
,
false
);
}
else
if
(
"${question.controlId}"
==
"2"
||
"${question.controlId}"
==
"3"
||
"${question.controlId}"
==
"4"
||
"${question.controlId}"
==
"6"
)
{
$
(
"#${question.questionId}"
).
attr
(
"disabled"
,
false
);
}
else
if
(
"${question.controlId}"
==
"5"
)
{
$
(
".${question.questionId}"
).
attr
(
"disabled"
,
false
);
$
(
".${question.questionId}"
).
next
().
show
();
}
}
}
});
});
// -->
</script>
#end
#end
<body>
<body>
<div
id=
"wrapper"
>
<div
id=
"wrapper"
>
...
@@ -120,7 +159,7 @@ $!enqueteForm.enquete.header
...
@@ -120,7 +159,7 @@ $!enqueteForm.enquete.header
#if($!question.controlId == "2")
#if($!question.controlId == "2")
<td
align=
"left"
width=
"$tdWidthPercent%"
valign =
"top"
>
<td
align=
"left"
width=
"$tdWidthPercent%"
valign =
"top"
>
#set($answerIdValueName = "questionList[$questionIndex].answerList[0].answerIdValue")
#set($answerIdValueName = "questionList[$questionIndex].answerList[0].answerIdValue")
<select
name=
"$answerIdValueName"
>
<select
name=
"$answerIdValueName"
id=
"#he($!question.questionId)"
#
if
($!
question
.
questionInitDisable =
=
"
1
")
disabled
#
end
>
#foreach($selectAnswer in $question.answerList)
#foreach($selectAnswer in $question.answerList)
<option
value=
"$!selectAnswer.answerId"
#
if
($
enqueteForm
.
initCount =
="2"
&&
$!
selectAnswer
.
answerId =
=
$!
selectAnswer
.
answerIdValue
)
selected
#
elseif
($!
selectAnswer
.
defaultFlg =
=
"
1
"
&&
$
enqueteForm
.
initCount
!="
2
")
selected
#
end
>
$!escape.html($!selectAnswer.answer)
</option>
<option
value=
"$!selectAnswer.answerId"
#
if
($
enqueteForm
.
initCount =
="2"
&&
$!
selectAnswer
.
answerId =
=
$!
selectAnswer
.
answerIdValue
)
selected
#
elseif
($!
selectAnswer
.
defaultFlg =
=
"
1
"
&&
$
enqueteForm
.
initCount
!="
2
")
selected
#
end
>
$!escape.html($!selectAnswer.answer)
</option>
<!-- <option value="$!selectAnswer.answerId" #if($enqueteForm.initCount =="2" && $!selectAnswer.answerId == $!selectAnswer.answerIdValue) selected $!selectAnswer.answerId , $!selectAnswer.answerIdValue #elseif($!selectAnswer.defaultFlg == "1" ) selected $!selectAnswer.answerId , $!selectAnswer.answerIdValue #end >$!escape.html($!selectAnswer.answer)</option> -->
<!-- <option value="$!selectAnswer.answerId" #if($enqueteForm.initCount =="2" && $!selectAnswer.answerId == $!selectAnswer.answerIdValue) selected $!selectAnswer.answerId , $!selectAnswer.answerIdValue #elseif($!selectAnswer.defaultFlg == "1" ) selected $!selectAnswer.answerId , $!selectAnswer.answerIdValue #end >$!escape.html($!selectAnswer.answer)</option> -->
...
@@ -150,41 +189,41 @@ $!enqueteForm.enquete.header
...
@@ -150,41 +189,41 @@ $!enqueteForm.enquete.header
<!-- 0:RADIO インデクスを値にする。 -->
<!-- 0:RADIO インデクスを値にする。 -->
#if($!question.controlId == "0")
#if($!question.controlId == "0")
##if($!answer.freeTextFlg != "1"
&&
$!answer.freeTextFlg != "2")
##if($!answer.freeTextFlg != "1"
&&
$!answer.freeTextFlg != "2")
<input
type=
"radio"
name=
"$!answerIdValueRadioName"
value=
"$velocityCount"
#
if
($!
answer
.
answerIdValue =
=
$
velocityCount
.
toString
()
&&
$
enqueteForm
.
initCount =
="2")
checked
#{
end
}
<input
type=
"radio"
class=
"#he($!question.questionId)"
id=
"#he($!answer.answerId)"
name=
"$!answerIdValueRadioName"
value=
"$velocityCount"
#
if
($!
answer
.
answerIdValue =
=
$
velocityCount
.
toString
()
&&
$
enqueteForm
.
initCount =
="2")
checked
#{
end
}
#
if
($!
answer
.
defaultFlg =
=
1
&&
$
enqueteForm
.
initCount =
="1")
checked
#
end
#
if
($!
answer
.
defaultFlg =
=
1
&&
$
enqueteForm
.
initCount =
="1")
checked
#
end
>
$!escape.html($!answer.answer)
>
$!escape.html($!answer.answer)
##end
##end
##
<!-- 自由入力欄。freeTextFlg=1(あり)、2(必須) -->
##
<!-- 自由入力欄。freeTextFlg=1(あり)、2(必須) -->
#if($!answer.freeTextFlg == "1" || $!answer.freeTextFlg == "2")
#if($!answer.freeTextFlg == "1" || $!answer.freeTextFlg == "2")
<input
type=
"text"
name=
"$answerValue"
size=
"$!answer.freeTextColWidth"
value=
"$!escape.html($!answer.answerValue)"
/>
<input
type=
"text"
class=
"#he($!question.questionId)"
id=
"#he($!answer.answerId)"
name=
"$answerValue"
size=
"$!answer.freeTextColWidth"
value=
"$!escape.html($!answer.answerValue)"
/>
#end
#end
##
<!-- 1:CHECKBOX answer.answerNo値を値にする。-->
##
<!-- 1:CHECKBOX answer.answerNo値を値にする。-->
#elseif($!question.controlId == "1")
#elseif($!question.controlId == "1")
##if($!answer.freeTextFlg != "1"
&&
$!answer.freeTextFlg != "2")
##if($!answer.freeTextFlg != "1"
&&
$!answer.freeTextFlg != "2")
<input
type=
"checkbox"
name=
"$answerIdValueName"
value=
"$!escape.html($!answer.answerNo)"
#
if
($
answer
.
answerIdValue
!=
""
&&
$
enqueteForm
.
initCount =
="2")
checked
#
end
<input
type=
"checkbox"
class=
"#he($!question.questionId)"
id=
"#he($!answer.answerId)"
name=
"$answerIdValueName"
value=
"$!escape.html($!answer.answerNo)"
#
if
($
answer
.
answerIdValue
!=
""
&&
$
enqueteForm
.
initCount =
="2")
checked
#
end
#
if
($!
answer
.
defaultFlg =
=
1
&&
$
enqueteForm
.
initCount =
="1")
checked
#
end
#
if
($!
answer
.
defaultFlg =
=
1
&&
$
enqueteForm
.
initCount =
="1")
checked
#
end
>
$!escape.html($!answer.answer)
#
if
($!
question
.
questionInitDisable =
=
"
1
")
disabled
#
end
>
$!escape.html($!answer.answer)
##end
##end
##
<!-- 自由入力欄。freeTextFlg=1(あり)、2(必須) -->
##
<!-- 自由入力欄。freeTextFlg=1(あり)、2(必須) -->
#if($!answer.freeTextFlg == "1" || $!answer.freeTextFlg == "2")
#if($!answer.freeTextFlg == "1" || $!answer.freeTextFlg == "2")
<input
type=
"text"
name=
"$answerValue"
size=
"$!answer.freeTextColWidth"
value=
"$!escape.html($!answer.answerValue)"
/>
<input
type=
"text"
name=
"$answerValue"
size=
"$!answer.freeTextColWidth"
value=
"$!escape.html($!answer.answerValue)"
#
if
($!
question
.
questionInitDisable =
=
"
1
")
disabled
#
end
/>
#end
#end
##
<!-- 3:TEXTAREA ユーザー入力値を値にする。-->
##
<!-- 3:TEXTAREA ユーザー入力値を値にする。-->
#elseif($!question.controlId == "3")
#elseif($!question.controlId == "3")
<textArea
type=
"text"
name=
"$answerIdValueName"
cols=
"$!question.dispWitdth"
rows=
"$!question.rowCount"
>
$!answer.answerIdValue
</textarea>
<textArea
type=
"text"
id=
"#he($!question.questionId)"
name=
"$answerIdValueName"
cols=
"$!question.dispWitdth"
rows=
"$!question.rowCount"
#
if
($!
question
.
questionInitDisable =
=
"
1
")
disabled
#
end
>
$!answer.answerIdValue
</textarea>
##
<!-- 4:TEXTFIELD ユーザー入力値を値にする。-->
##
<!-- 4:TEXTFIELD ユーザー入力値を値にする。-->
#elseif($!question.controlId == "4")
#elseif($!question.controlId == "4")
<input
type=
"text"
name=
"$answerIdValueName"
value=
"$!escape.html($!answer.answerIdValue)"
size=
"$!question.dispWitdth"
/>
<input
type=
"text"
id=
"#he($!question.questionId)"
name=
"$answerIdValueName"
value=
"$!escape.html($!answer.answerIdValue)"
size=
"$!question.dispWitdth"
#
if
($!
question
.
questionInitDisable =
=
"
1
")
disabled
#
end
/>
##
<!-- 5:日付入力 ユーザー入力値を値にする。-->
##
<!-- 5:日付入力 ユーザー入力値を値にする。-->
#elseif($!question.controlId == "5")
#elseif($!question.controlId == "5")
#set($dateIndex = $dateIndex+1)
#set($dateIndex = $dateIndex+1)
<input
name=
"$answerValue"
id=
"enqStartFrom${dateIndex}"
type=
"text"
class=
"w100 mgl10
"
value=
"$!escape.html($!answer.answerValue)"
>
<input
name=
"$answerValue"
id=
"enqStartFrom${dateIndex}"
type=
"text"
class=
"w100 mgl10
#he($!question.questionId)"
value=
"$!escape.html($!answer.answerValue)"
#
if
($!
question
.
questionInitDisable =
=
"
1
")
disabled
#
end
>
<div
style=
"display: none;"
><img
id=
"enqFrom${dateIndex}"
src=
"/em/images/icon_cal.gif"
style=
"padding-left:5px;padding-right:5px; vertical-align: middle;"
></div>
<div
style=
"display: none;"
><img
id=
"enqFrom${dateIndex}"
src=
"/em/images/icon_cal.gif"
style=
"padding-left:5px;padding-right:5px; vertical-align: middle;"
#
if
($!
question
.
questionInitDisable =
=
'
1
')
display:
none
;
#
end
"
></div>
<input
type=
"hidden"
name=
"$answerIdValueName"
value=
"$!answer.answerId"
/>
<input
type=
"hidden"
name=
"$answerIdValueName"
value=
"$!answer.answerId"
/>
#elseif($!question.controlId == "6")
#elseif($!question.controlId == "6")
<select
name=
"$answerIdValueName"
>
<select
name=
"$answerIdValueName"
id=
"#he($!question.questionId)"
#
if
($!
question
.
questionInitDisable =
=
"
1
")
disabled
#
end
>
#foreach($pecent1 in $enqueteForm.organizationListFor1Percent)
#foreach($pecent1 in $enqueteForm.organizationListFor1Percent)
<option
value=
"$!pecent1.organizationId"
#
if
($!
percentOrganizationId =
=
$!
pecent1
.
organizationId
)
selected
#
end
>
$!{pecent1.organizationNo} : $!escape.html($!{pecent1.organizationName})
</option>
<option
value=
"$!pecent1.organizationId"
#
if
($!
percentOrganizationId =
=
$!
pecent1
.
organizationId
)
selected
#
end
>
$!{pecent1.organizationNo} : $!escape.html($!{pecent1.organizationName})
</option>
#end
#end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment