File tree Expand file tree Collapse file tree 3 files changed +12
-10
lines changed
java/com/stratelia/webactiv/quizz/control Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -666,13 +666,13 @@ public List<ComponentInstLight> getGalleries() {
666
666
List <ComponentInstLight > galleries = null ;
667
667
OrganisationController orgaController = new OrganizationController ();
668
668
String [] compoIds = orgaController .getCompoId ("gallery" );
669
- for (int c = 0 ; c < compoIds . length ; c ++ ) {
670
- if ("yes" .equalsIgnoreCase (orgaController . getComponentParameterValue ( "gallery" + compoIds [ c ],
671
- "viewInWysiwyg" ))) {
669
+ for (final String compoId : compoIds ) {
670
+ if ("yes" .equalsIgnoreCase (
671
+ orgaController . getComponentParameterValue ( "gallery" + compoId , "viewInWysiwyg" ))) {
672
672
if (galleries == null ) {
673
673
galleries = new ArrayList <ComponentInstLight >();
674
674
}
675
- ComponentInstLight gallery = orgaController .getComponentInstLight ("gallery" + compoIds [ c ] );
675
+ ComponentInstLight gallery = orgaController .getComponentInstLight ("gallery" + compoId );
676
676
galleries .add (gallery );
677
677
}
678
678
}
Original file line number Diff line number Diff line change @@ -612,14 +612,15 @@ if ((action.equals("CreateQuestion")) || (action.equals("SendQuestionForm"))) {
612
612
613
613
<div class =" thumbnailInputs" >
614
614
<img title =" <%= resources. getString(" survey.answer.image.select" ) % >" alt =" <%= resources. getString(" survey.answer.image.select" ) % >" src =" /silverpeas/util/icons/images.png" /> <input type =" file" id =" thumbnailFile" size =" 40" name =" image<%= i % >" />
615
+ <% if (galleries != null ) {% >
615
616
<span class =" txtsublibform" > ou </span ><input type =" hidden" name =" valueImageGallery<%= i % >" id =" valueImageGallery<%= i % >" />
616
617
<select class =" galleries" name =" galleries" onchange =" choixGallery(this, '<%= i % > ');this.selectedIndex=0;" >
617
618
<option selected ><%= resources. getString(" survey.galleries" ) % > </option >
618
619
<%
619
- for (int k = 0 ; k < galleries. size(); k++ ) {
620
- ComponentInstLight gallery = galleries. get(k); % >
620
+ for (ComponentInstLight gallery : galleries) { % >
621
621
<option value =" <%= gallery. getId() % >" ><%= gallery. getLabel() % > </option >
622
- <% } % >
622
+ <% }
623
+ } % >
623
624
</select >
624
625
</div >
625
626
</div >
Original file line number Diff line number Diff line change @@ -508,14 +508,15 @@ if ((action.equals("CreateQuestion")) || (action.equals("SendQuestionForm"))) {
508
508
509
509
<div class =" thumbnailInputs" >
510
510
<img title =" <%= resources. getString(" survey.answer.image.select" ) % >" alt =" <%= resources. getString(" survey.answer.image.select" ) % >" src =" /silverpeas/util/icons/images.png" /> <input type =" file" id =" thumbnailFile" size =" 40" name =" image<%= i % >" />
511
+ <% if (galleries != null ) {% >
511
512
<span class =" txtsublibform" > ou </span ><input type =" hidden" name =" valueImageGallery<%= i % >" id =" valueImageGallery<%= i % >" />
512
513
<select class =" galleries" name =" galleries" onchange =" choixGallery(this, '<%= i % > ');this.selectedIndex=0;" >
513
514
<option selected ><%= resources. getString(" survey.galleries" ) % > </option >
514
515
<%
515
- for (int k = 0 ; k < galleries. size(); k++ ) {
516
- ComponentInstLight gallery = galleries. get(k); % >
516
+ for (ComponentInstLight gallery : galleries) { % >
517
517
<option value =" <%= gallery. getId() % >" ><%= gallery. getLabel() % > </option >
518
- <% } % >
518
+ <% }
519
+ } % >
519
520
</select >
520
521
</div >
521
522
</div >
You can’t perform that action at this time.
0 commit comments