RenderWikiApplicationFactory
Renders a form to create a new WikiApplication

02 May 2019 - 09:27 | Version 1 |

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

Name:

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

Description:

Enter a short description what this wiki app is about. It will be stored in the WebPreferences of your newly created application web.

Calls to 'RenderWikiApplicationFactory'

Copyright

© 2006-2019 Michael Daum http://michaeldaumconsulting.com

This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. For more details read the LICENSE.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This site is powered by FoswikiCopyright © 2002-2024 by contributors to Wasserstoff-Fahrer Forum ImpressumDatenschutz  Feedback
This website is using cookies. More info. That's Fine