Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public String viewSender(final Model model, @PathVariable final Sender sender,
}
info.addProperty("html", sender.getHtmlEnabled());
info.addProperty("attachmentsEnabled", sender.getAttachmentsEnabled());
info.addProperty("optInRequired", sender.getOptInRequired());
return new ResponseEntity<>(info.toString(), HttpStatus.OK);
}

Expand Down
21 changes: 21 additions & 0 deletions messaging-core/src/main/webapp/WEB-INF/messaging/newMessage.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ ${portal.toolkit()}
</div>
</c:if>

<div class="row">
<div id="nonOptInRequiredDiv" class="col-sm-8 col-sm-offset-2 alert alert-warning">
<h4>
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
<spring:message code="title.disclaimer.non.optin.required.sender.selected"/>
</h4>
<p><spring:message code="disclaimer.non.optin.required.sender.selected"/></p>
</div>
</div>

<spring:eval expression="T(org.fenixedu.messaging.core.domain.Sender).available()" var="senders"/>
<spring:eval expression="T(org.fenixedu.bennu.core.util.CoreConfiguration).supportedLocales()" var="locales"/>
<form:form modelAttribute="messageBean" role="form" class="form-horizontal" action="${pageContext.request.contextPath}/messaging/message" method="post">
Expand Down Expand Up @@ -217,6 +227,7 @@ ${portal.toolkit()}
$('#replyTo').val(info.replyTo);
toggleHtml(info);
toggleAttachments(info);
toggleNonOptInRequiredDisclaimer(info);
});
}

Expand All @@ -243,6 +254,16 @@ ${portal.toolkit()}
}
}

function toggleNonOptInRequiredDisclaimer(info) {
var nonOptInRequiredDisclaimerEl = $('#nonOptInRequiredDiv');
if (!info.optInRequired) {
nonOptInRequiredDisclaimerEl.show();
}
else {
nonOptInRequiredDisclaimerEl.hide();
}
}

var addAttachmentEl = $('#addAttachment');
addAttachmentEl.change(function(event){
var files = event.target.files;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ action.view = View Details
action.subscribe = Subscribe
action.unsubscribe = Unsubscribe

disclaimer.non.optin.required.sender.selected = The currently selected sender is a non opt-in required sender, which means that all messages sent by this sender will reach all members of the selected recipients.
title.disclaimer.non.optin.required.sender.selected = Disclaimer - Non Opt-In Required Sender Selected

error.message.not.sent = Message could not be sent:
error.template.not.saved = Message template could not be saved:
error.template.undeclared = Message template is undeclared.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,7 @@ title.templates.config = Configuração de Modelos de Mensagem
title.template = Modelo de Mensagem
title.template.edit = Editar Modelo de Mensagem
label.message.attachments=Anexos
disclaimer.non.optin.required.sender.selected = O remetente selecionado não requer subscrição, o que signfica que todas as mensagens enviadas por este remetente irão chegar a todos os membros dos destinatários selecionados.
title.disclaimer.non.optin.required.sender.selected = Disclaimer - Remetente Selecionado Não Requer Subscrição
label.sender.lastMessageSent=Última Mensagem Enviada