Sjabloon:Bericht: verschil tussen versies

Uit Dorpsbelang Den Hout
Ga naar:navigatie, zoeken
Regel 33: Regel 33:
 
  --><div class="grid-lijst"><!--  
 
  --><div class="grid-lijst"><!--  
 
   --><div><b>Aanvullende informatie:</b></div><!--  
 
   --><div><b>Aanvullende informatie:</b></div><!--  
  -->{{#ifeq:{{#urlget:mode}}|edit| |<ul>{{#ask:[[Class::Bericht file]][[Page::{{FULLPAGENAME}}]]|?Caption|?Type|link=none|format=complexarray|name=@images }}{{#camap:@images|@@@|{{#switch:@@@[Type][fulltext]|Pdf=<li class="red">{{#widget:link|type=a|text={{#if:@@@[Caption]|@@@[Caption]|@@@[catitle]}}|target=blank|href={{filepath:{{#replace:@@@[catitle]|Bestand:|}} }} |class=red}}</li>}} |}} </ul>}}<!--  
+
  -->{{#ifeq:{{#urlget:mode}}|edit|   --><div><b>Links</b></div><!-- 
 +
--><div id="links-input-wrapper">{{#arraymap:{{#caprint:@domeininfo[0][Links]}}|,|@@@|<div class="d-flex">{{#tag:wsfield||type=text|name=Links[]|class=form-control mb-4|value=@@@}}{{#tag:wsfield|{{fa|times}}|type=button|class=btn mb-4|onclick=removeLink(this)}}</div>|}}</div><wsfield type="button" class="btn pull-right"  onclick="addLink()" >{{fa|plus}}</wsfield><!-- |
 +
--></div>{{#tag:html|<script>
 +
 
 +
   
 +
})
 +
function addLink(){
 +
  var newlinkinput = document.createElement('div');
 +
  newlinkinput.classList.add("d-flex");
 +
  newlinkinput.innerHTML = '<input type="text" name="Links[]" class="form-control mb-4" ><button class="btn mb-4" onclick="removeLink(this)" type="button"><i class="fa fa-times"></i></button>';
 +
document.getElementById('links-input-wrapper').appendChild(newlinkinput)
 +
}
 +
function removeLink(el){
 +
  el.closest('.d-flex').remove()
 +
}
 +
</script>}}|}}<!--  
 
  --></div><!--  
 
  --></div><!--  
 
  --><div class="grid-img"><!--  
 
  --><div class="grid-img"><!--  

Versie van 6 nov 2020 14:10

Aanvullende informatie: