* if a Sone error occurs
*/
public Sone createSone(String name) throws SoneException {
- return createSone(name, "Sone-" + name, null, null);
+ return createSone(name, "Sone", null, null);
}
/**
protected void processTemplate(Request request, Template template) throws RedirectException {
super.processTemplate(request, template);
String name = "";
- String documentName = null;
String requestUri = null;
String insertUri = null;
if (request.getMethod() == Method.POST) {
name = request.getHttpRequest().getPartAsStringFailsafe("name", 100);
- documentName = request.getHttpRequest().getPartAsStringFailsafe("document-name", 96);
- if (documentName.trim().length() == 0) {
- documentName = "Sone-" + name;
- }
if (request.getHttpRequest().getParam("create-from-uri").length() > 0) {
requestUri = request.getHttpRequest().getPartAsStringFailsafe("request-uri", 256);
insertUri = request.getHttpRequest().getPartAsStringFailsafe("insert-uri", 256);
}
try {
/* create Sone. */
- Sone sone = webInterface.core().createSone(name, documentName, requestUri, insertUri);
+ Sone sone = webInterface.core().createSone(name, "Sone", requestUri, insertUri);
/* log in the new Sone. */
setCurrentSone(request.getToadletContext(), sone);
<script language="javascript">
$(document).ready(function() {
registerInputTextareaSwap("#sone #create-sone input[name=name]", "WebInterface.DefaultText.CreateSoneName", "name", false);
- registerInputTextareaSwap("#sone #create-sone input[name=document-name]", "WebInterface.DefaultText.CreateSoneDocumentName", "document-name", false);
registerInputTextareaSwap("#sone #create-sone input[name=insert-uri]", "WebInterface.DefaultText.CreateSoneInsertURI", "insert-uri", true);
registerInputTextareaSwap("#sone #create-sone input[name=request-uri]", "WebInterface.DefaultText.CreateSoneRequestURI", "request-uri", true);
<input type="text" name="name" value="<% name|html>"/>
</div>
<div>
- <label for="document-name"><%= Page.Login.CreateSone.Label.DocumentName|l10n|html></label>
- <input type="text" name="document-name" value="<% documentName|html>" />
- </div>
- <div>
<button type="submit" name="create-random" value="1"><%= Page.Login.CreateSone.Button.CreateRandom|l10n|html></button>
</div>
<div class="advanced">