This page provides some helpers to create new pages (i.e. automatic insertion of the correct templates).
- Add a standard page.
- Add a protocol.
Line 8: | Line 8: | ||
Add a standard page. | Add a standard page. | ||
<form action='/wiki/index.php' method='GET' id='newPageForm'> | <form action='/wiki/index.php' method='GET' id='newPageForm'> | ||
- | Team:EPF-Lausanne/<input type='text' id=' | + | Team:EPF-Lausanne/<input type='text' id='pageTitle' value='' /> |
- | <input type='hidden' id=' | + | <input type='hidden' id='pageHiddenTitle' name='title' /> |
<input type='hidden' name='action' value='edit' /> | <input type='hidden' name='action' value='edit' /> | ||
<input type='hidden' name='preload' value='Team:EPF-Lausanne/Template/NewPage' /> | <input type='hidden' name='preload' value='Team:EPF-Lausanne/Template/NewPage' /> | ||
Line 16: | Line 16: | ||
<script type='text/javascript'> | <script type='text/javascript'> | ||
$("#newPageForm").submit(function(){ | $("#newPageForm").submit(function(){ | ||
- | $("# | + | $("#pageHiddenTitle").val("Team:EPF-Lausanne/"+$("#pageTitle").val()); |
return true; | return true; | ||
}); | }); | ||
Line 24: | Line 24: | ||
Add a protocol. | Add a protocol. | ||
<form action='/wiki/index.php' method='GET' id='newProtocolForm'> | <form action='/wiki/index.php' method='GET' id='newProtocolForm'> | ||
- | Team:EPF-Lausanne/Protocol/<input type='text' id=' | + | Team:EPF-Lausanne/Protocol/<input type='text' id='protocolTitle' value='' /> |
- | <input type='hidden' id=' | + | <input type='hidden' id='protocolHiddenTitle' name='title' /> |
<input type='hidden' name='action' value='edit' /> | <input type='hidden' name='action' value='edit' /> | ||
<input type='hidden' name='preload' value='Team:EPF-Lausanne/Template/NewProtocol' /> | <input type='hidden' name='preload' value='Team:EPF-Lausanne/Template/NewProtocol' /> | ||
Line 32: | Line 32: | ||
<script type='text/javascript'> | <script type='text/javascript'> | ||
$("#newProtocolForm").submit(function(){ | $("#newProtocolForm").submit(function(){ | ||
- | $("# | + | $("#protocolHiddenTitle").val("Team:EPF-Lausanne/Protocol/"+$("#protocolTitle").val()); |
return true; | return true; | ||
}); | }); |
This page provides some helpers to create new pages (i.e. automatic insertion of the correct templates).