Sjabloon:Domein form: verschil tussen versies
Uit Dorpsbelang Den Hout
(Nieuwe pagina aangemaakt met '__NOTOC__ __NOTITLE__<div class="main-wrapper"><!-- --><div><b>Domeinen</b></div><!-- -->{{#arraymap:Voedbal-denhout.nl, Stichting-htb.nl, scoutingdenhout.nl|,|@...') |
|||
(105 tussenliggende versies door 2 gebruikers niet weergegeven) | |||
Regel 1: | Regel 1: | ||
− | __NOTOC__ | + | __NOTOC__ __NOTITLE____NOINDEX__<div class="main-wrapper"><!-- |
--><div><b>Domeinen</b></div><!-- | --><div><b>Domeinen</b></div><!-- | ||
− | -->{{# | + | -->{{#ask:[[Class::Domein]]|?Domein|link=none|format=complexarray|name=@domeininfo}}<div class="d-flex"> {{#camap:@domeininfo|@@@|<!-- |
− | --><div class=" | + | -->{{#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 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><b>Titel</b></div><!-- | ||
+ | --><wsfield type="text" name="Titel" class="form-control" value="{{#caprint:@domeininfo[0][Titel]}}" /><!-- | ||
+ | --><div><b>Subtitel</b></div><!-- | ||
+ | --><wsfield type="text" name="Subtitel" class="form-control" value="{{#caprint:@domeininfo[0][Subtitel]}}" /><!-- | ||
+ | --><div><b>Domein naam</b></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><!-- | ||
+ | --><wsfield type="text" name="Email" class="form-control" value="{{#caprint:@domeininfo[0][E-mail]}}" /><!-- | ||
+ | --><div><b>Intro text</b></div><!-- | ||
+ | --><wsfield type="textarea" name="Intro" class="form-control" >{{#caprint:@domeininfo[0][Intro]||noparse,nowiki}}</wsfield><!-- | ||
+ | --><!-- | ||
+ | --><b class="red">KLEUR</b><!-- | ||
+ | --><!-- | ||
+ | --><!-- <b class="red">layout</b>{{#arraymap:red, green, blue|,|@@@| --><!-- | ||
+ | --><!-- {{#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 class="d-flex">[[File:{{#replace:{{SERVERNAME}}|.|-}}-logo.png|300px|Logo.png]]<!-- | ||
+ | --><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><!-- | ||
+ | --></div><div class="main-wrapper mt-4"><wsfield type="submit" class="btn pull-right " value="Opslaan" /></div></wsform><!-- | ||
+ | -->{{#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>}} |
Huidige versie van 2 okt 2023 om 13:59
Domeinen
Please log in first.