Some bugfixes for editing contactable entities.
parent
e18d5e29c1
commit
11d17341a8
|
|
@ -34,6 +34,7 @@ import org.librecms.ui.contentsections.ContentSectionNotFoundException;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
import java.util.concurrent.Callable;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
@ -337,7 +338,8 @@ public abstract class AbstractContactableEntityEditStep
|
||||||
model.setEntryKey(entryKey.getEntryKey());
|
model.setEntryKey(entryKey.getEntryKey());
|
||||||
model.setLabel(
|
model.setLabel(
|
||||||
globalizationHelper.getValueFromLocalizedString(
|
globalizationHelper.getValueFromLocalizedString(
|
||||||
entryKey.getLabel())
|
entryKey.getLabel(), entryKey::getEntryKey
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
|
|
@ -352,7 +354,7 @@ public abstract class AbstractContactableEntityEditStep
|
||||||
model.setEntryKeyId(entry.getKey().getKeyId());
|
model.setEntryKeyId(entry.getKey().getKeyId());
|
||||||
model.setEntryKeyLabel(
|
model.setEntryKeyLabel(
|
||||||
globalizationHelper.getValueFromLocalizedString(
|
globalizationHelper.getValueFromLocalizedString(
|
||||||
entry.getKey().getLabel()
|
entry.getKey().getLabel(), entry.getKey()::getEntryKey
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
model.setOrder(entry.getOrder());
|
model.setOrder(entry.getOrder());
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,6 @@ import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
import javax.servlet.ServletContext;
|
import javax.servlet.ServletContext;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.ws.rs.core.Context;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -94,16 +94,17 @@
|
||||||
<td>
|
<td>
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
data-target="#edit-contactntry-dialog-#{entry.contactEntryId}"
|
data-target="#edit-contactentry-dialog-#{entry.contactEntryId}"
|
||||||
type="button">
|
type="button">
|
||||||
<bootstrap:svgIcon icon="pen" />
|
<bootstrap:svgIcon icon="pen" />
|
||||||
<span class="sr-only">#{CmsAssetsStepsDefaultMessagesBundle['contactable.contactentries.edit']}</span>
|
<span class="sr-only">#{CmsAssetsStepsDefaultMessagesBundle['contactable.contactentries.edit']}</span>
|
||||||
</button>
|
</button>
|
||||||
<div aria-hidden="true"
|
<div aria-hidden="true"
|
||||||
aria-labelledby="edit-contactntry-dialog-#{entry.contactEntryId}-title"
|
aria-labelledby="edit-contactntry-dialog-#{entry.contactEntryId}-title"
|
||||||
|
id="edit-contactentry-dialog-#{entry.contactEntryId}"
|
||||||
class="modal fade"
|
class="modal fade"
|
||||||
tabindex="-1">
|
tabindex="-1">
|
||||||
<div class="modal-content">
|
<div class="modal-dialog">
|
||||||
<form action="#{actionBaseUrl}/contactentries/#{entry.order}"
|
<form action="#{actionBaseUrl}/contactentries/#{entry.order}"
|
||||||
class="modal-content"
|
class="modal-content"
|
||||||
method="post">
|
method="post">
|
||||||
|
|
@ -162,6 +163,7 @@
|
||||||
<div aria-hidden="true"
|
<div aria-hidden="true"
|
||||||
aria-labelledby="remove-contactentry-dialog-#{entry.contactEntryId}-title"
|
aria-labelledby="remove-contactentry-dialog-#{entry.contactEntryId}-title"
|
||||||
class="modal fade"
|
class="modal fade"
|
||||||
|
id="remove-contactentry-dialog-#{entry.contactEntryId}"
|
||||||
tabindex="-1">
|
tabindex="-1">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<form action="#{actionBaseUrl}/contactentries/#{entry.order}/@remove"
|
<form action="#{actionBaseUrl}/contactentries/#{entry.order}/@remove"
|
||||||
|
|
@ -182,7 +184,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p>
|
<p>
|
||||||
#{CmsDefaultStepsMessageBundle.getMessage('contactable.contactentries.remove.message', [entry.entryKeyLabel, entry.value])}
|
#{CmsAssetsStepsDefaultMessagesBundle.getMessage('contactable.contactentries.remove.message', [entry.entryKeyLabel, entry.value])}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue