Sjabloon:Domein form: verschil tussen versies

Uit Dorpsbelang Den Hout
Ga naar:navigatie, zoeken
 
(32 tussenliggende versies door 2 gebruikers niet weergegeven)
Regel 1: Regel 1:
__NOTOC__ __NOTITLE__<div class="main-wrapper"><!--  
+
__NOTOC__ __NOTITLE____NOINDEX__<div class="main-wrapper"><!--  
 
--><div><b>Domeinen</b></div><!--  
 
--><div><b>Domeinen</b></div><!--  
  -->{{#arraymap:Voedbal-denhout.nl, Stichting-htb.nl, scoutingdenhout.nl|,|@@@|<!--  
+
  -->{{#ask:[[Class::Domein]]|?Domein|link=none|format=complexarray|name=@domeininfo}}<div class="d-flex"> {{#camap:@domeininfo|@@@|<!--  
--><div class="btn">@@@</div><!--  
+
-->{{#widget:link|type=a|text=@@@[Domein]|class=btn|href=https://@@@[Domein]}}<!--  
  -->|}}<!--  
+
  -->|}}<wsfield type="button" class="btn"  onclick="document.querySelectorAll('#domein-form input:not([type=file]), #domein-form textarea').forEach(function(e){e.value = ' ';e.removeAttribute('disabled')})" >{{fa|plus}}</wsfield></div><!--  
 
  --></div><!--  
 
  --></div><!--  
--><wsform action="addToWiki">{{#ask:[[Class::Domein]][[Domein::{{SERVERNAME}}]]|?Titel|?Subtitel|?Email|?Intro|?Color|?Links|link=none|format=complexarray|name=@domeininfo}}<div class="row bg-gray mt-4 pt-4 mb-4 pb-4"><!--  
+
--><wsform id="domein-form" action="addToWiki"><wscreate mwwrite="{{SERVERNAME}}" mwtemplate="Domein"  />{{#ask:[[Class::Domein]][[Domein::{{SERVERNAME}}]]|?Titel|?Subtitel|?Email|?Intro|?Color|?Links|link=none|format=complexarray|name=@domeininfo}}<div class="row bg-gray mt-4 pt-4 mb-4 pb-4"><!--  
 
--><div class="main-wrapper"><!--  
 
--><div class="main-wrapper"><!--  
 
  --><!--  
 
  --><!--  
Regel 13: Regel 13:
 
--><wsfield type="text" name="Subtitel" class="form-control" value="{{#caprint:@domeininfo[0][Subtitel]}}" /><!--  
 
--><wsfield type="text" name="Subtitel" class="form-control" value="{{#caprint:@domeininfo[0][Subtitel]}}" /><!--  
 
   --><div><b>Domein naam</b></div><!--  
 
   --><div><b>Domein naam</b></div><!--  
--><div class="d-flex"><wsfield type="text" name="Domein" class="form-control" value="{{SERVERNAME}}" disabled="disabled" /><wsfield type="button" class="btn"  onclick="this.closest('.d-flex').querySelector('input').removeAttribute('disabled')" >{{fa|lock}}</wsfield></div><!--  
+
--><div class="d-flex"><wsfield type="text" name="Domein" class="form-control" value="{{SERVERNAME}}" /><wsfield type="button" class="btn"  onclick="this.closest('.d-flex').querySelector('input').removeAttribute('disabled')" >{{fa|lock}}</wsfield></div><!--  
 
   --><div><b>Email</b></div><!--  
 
   --><div><b>Email</b></div><!--  
 
--><wsfield type="text" name="Email" class="form-control" value="{{#caprint:@domeininfo[0][E-mail]}}" /><!--  
 
--><wsfield type="text" name="Email" class="form-control" value="{{#caprint:@domeininfo[0][E-mail]}}" /><!--  
 
   --><div><b>Intro text</b></div><!--  
 
   --><div><b>Intro text</b></div><!--  
--><wsfield type="textarea" name="Intro" class="form-control"  >{{#caprint:@domeininfo[0][Intro]}}</wsfield><!--  
+
--><wsfield type="textarea" name="Intro" class="form-control"  >{{#caprint:@domeininfo[0][Intro]||noparse,nowiki}}</wsfield><!--  
   -->{{#vardefine:@color-value|{{#expr:{{#caprint:@domeininfo[0][Color]}} / 360 * 100  }} }}<!--  
+
   --><!--  
--><b class="red">KLEUR</b><div class="fake-slider-group">{{#tag:html|<div id="fake-slider" style="background:linear-gradient(90deg, var(--main-color) 0%, var(--main-color) calc((var(--color-input)/ 360 * 100)*1%), white calc((var(--color-input)/ 360 * 100)*1%), white 100%);"></div>}}<wsfield type="range" name="Color" class="form-control" id="change-color" value="{{#var:@color-value}}" /></div><!--  
+
--><b class="red">KLEUR</b><!--  
 
  --><!--  
 
  --><!--  
 
--><!-- <b class="red">layout</b>{{#arraymap:red, green, blue|,|@@@| --><!--  
 
--><!-- <b class="red">layout</b>{{#arraymap:red, green, blue|,|@@@| --><!--  
 
  --><!-- {{#tag:wslabel|@@@{{#tag:wsfield||type=radio|name=Thema|class=form-control|value=@@@}}| }} --><!--  
 
  --><!-- {{#tag:wslabel|@@@{{#tag:wsfield||type=radio|name=Thema|class=form-control|value=@@@}}| }} --><!--  
  --><!-- |}} --><!--  
+
  --><!-- |}} -->{{#ask:[[Class::Domein]][[Domein::{{SERVERNAME}}]]|?Color|?hval|?sval|?lval|link=none|format=complexarray|name=@color}}<!--  
 
+
-->{{#Widget:Color_input|color={{#caprint:@color[0][Color]}}|hval={{#caprint:@color[0][Hval][fulltext]}}|sval={{#caprint:@color[0][Sval][fulltext]}}|lval={{#caprint:@color[0][Lval][fulltext]}} }}<!--
 
   --><div><b>Logo</b></div><!--  
 
   --><div><b>Logo</b></div><!--  
 
  --><div class="d-flex">[[File:{{#replace:{{SERVERNAME}}|.|-}}-logo.png|300px|Logo.png]]<!--  
 
  --><div class="d-flex">[[File:{{#replace:{{SERVERNAME}}|.|-}}-logo.png|300px|Logo.png]]<!--  
-->{{#Widget:Multi upload}}</div><!--
 
 
   --><div><b>Links</b></div><!--   
 
   --><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 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><!--  
 
  --></div><!--  
--></div><div class="main-wrapper mt-4"><wsfield type="button" class="btn pull-right" onclick="uploadFiles('logo')"  >Opslaan</wsfield><wsfield type="button" class="btn pull-right d-none" onclick="postBericht(this, 'Domein')"  id="real-submit">Opslaan</wsfield></div></wsform><!--  
+
--></div><div class="main-wrapper mt-4"><wsfield type="submit" class="btn pull-right " value="Opslaan" /></div></wsform><!--  
 
  -->{{#tag:html|<script>
 
  -->{{#tag:html|<script>
document.getElementById('change-color').addEventListener('input', function(e){
+
 
  document.body.setAttribute('style', '--color-input:'+((360 / 100) * e.target.value) )
 
   
 
})
 
 
function addLink(){
 
function addLink(){
 
   var newlinkinput = document.createElement('div');
 
   var newlinkinput = document.createElement('div');

Huidige versie van 2 okt 2023 om 13:59