Documentation
This is used to create a new
WikiApplication
Implementation
%STARTINCLUDE%<!-- wikiapplicationfactory -->
%TWISTY{link="%BUTTON{"%TRANSLATE{"New WikiApplication"}%" icon="fa-plus"}%%CLEAR%" mode="div"}%
<form id="newWikiAppForm" name="admin" action="%SCRIPTURLPATH{manage}%/%BASEWEB%/%HOMETOPIC%" method="post"">
<input name="action" type="hidden" value="createweb" />
<input type="hidden" name="baseweb" value="_WikiApplicationTemplate" />
<input type="hidden" name="webbgcolor" value="#D0D0D0" size="16" />
<input name="newtopic" type="hidden" value="" />
<input type="submit" style="display:none;" />
<div class="foswikiFormSteps">
<div class="foswikiFormStep">
<h3>Name:</h3>
<input class="foswikiInputField" id="newweb" name="newweb" type="text" value="" size="50" />
<div class="foswikiFormDescription">
<noautolink>
%TRANSLATE{"This is the name of the web that will hold the wiki application. It will become a subweb of the Applications web. Example values: MyCompanyApp, TestApp"}%
</noautolink>
</div>
</div>
<div class="foswikiFormStep">
<h3>Description:</h3>
<input class="foswikiInputField" type="text" name="WEBSUMMARY" value="" size="50" />
<div class="foswikiFormDescription">
<noautolink>
%TRANSLATE{"Enter a short description what this wiki app is about. It will be stored in the WebPreferences of your newly created application web."}%
</noautolink>
</div>
</div>
<div class="foswikiFormStep foswikiFormButtons foswikiFormLast">
%BUTTON{"%TRANSLATE{"Submit"}%" type="submit" icon="fa-check"}%
%CLEAR%
</div>
</div>
</form>
%ENDTWISTY%
%ADDTOZONE{"script" id="WW:NEWWEB" topic="%WEB%.%TOPIC%" section="init" requires="JQUERYPLUGIN"}%
<!-- //wikiapplicationfactory-->%STOPINCLUDE%
JavaScript initialisation
%STARTSECTION{"init"}%<literal>
<script type='text/javascript'>
jQuery(function($) {
$('#newWikiAppForm').bind('submit', function() {
var newweb = $('#newweb').val();
if (!newweb.match(/^Applications\./)) {
newweb = 'Applications.'+newweb;
$('#newweb').val(newweb);
}
if(typeof(foswikiStrikeOne) == 'function') {
foswikiStrikeOne(this);
}
});
});
</script>
</literal>%ENDSECTION{"init"}%
Test