ui: hide create/open pad buttons on index page (#3974)
if requireSession or editOnly is set these buttons always fail
This commit is contained in:
parent
bfca481b0b
commit
0b7ace83d5
2 changed files with 13 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"index.newPad": "New Pad",
|
"index.newPad": "New Pad",
|
||||||
"index.createOpenPad": "or create/open a Pad with the name:",
|
"index.createOpenPad": "or create/open a Pad with the name:",
|
||||||
|
"index.openPad": "open an existing Pad with the name:",
|
||||||
|
|
||||||
"pad.toolbar.bold.title": "Bold (Ctrl+B)",
|
"pad.toolbar.bold.title": "Bold (Ctrl+B)",
|
||||||
"pad.toolbar.italic.title": "Italic (Ctrl+I)",
|
"pad.toolbar.italic.title": "Italic (Ctrl+I)",
|
||||||
|
|
|
@ -161,12 +161,18 @@
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
<% e.begin_block("indexWrapper"); %>
|
<% e.begin_block("indexWrapper"); %>
|
||||||
<div id="inner">
|
<div id="inner">
|
||||||
<button id="button" onclick="go2Random()" data-l10n-id="index.newPad"></button>
|
<% if (!settings.requireSession) { %>
|
||||||
<label id="label" for="padname" data-l10n-id="index.createOpenPad"></label>
|
<% if (settings.editOnly) { %>
|
||||||
<form action="#" onsubmit="go2Name();return false;">
|
<label id="label" for="padname" data-l10n-id="index.openPad"></label>
|
||||||
<input type="text" id="padname" maxlength="50" autofocus x-webkit-speech>
|
<% } else {%>
|
||||||
<button type="submit">OK</button>
|
<button id="button" onclick="go2Random()" data-l10n-id="index.newPad"></button>
|
||||||
</form>
|
<label id="label" for="padname" data-l10n-id="index.createOpenPad"></label>
|
||||||
|
<% } %>
|
||||||
|
<form action="#" onsubmit="go2Name();return false;">
|
||||||
|
<input type="text" id="padname" maxlength="50" autofocus x-webkit-speech>
|
||||||
|
<button type="submit">OK</button>
|
||||||
|
</form>
|
||||||
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
<% e.end_block(); %>
|
<% e.end_block(); %>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue