Team:EPF-Lausanne/AddPage

From 2012.igem.org

(Difference between revisions)
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='title' value='' />
+
Team:EPF-Lausanne/<input type='text' id='pageTitle' value='' />
-
<input type='hidden' id='hiddenTitle' name='title' />
+
<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(){
-
$("#hiddenTitle").val("Team:EPF-Lausanne/"+$("#title").val());
+
$("#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='title' value='' />
+
Team:EPF-Lausanne/Protocol/<input type='text' id='protocolTitle' value='' />
-
<input type='hidden' id='hiddenTitle' name='title' />
+
<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(){
-
$("#hiddenTitle").val("Team:EPF-Lausanne/Protocol/"+$("#title").val());
+
$("#protocolHiddenTitle").val("Team:EPF-Lausanne/Protocol/"+$("#protocolTitle").val());
return true;
return true;
});
});

Revision as of 20:18, 4 June 2012

This page provides some helpers to create new pages (i.e. automatic insertion of the correct templates).

  • Add a standard page.
    Team:EPF-Lausanne/
  • Add a protocol.
    Team:EPF-Lausanne/Protocol/