Sjabloon:Domein form: verschil tussen versies
Uit Dorpsbelang Den Hout
(44 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|@@@|<!-- |
− | --> | + | -->{{#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><!-- | ||
− | --><wsfield type="text" name="Domein" class="form-control" value="{{SERVERNAME}}" /><!-- | + | --><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><!-- |
− | --> | + | --><!-- |
− | --><b class="red">KLEUR</b | + | --><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: | + | --><div class="d-flex">[[File:{{#replace:{{SERVERNAME}}|.|-}}-logo.png|300px|Logo.png]]<!-- |
− | |||
--><div><b>Links</b></div><!-- | --><div><b>Links</b></div><!-- | ||
− | --><div id="links-input-wrapper">{{#arraymap:{{#caprint:@domeininfo[0][Links]}}|,|@@@|{{#tag:wsfield||type=text|name=Links[]|class=form-control mb-4|value=@@@}}|}}</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=" | + | --></div><div class="main-wrapper mt-4"><wsfield type="submit" class="btn pull-right " value="Opslaan" /></div></wsform><!-- |
-->{{#tag:html|<script> | -->{{#tag:html|<script> | ||
− | + | ||
− | |||
− | |||
− | |||
function addLink(){ | function addLink(){ | ||
− | var newlinkinput = document.createElement(' | + | var newlinkinput = document.createElement('div'); |
− | newlinkinput. | + | newlinkinput.classList.add("d-flex"); |
− | newlinkinput.type = "text" | + | 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) | document.getElementById('links-input-wrapper').appendChild(newlinkinput) | ||
+ | } | ||
+ | function removeLink(el){ | ||
+ | el.closest('.d-flex').remove() | ||
} | } | ||
</script>}} | </script>}} |
Huidige versie van 2 okt 2023 om 13:59
Domeinen
Please log in first.