Fix error on mindmap publish & details

This commit is contained in:
Paulo Gustavo Veiga 2020-11-22 12:53:35 -08:00
parent 64411c6232
commit 3a006f1fbc
5 changed files with 15 additions and 3 deletions

View File

@ -160,6 +160,12 @@ public class Mindmap {
return isPublic; return isPublic;
} }
//@Todo: This is a hack to overcome some problem with JS EL. For some reason, ${mindmap.public} fails as not supported.
// More research is needed...
public boolean isAccessible() {
return isPublic();
}
public void setPublic(boolean isPublic) { public void setPublic(boolean isPublic) {
this.isPublic = isPublic; this.isPublic = isPublic;
} }

View File

@ -11,7 +11,6 @@ public class DefaultPasswordEncoderFactories {
private static final String ENCODING_ID = "bcrypt"; private static final String ENCODING_ID = "bcrypt";
@SuppressWarnings("deprecation")
static PasswordEncoder createDelegatingPasswordEncoder() { static PasswordEncoder createDelegatingPasswordEncoder() {
final Map<String, PasswordEncoder> encoders = new HashMap<>(); final Map<String, PasswordEncoder> encoders = new HashMap<>();

View File

@ -47,6 +47,12 @@ public class MindMapBean {
return mindmap.isPublic(); return mindmap.isPublic();
} }
//@Todo: This is a hack to overcome some problem with JS EL. For some reason, ${mindmap.public} fails as not supported.
// More research is needed...
public boolean isAccessible() {
return getPublic();
}
public String getTitle() { public String getTitle() {
return mindmap.getTitle(); return mindmap.getTitle();
} }

View File

@ -45,7 +45,7 @@
<div class="tab-pane fade" id="publish"> <div class="tab-pane fade" id="publish">
<c:choose> <c:choose>
<c:when test="${mindmap.public}"> <c:when test="${mindmap.accessible}">
<ul class="unstyled"> <ul class="unstyled">
<p><spring:message code="ALL_VIEW_PUBLIC"/></p> <p><spring:message code="ALL_VIEW_PUBLIC"/></p>
<li><strong><spring:message code="DIRECT_LINK_EXPLANATION"/></strong> <li><strong><spring:message code="DIRECT_LINK_EXPLANATION"/></strong>

View File

@ -11,7 +11,7 @@
<form method="post" id="dialogMainForm" action="#" class="well form-inline"> <form method="post" id="dialogMainForm" action="#" class="well form-inline">
<label for="enablePublicView" class="control-label"><spring:message code="ENABLE_PUBLISHING"/>: <label for="enablePublicView" class="control-label"><spring:message code="ENABLE_PUBLISHING"/>:
<input type="checkbox" id="enablePublicView" name="publicView" <input type="checkbox" id="enablePublicView" name="publicView"
<c:if test="${mindmap.public}"> <c:if test="${mindmap.accessible}">
checked="checked" checked="checked"
</c:if> /> </c:if> />
</label> </label>
@ -28,6 +28,7 @@
</ul> </ul>
<br/> <br/>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane fade active in" id="embedTab">
<div class="tab-pane fade active in" id="embedTab"> <div class="tab-pane fade active in" id="embedTab">
<spring:message code="BLOG_INCLUSION"/> <spring:message code="BLOG_INCLUSION"/>
<div id="wizardContainer"> <div id="wizardContainer">