. Improvements to the UI for email template selection in the Rule/Action dialogs

- Also allows preview of an email template so the user has an idea what they have selected
. Much improved screen layout and better default for Invite Users notification dialogs
 - as above, after design session with Linton this morning

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2545 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-03-14 17:32:11 +00:00
parent 45135f13eb
commit 61ce2c67f3
7 changed files with 266 additions and 172 deletions

View File

@@ -675,9 +675,7 @@ action_copy=Copy to
action_extract_metadata=Extract metadata from content
action_move=Move to
action_mail=Send email to
action_mail_message_text=Enter message text
action_mail_template_text=Or select an email template for the message body
action_mail_template=Template
action_mail_template=Use Template
action_check_in=Check in content as ''{0}'' with comment ''{1}''
action_check_out=Check out content to
action_set_property_value=Sets property
@@ -689,7 +687,12 @@ encoding=Encoding
encoding_utf8=UTF-8
rule_type=Rule Type
rule_background_info=If this option is selected the rule will execute in the background so the results may not appear immediately.
selected_recipients=Select email recipients
select_recipients=Search for email recipients by Name or Group
selected_recipients=Selected email recipients
message_recipients=Message Recipients
email_message=Email message
insert_template=Insert Template
discard_template=Discard Template
# New Space Wizard messages
new_space_title=New Space Wizard

View File

@@ -17,6 +17,7 @@
package org.alfresco.web.bean.wizard;
import java.io.Serializable;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -50,6 +51,8 @@ import org.alfresco.service.cmr.action.ActionService;
import org.alfresco.service.cmr.dictionary.AspectDefinition;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.dictionary.TypeDefinition;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentService;
import org.alfresco.service.cmr.repository.MimetypeService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.security.AuthorityService;
@@ -62,6 +65,7 @@ import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.data.IDataContainer;
import org.alfresco.web.data.QuickSort;
import org.alfresco.web.ui.common.Utils;
import org.alfresco.web.ui.common.component.UIGenericPicker;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -104,6 +108,7 @@ public abstract class BaseActionWizard extends AbstractWizardBean
// new rule/action wizard specific properties
protected boolean multiActionMode = false;
protected String action;
protected String usingTemplate = null;
protected ActionService actionService;
protected DictionaryService dictionaryService;
@@ -144,6 +149,7 @@ public abstract class BaseActionWizard extends AbstractWizardBean
this.actionDescriptions = null;
this.emailRecipientsDataModel = null;
this.emailRecipients = new ArrayList<RecipientWrapper>(4);
this.usingTemplate = null;
this.currentActionProperties = new HashMap<String, Serializable>(3);
@@ -367,10 +373,9 @@ public abstract class BaseActionWizard extends AbstractWizardBean
actionParams.put(MailActionExecuter.PARAM_FROM, from);
// add the template if one was selected by the user
String template = (String)this.currentActionProperties.get(PROP_TEMPLATE);
if (template != null && template.equals(TemplateSupportBean.NO_SELECTION) == false)
if (this.usingTemplate != null)
{
actionParams.put(MailActionExecuter.PARAM_TEMPLATE, new NodeRef(Repository.getStoreRef(), template));
actionParams.put(MailActionExecuter.PARAM_TEMPLATE, new NodeRef(Repository.getStoreRef(), this.usingTemplate));
}
}
else if (this.action.equals(ImporterActionExecuter.NAME))
@@ -517,6 +522,7 @@ public abstract class BaseActionWizard extends AbstractWizardBean
if (templateRef != null)
{
this.currentActionProperties.put(PROP_TEMPLATE, templateRef.getId());
this.usingTemplate = templateRef.getId();
}
}
else if (this.action.equals(ImporterActionExecuter.NAME))
@@ -1026,6 +1032,22 @@ public abstract class BaseActionWizard extends AbstractWizardBean
return this.users;
}
/**
* @return Returns if a template has been inserted by a user for email body.
*/
public String getUsingTemplate()
{
return this.usingTemplate;
}
/**
* @param usingTemplate Template that has been inserted by a user for the email body.
*/
public void setUsingTemplate(String usingTemplate)
{
this.usingTemplate = usingTemplate;
}
// ------------------------------------------------------------------------------
// Action event handlers
@@ -1093,6 +1115,44 @@ public abstract class BaseActionWizard extends AbstractWizardBean
this.emailRecipients.remove(wrapper);
}
/**
* Action handler called to insert a template as the email body
*/
public void insertTemplate(ActionEvent event)
{
String template = (String)this.currentActionProperties.get(PROP_TEMPLATE);
if (template != null && template.equals(TemplateSupportBean.NO_SELECTION) == false)
{
// get the content of the template so the user can get a basic preview of it
try
{
NodeRef templateRef = new NodeRef(Repository.getStoreRef(), template);
ContentService cs = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getContentService();
ContentReader reader = cs.getReader(templateRef, ContentModel.PROP_CONTENT);
if (reader != null && reader.exists())
{
this.currentActionProperties.put(PROP_MESSAGE, reader.getContentString());
usingTemplate = template;
}
}
catch (Throwable err)
{
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err);
}
}
}
/**
* Action handler called to discard the template from the email body
*/
public void discardTemplate(ActionEvent event)
{
this.currentActionProperties.put(PROP_MESSAGE, "");
usingTemplate = null;
}
// ------------------------------------------------------------------------------
// Inner classes

View File

@@ -34,6 +34,8 @@ import javax.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.TemplateNode;
import org.alfresco.service.cmr.security.AuthorityService;
@@ -100,9 +102,9 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
private String notify = NOTIFY_YES;
private String subject = null;
private String body = null;
private String internalSubject = null;
private String automaticText = null;
private String template = null;
private String usingTemplate = null;
/**
* @return a cached list of available permissions for the type being dealt with
@@ -171,8 +173,8 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
subject = "";
body = "";
automaticText = "";
internalSubject = null;
template = null;
usingTemplate = null;
}
/**
@@ -191,12 +193,6 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
tx = Repository.getUserTransaction(context);
tx.begin();
String subject = this.subject;
if (subject == null || subject.length() == 0)
{
subject = this.internalSubject;
}
User user = Application.getCurrentUser(context);
String from = (String)this.nodeService.getProperty(user.getPerson(), ContentModel.PROP_EMAIL);
if (from == null || from.length() == 0)
@@ -287,22 +283,11 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
if (to != null && to.length() != 0)
{
FacesContext fc = FacesContext.getCurrentInstance();
String body;
if (this.template == null || this.template.equals(TemplateSupportBean.NO_SELECTION) == true)
String body = this.body;
if (this.usingTemplate != null)
{
String msgRole = Application.getMessage(fc, MSG_INVITED_ROLE);
String roleMessage = MessageFormat.format(msgRole, new Object[] {roleText});
FacesContext fc = FacesContext.getCurrentInstance();
body = this.internalSubject + "\r\n\r\n" + roleMessage + "\r\n\r\n";// + url + "\r\n\r\n";
if (this.body != null && this.body.length() != 0)
{
body += this.body;
}
}
else
{
// use template service to format the email
ServiceRegistry services = Repository.getServiceRegistry(fc);
Map<String, Object> model = DefaultModelHelper.buildDefaultModel(
@@ -310,13 +295,13 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
model.put("role", roleText);
model.put("space", new TemplateNode(node, Repository.getServiceRegistry(fc), null));
NodeRef templateRef = new NodeRef(Repository.getStoreRef(), this.template);
NodeRef templateRef = new NodeRef(Repository.getStoreRef(), this.usingTemplate);
body = services.getTemplateService().processTemplate("freemarker", templateRef.toString(), model);
}
SimpleMailMessage simpleMailMessage = new SimpleMailMessage();
simpleMailMessage.setTo(to);
simpleMailMessage.setSubject(subject);
simpleMailMessage.setSubject(this.subject);
simpleMailMessage.setText(body);
simpleMailMessage.setFrom(from);
@@ -555,6 +540,43 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
return roles;
}
/**
* Action handler called to insert a template as the email body
*/
public void insertTemplate(ActionEvent event)
{
if (this.template != null && this.template.equals(TemplateSupportBean.NO_SELECTION) == false)
{
// get the content of the template so the user can get a basic preview of it
try
{
NodeRef templateRef = new NodeRef(Repository.getStoreRef(), this.template);
ContentService cs = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getContentService();
ContentReader reader = cs.getReader(templateRef, ContentModel.PROP_CONTENT);
if (reader != null && reader.exists())
{
this.body = reader.getContentString();
this.usingTemplate = this.template;
}
}
catch (Throwable err)
{
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err);
}
}
}
/**
* Action handler called to discard the template from the email body
*/
public void discardTemplate(ActionEvent event)
{
this.body = this.automaticText;
usingTemplate = null;
}
/**
* @return Returns the notify listbox selection.
*/
@@ -570,22 +592,6 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
{
this.notify = notify;
}
/**
* @return Returns the automaticText.
*/
public String getAutomaticText()
{
return this.automaticText;
}
/**
* @param automaticText The automaticText to set.
*/
public void setAutomaticText(String automaticText)
{
this.automaticText = automaticText;
}
/**
* @return Returns the email body text.
@@ -634,6 +640,22 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
{
this.template = template;
}
/**
* @return Returns if a template has been inserted by a user for email body.
*/
public String getUsingTemplate()
{
return this.usingTemplate;
}
/**
* @param usingTemplate Template that has been inserted by a user for the email body.
*/
public void setUsingTemplate(String usingTemplate)
{
this.usingTemplate = usingTemplate;
}
/**
* @see org.alfresco.web.bean.wizard.AbstractWizardBean#getStepDescription()
@@ -725,7 +747,7 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
{
FacesContext context = FacesContext.getCurrentInstance();
// prepare automatic text for email and screen
// prepare automatic text for email and display
StringBuilder buf = new StringBuilder(256);
String personName = Application.getCurrentUser(context).getFullName(getNodeService());
@@ -736,9 +758,11 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
path + '/' + node.getName(),
personName}) );
this.internalSubject = buf.toString();
// default the subject line to an informative message
this.subject = buf.toString();
buf.append("<br>");
// add the rest of the automatic body text
buf.append("\r\n\r\n");
String msgRole = Application.getMessage(context, MSG_INVITED_ROLE);
String roleText;
@@ -755,6 +779,9 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
buf.append(roleText);
this.automaticText = buf.toString();
// default the body content to this text
this.body = this.automaticText;
}
return outcome;

View File

@@ -140,51 +140,22 @@
<td colspan="2" class="mainSubTitle"><h:outputText value="#{NewActionWizard.stepTitle}" /></td>
</tr>
<%-- Select the email receipients --%>
<tr><td colspan="2" class="paddingRow"></td></tr>
<tr><td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.message_recipients}" /></td></tr>
<tr><td colspan="2" style="padding-left:12px">1. <h:outputText value="#{msg.select_recipients}" /></td></tr>
<tr>
<td><h:outputText value="#{msg.subject}"/>:</td>
<td width="90%">
<h:inputText id="subject" value="#{NewActionWizard.actionProperties.subject}" size="75" maxlength="1024"
onkeyup="javascript:checkButtonState();" />&nbsp;*
</td>
</tr>
<tr><td colspan="2" class="paddingRow"></td></tr>
<tr><td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.action_mail_message_text}"/></td></tr>
<tr>
<td valign="top"><h:outputText value="#{msg.message}"/>:</td>
<td>
<h:inputTextarea value="#{NewActionWizard.actionProperties.message}"
rows="4" cols="75" />
</td>
</tr>
<tr><td colspan="2" class="paddingRow"></td></tr>
<tr><td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.action_mail_template_text}"/></td></tr>
<tr>
<td valign="top"><h:outputText value="#{msg.action_mail_template}"/>:</td>
<td>
<%-- Templates drop-down selector --%>
<h:selectOneMenu value="#{NewActionWizard.actionProperties.template}">
<f:selectItems value="#{TemplateSupportBean.emailTemplates}" />
</h:selectOneMenu>
</td>
</tr>
<tr><td colspan="2" class="paddingRow"></td></tr>
<tr><td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.selected_recipients}" /></td></tr>
<tr>
<td></td>
<%-- Picker to select Users/Groups --%>
<td>
<%-- Generic Picker to select Users/Groups --%>
<td colspan=2 style="padding-left:16px">
<a:genericPicker id="picker" filters="#{InviteSpaceUsersWizard.filters}"
queryCallback="#{InviteSpaceUsersWizard.pickerCallback}"
actionListener="#{NewActionWizard.addRecipient}" />
</td>
</tr>
<tr><td colspan="2" style="padding-left:12px">2. <h:outputText value="#{msg.selected_recipients}" /></td></tr>
<tr>
<td valign="top"><h:outputText value="#{msg.to}"/>:</td>
<td>
<td colspan=2 style="padding-left:12px">
<h:dataTable value="#{NewActionWizard.emailRecipientsDataModel}" var="row"
rowClasses="selectedItemsRow,selectedItemsRowAlt"
styleClass="selectedItems" headerClass="selectedItemsHeader"
@@ -214,6 +185,44 @@
</td>
</tr>
<%-- Enter the message subject and body --%>
<tr><td colspan="2" class="paddingRow"></td></tr>
<tr><td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.email_message}" /></td></tr>
<tr>
<td style="padding-left:16px"><h:outputText value="#{msg.subject}"/>:</td>
<td width="90%">
<h:inputText id="subject" value="#{NewActionWizard.actionProperties.subject}" size="75" maxlength="1024"
onkeyup="javascript:checkButtonState();" />&nbsp;*
</td>
</tr>
<tr>
<td></td>
<td valign="top">
<table cellspacing=0 cellpadding=2 border=0
<tr>
<td><h:outputText value="#{msg.action_mail_template}"/>:</td>
<td>
<%-- Templates drop-down selector --%>
<h:selectOneMenu value="#{NewActionWizard.actionProperties.template}">
<f:selectItems value="#{TemplateSupportBean.emailTemplates}" />
</h:selectOneMenu>
</td>
<td><h:commandButton value="#{msg.insert_template}" actionListener="#{NewActionWizard.insertTemplate}" styleClass="wizardButton" /></td>
<td><h:commandButton value="#{msg.discard_template}" actionListener="#{NewActionWizard.discardTemplate}" styleClass="wizardButton" disabled="#{NewActionWizard.usingTemplate == null}" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding-left:16px"><h:outputText value="#{msg.message}"/>:</td>
<td>
<h:inputTextarea value="#{NewActionWizard.actionProperties.message}"
rows="4" cols="75" disabled="#{NewActionWizard.usingTemplate != null}" />
</td>
</tr>
<tr><td class="paddingRow"></td></tr>
<tr>
<td colspan="2"><h:outputText value="#{NewActionWizard.stepInstructions}" /></td>

View File

@@ -129,46 +129,39 @@
</td>
</tr>
<%-- Enter the message subject and body --%>
<tr><td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.email_message}" /></td></tr>
<tr>
<td><h:outputText value="#{msg.subject}" />:</td>
<td style="padding-left:16px"><h:outputText value="#{msg.subject}"/>:</td>
<td>
<h:inputText value="#{InviteContentUsersWizard.subject}" size="50" maxlength="256" />
<h:inputText id="subject" value="#{InviteContentUsersWizard.subject}" size="75" maxlength="1024" />&nbsp;*
</td>
</tr>
<tr><td colspan="2" class="paddingRow"></td></tr>
<tr><td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.action_mail_message_text}"/></td></tr>
<tr>
<td valign="top"><h:outputText value="#{msg.body}" />:</td>
<td>
<h:inputTextarea value="#{InviteContentUsersWizard.body}" rows="2" cols="48" />
</td>
</tr>
<tr>
<td colspan=2>
<table border=0 cellspacing=2 cellpadding=0>
<tr valign="top">
<td></td>
<td valign="top">
<table cellspacing=0 cellpadding=2 border=0
<tr>
<td><h:outputText value="#{msg.action_mail_template}"/>:</td>
<td>
<h:outputText value="#{msg.automatic_text}" />:
</td>
<td>
<h:outputText escape="false" value="#{InviteContentUsersWizard.automaticText}" />
<%-- Templates drop-down selector --%>
<h:selectOneMenu value="#{InviteContentUsersWizard.template}">
<f:selectItems value="#{TemplateSupportBean.emailTemplates}" />
</h:selectOneMenu>
</td>
<td><h:commandButton value="#{msg.insert_template}" actionListener="#{InviteContentUsersWizard.insertTemplate}" styleClass="wizardButton" /></td>
<td><h:commandButton value="#{msg.discard_template}" actionListener="#{InviteContentUsersWizard.discardTemplate}" styleClass="wizardButton" disabled="#{InviteContentUsersWizard.usingTemplate == null}" /></td>
</tr>
</table>
</td>
</tr>
<%-- template selector --%>
<tr><td colspan="2" class="paddingRow"></td></tr>
<tr><td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.action_mail_template_text}"/></td></tr>
<tr>
<td valign="top"><h:outputText value="#{msg.action_mail_template}"/>:</td>
<td style="padding-left:16px"><h:outputText value="#{msg.message}"/>:</td>
<td>
<%-- Email templates drop-down selector --%>
<h:selectOneMenu value="#{InviteContentUsersWizard.template}">
<f:selectItems value="#{TemplateSupportBean.emailTemplates}" />
</h:selectOneMenu>
<h:inputTextarea value="#{InviteContentUsersWizard.body}"
rows="4" cols="75" disabled="#{InviteContentUsersWizard.usingTemplate != null}" />
</td>
</tr>

View File

@@ -129,46 +129,39 @@
</td>
</tr>
<%-- Enter the message subject and body --%>
<tr><td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.email_message}" /></td></tr>
<tr>
<td><h:outputText value="#{msg.subject}" />:</td>
<td style="padding-left:16px"><h:outputText value="#{msg.subject}"/>:</td>
<td>
<h:inputText value="#{InviteSpaceUsersWizard.subject}" size="50" maxlength="256" />
<h:inputText id="subject" value="#{InviteSpaceUsersWizard.subject}" size="75" maxlength="1024" />&nbsp;*
</td>
</tr>
<tr><td colspan="2" class="paddingRow"></td></tr>
<tr><td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.action_mail_message_text}"/></td></tr>
<tr>
<td valign="top"><h:outputText value="#{msg.body}" />:</td>
<td>
<h:inputTextarea value="#{InviteSpaceUsersWizard.body}" rows="2" cols="48" />
</td>
</tr>
<tr>
<td colspan=2>
<table border=0 cellspacing=2 cellpadding=0>
<tr valign="top">
<td></td>
<td valign="top">
<table cellspacing=0 cellpadding=2 border=0
<tr>
<td><h:outputText value="#{msg.action_mail_template}"/>:</td>
<td>
<h:outputText value="#{msg.automatic_text}" />:
</td>
<td>
<h:outputText escape="false" value="#{InviteSpaceUsersWizard.automaticText}" />
<%-- Templates drop-down selector --%>
<h:selectOneMenu value="#{InviteSpaceUsersWizard.template}">
<f:selectItems value="#{TemplateSupportBean.emailTemplates}" />
</h:selectOneMenu>
</td>
<td><h:commandButton value="#{msg.insert_template}" actionListener="#{InviteSpaceUsersWizard.insertTemplate}" styleClass="wizardButton" /></td>
<td><h:commandButton value="#{msg.discard_template}" actionListener="#{InviteSpaceUsersWizard.discardTemplate}" styleClass="wizardButton" disabled="#{InviteSpaceUsersWizard.usingTemplate == null}" /></td>
</tr>
</table>
</td>
</tr>
<%-- template selector --%>
<tr><td colspan="2" class="paddingRow"></td></tr>
<tr><td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.action_mail_template_text}"/></td></tr>
<tr>
<td valign="top"><h:outputText value="#{msg.action_mail_template}"/>:</td>
<td style="padding-left:16px"><h:outputText value="#{msg.message}"/>:</td>
<td>
<%-- Email templates drop-down selector --%>
<h:selectOneMenu value="#{InviteSpaceUsersWizard.template}">
<f:selectItems value="#{TemplateSupportBean.emailTemplates}" />
</h:selectOneMenu>
<h:inputTextarea value="#{InviteSpaceUsersWizard.body}"
rows="4" cols="75" disabled="#{InviteSpaceUsersWizard.usingTemplate != null}" />
</td>
</tr>

View File

@@ -126,51 +126,22 @@
<td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.set_action_values}" /></td>
</tr>
<%-- Select the email receipients --%>
<tr><td colspan="2" class="paddingRow"></td></tr>
<tr><td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.message_recipients}" /></td></tr>
<tr><td colspan="2" style="padding-left:12px">1. <h:outputText value="#{msg.select_recipients}" /></td></tr>
<tr>
<td><h:outputText value="#{msg.subject}"/>:</td>
<td width="90%">
<h:inputText id="subject" value="#{NewRuleWizard.actionProperties.subject}" size="75" maxlength="1024"
onkeyup="javascript:checkButtonState();" />&nbsp;*
</td>
</tr>
<tr><td colspan="2" class="paddingRow"></td></tr>
<tr><td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.action_mail_message_text}"/></td></tr>
<tr>
<td valign="top"><h:outputText value="#{msg.message}"/>:</td>
<td>
<h:inputTextarea value="#{NewRuleWizard.actionProperties.message}"
rows="4" cols="75" />
</td>
</tr>
<tr><td colspan="2" class="paddingRow"></td></tr>
<tr><td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.action_mail_template_text}"/></td></tr>
<tr>
<td valign="top"><h:outputText value="#{msg.action_mail_template}"/>:</td>
<td>
<%-- Templates drop-down selector --%>
<h:selectOneMenu value="#{NewRuleWizard.actionProperties.template}">
<f:selectItems value="#{TemplateSupportBean.emailTemplates}" />
</h:selectOneMenu>
</td>
</tr>
<tr><td colspan="2" class="paddingRow"></td></tr>
<tr><td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.selected_recipients}" /></td></tr>
<tr>
<td></td>
<%-- Picker to select Users/Groups --%>
<td>
<%-- Generic Picker to select Users/Groups --%>
<td colspan=2 style="padding-left:16px">
<a:genericPicker id="picker" filters="#{InviteSpaceUsersWizard.filters}"
queryCallback="#{InviteSpaceUsersWizard.pickerCallback}"
actionListener="#{NewRuleWizard.addRecipient}" />
</td>
</tr>
<tr><td colspan="2" style="padding-left:12px">2. <h:outputText value="#{msg.selected_recipients}" /></td></tr>
<tr>
<td valign="top"><h:outputText value="#{msg.to}"/>:</td>
<td>
<td colspan=2 style="padding-left:12px">
<h:dataTable value="#{NewRuleWizard.emailRecipientsDataModel}" var="row"
rowClasses="selectedItemsRow,selectedItemsRowAlt"
styleClass="selectedItems" headerClass="selectedItemsHeader"
@@ -200,6 +171,44 @@
</td>
</tr>
<%-- Enter the message subject and body --%>
<tr><td colspan="2" class="paddingRow"></td></tr>
<tr><td colspan="2" class="mainSubTitle"><h:outputText value="#{msg.email_message}" /></td></tr>
<tr>
<td style="padding-left:16px"><h:outputText value="#{msg.subject}"/>:</td>
<td width="90%">
<h:inputText id="subject" value="#{NewRuleWizard.actionProperties.subject}" size="75" maxlength="1024"
onkeyup="javascript:checkButtonState();" />&nbsp;*
</td>
</tr>
<tr>
<td></td>
<td valign="top">
<table cellspacing=0 cellpadding=2 border=0
<tr>
<td><h:outputText value="#{msg.action_mail_template}"/>:</td>
<td>
<%-- Templates drop-down selector --%>
<h:selectOneMenu value="#{NewRuleWizard.actionProperties.template}">
<f:selectItems value="#{TemplateSupportBean.emailTemplates}" />
</h:selectOneMenu>
</td>
<td><h:commandButton value="#{msg.insert_template}" actionListener="#{NewRuleWizard.insertTemplate}" styleClass="wizardButton" /></td>
<td><h:commandButton value="#{msg.discard_template}" actionListener="#{NewRuleWizard.discardTemplate}" styleClass="wizardButton" disabled="#{NewRuleWizard.usingTemplate == null}" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding-left:16px"><h:outputText value="#{msg.message}"/>:</td>
<td>
<h:inputTextarea value="#{NewRuleWizard.actionProperties.message}"
rows="4" cols="75" disabled="#{NewRuleWizard.usingTemplate != null}" />
</td>
</tr>
<tr><td class="paddingRow"></td></tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>