added info box if e-mail sending is disabled in the system. that concerns this feature as well
This commit is contained in:
parent
3e979cf478
commit
ffe60623b9
src/main/java/se/su/dsv/scipro/admin/panels
@ -10,6 +10,11 @@
|
||||
</div>
|
||||
<form wicket:id="mailForm">
|
||||
<div class="span-10">
|
||||
<wicket:enclosure child="disabledLabel">
|
||||
<div class="rounded-box">
|
||||
<span wicket:id="disabledLabel"></span>
|
||||
</div>
|
||||
</wicket:enclosure>
|
||||
Subject:<br />
|
||||
<div wicket:id="subjectErrors"></div>
|
||||
<input type="text" wicket:id="mailSubjectField"><br />
|
||||
|
@ -10,6 +10,7 @@ import org.apache.wicket.ajax.AjaxRequestTarget;
|
||||
import org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
|
||||
import org.apache.wicket.behavior.SimpleAttributeModifier;
|
||||
import org.apache.wicket.feedback.ComponentFeedbackMessageFilter;
|
||||
import org.apache.wicket.markup.html.basic.Label;
|
||||
import org.apache.wicket.markup.html.form.Button;
|
||||
import org.apache.wicket.markup.html.form.Form;
|
||||
import org.apache.wicket.markup.html.form.RadioChoice;
|
||||
@ -83,7 +84,13 @@ public class AdminMailPanel extends Panel {
|
||||
fromName = gsettings.getMailFromName();
|
||||
fromEmail = gsettings.getSystemFromMail();
|
||||
|
||||
Label disabledLabel = new Label("disabledLabel",
|
||||
"Sending of e-mail through SciPro is inactivated. Please activate it under Admin -> Settings, if you want to use this feature.");
|
||||
disabledLabel.setVisible(!gsettings.isMailNotifications());
|
||||
add(disabledLabel);
|
||||
|
||||
Button submitButton = new Button("submitButton");
|
||||
//submitButton.setEnabled(gsettings.isMailNotifications()); <-- Commented out for testing purposes.
|
||||
submitButton.add(new SimpleAttributeModifier(
|
||||
"onclick",
|
||||
"if (!confirm('Are you sure you want to send this e-mail to the selected recipients?')){ return false; }"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user