first effort to move into templates but javascript is broken so dont pull
parent
f880473360
commit
3cdf66c2f7
|
@ -22,6 +22,7 @@ iframe {
|
|||
.readonly .acl-write {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#users {
|
||||
background: #f7f7f7;
|
||||
background: -webkit-linear-gradient( #F7F7F7,#EEE);
|
||||
|
@ -891,3 +892,15 @@ input[type=checkbox] {
|
|||
line-height: 24px
|
||||
}
|
||||
}
|
||||
|
||||
#passwordRequired{
|
||||
display:none;
|
||||
}
|
||||
|
||||
#permissionDenied{
|
||||
display:none;
|
||||
}
|
||||
|
||||
#wrongPassword{
|
||||
display:none;
|
||||
}
|
||||
|
|
|
@ -298,30 +298,39 @@ function handshake()
|
|||
//the access was not granted, give the user a message
|
||||
if(!receivedClientVars && obj.accessStatus)
|
||||
{
|
||||
$('.passForm').submit(function(){
|
||||
// THIS BIT DOESNT WORK
|
||||
alert("I AM BROKEN");
|
||||
padutils.escapeHtml('require('+JSON.stringify(module.id)).savePassword();
|
||||
});
|
||||
|
||||
if(obj.accessStatus == "deny")
|
||||
{
|
||||
$("#editorloadingbox").html("<b>You do not have permission to access this pad</b>");
|
||||
$('#loading').hide();
|
||||
$("#permissionDenied").show());
|
||||
}
|
||||
else if(obj.accessStatus == "needPassword")
|
||||
{
|
||||
$("#editorloadingbox").html("<b>You need a password to access this pad</b><br>" +
|
||||
/* $("#editorloadingbox").html("<b>You need a password to access this pad</b><br>" +
|
||||
"<form class='passForm'><input id='passwordinput' type='password' name='password'>"+
|
||||
"<button type='button' onclick=\"" + padutils.escapeHtml('require('+JSON.stringify(module.id)+").savePassword();") + "\">ok</button></div>");
|
||||
$("#passwordinput").focus();
|
||||
$(".passForm").submit(function(){
|
||||
$('.passForm button').click();
|
||||
});
|
||||
*/
|
||||
$('#loading').hide();
|
||||
$('#passwordRequired').show();
|
||||
$("#passwordinput").focus();
|
||||
}
|
||||
else if(obj.accessStatus == "wrongPassword")
|
||||
{
|
||||
$("#editorloadingbox").html("<b>Your password was wrong</b><br>" +
|
||||
"<form class='passForm'><input id='passwordinput' type='password' name='password'>"+
|
||||
"<button type='button' onclick=\"" + padutils.escapeHtml('require('+JSON.stringify(module.id)+").savePassword();") + "\">ok</button></div>");
|
||||
$('#loading').hide();
|
||||
$('#wrongPassword').show();
|
||||
$("#passwordinput").focus();
|
||||
$(".passForm").submit(function(){
|
||||
$('.passForm button').click();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//if we haven't recieved the clientVars yet, then this message should it be
|
||||
|
|
|
@ -184,7 +184,19 @@
|
|||
<div id="editorcontainerbox">
|
||||
<div id="editorcontainer"></div>
|
||||
<div id="editorloadingbox">
|
||||
<p data-l10n-id="pad.loading">Loading...</p>
|
||||
<div id="passwordRequired">
|
||||
<p data-l10n-id="pad.youneedpasword">You need a password to access this pad</p>
|
||||
<form class='passForm'>
|
||||
<input id='passwordinput' type='password' name='password'><input type='submit' value='Submit'>
|
||||
</form>
|
||||
</div>
|
||||
<div id="permissionDenied">
|
||||
<p data-l10n-id="pad.youdonthavepermission">You do not have permission to access this pad</p>
|
||||
</div>
|
||||
<div id="wrongPassword">
|
||||
<p data-l10n-id="pad.wrongpassword">Your password was wrong</p>
|
||||
</div>
|
||||
<p data-l10n-id="pad.loading" id="loading">Loading...</p>
|
||||
<noscript><strong>Sorry, you have to enable Javascript in order to use this.</strong></noscript>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue