Skip to content

Commit

Permalink
Merge pull request #3573 from IQSS/3036-support-form-math-bug
Browse files Browse the repository at this point in the history
3036 support form math bug
  • Loading branch information
kcondon authored Jan 24, 2017
2 parents 531cd75 + f8d654e commit d958d7d
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 9 deletions.
8 changes: 8 additions & 0 deletions src/main/java/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ footer.privacyPolicy=Privacy Policy
footer.poweredby=Powered by
footer.dataverseProject=The Dataverse Project

# messages.xhtml

messages.error=Error
messages.success=Success!
messages.info=Info
messages.validation=Validation Error
messages.validation.msg=Required fields were missed or there was a validation error. Please scroll down to see details.

# contactFormFragment.xhtml

contact.header=Contact Dataverse Support
Expand Down
44 changes: 35 additions & 9 deletions src/main/webapp/resources/iqbs/messages.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,58 @@

<cc:interface>
<cc:attribute name="collapsible" default="false" />
</cc:interface>
</cc:interface>

<cc:implementation>
<ui:fragment rendered="#{not empty flash['successMsg']}">
<div class="alert alert-success">
<span class="glyphicon glyphicon glyphicon-ok-sign"></span>&#160;<strong>Success!</strong><h:outputText escape="false" value="#{flash['successMsg']}"/>
<span class="glyphicon glyphicon glyphicon-ok-sign"></span>&#160;<strong>#{bundle['messages.success']}</strong><h:outputText escape="false" value="#{flash['successMsg']}"/>
</div>
</ui:fragment>
<ui:fragment rendered="#{not empty flash['errorMsg']}">
<div class="alert alert-danger">
<span class="glyphicon glyphicon-exclamation-sign"></span>&#160;<strong>Error</strong><h:outputText escape="false" value="#{flash['errorMsg']} "/>
Please contact <a href="#" onclick="event.preventDefault();PF('contactForm').show();" title="Contact Dataverse Support">Dataverse Support</a> for assistance.
<ui:fragment>
<ui:remove>
Note: having a rendered attribute in the ui:fragment that referenced flash scope broke the actionListener below.
As a workaround, we have moved that logic into the div style attribute below.
</ui:remove>
<div class="alert alert-danger" style="display:#{not empty flash['errorMsg']?'block':'none' }">

<!-- <h:outputText escape="false" value="# {flash['errorMsg']} "/>
Please contact <a href="#" onclick="event.preventDefault();PF('contactForm').show();" title="Contact Dataverse Support">Dataverse Support</a> for assistance. -->

<o:form useRequestURI="true">

<span class="glyphicon glyphicon-exclamation-sign"></span>&#160;<strong>#{bundle['messages.error']}</strong>

<h:outputText value="#{flash['errorMsg']} " escape="false"/>

<h:outputFormat value="#{bundle['error.support.message']}" escape="false">
<o:param>
<p:commandLink value="#{bundle['contact.support']}" oncomplete="PF('contactForm').show()" update=":contactDialog" actionListener="#{sendFeedbackDialog.initUserInput}">
<f:setPropertyActionListener target="#{sendFeedbackDialog.messageSubject}" value=""/>
<f:setPropertyActionListener target="#{sendFeedbackDialog.recipient}" value="#{null}"/>
<f:setPropertyActionListener target="#{sendFeedbackDialog.userMessage}" value=""/>
<f:setPropertyActionListener target="#{sendFeedbackDialog.userEmail}" value=""/>
</p:commandLink>
</o:param>
</h:outputFormat>

</o:form>

</div>
</ui:fragment>
<ui:fragment rendered="#{not empty flash['infoMsg']}">
<div class="alert alert-info">
<span class="glyphicon glyphicon-exclamation-sign"></span>&#160;<strong>Info</strong><h:outputText escape="false" value="#{flash['infoMsg']} "/>
<span class="glyphicon glyphicon-exclamation-sign"></span>&#160;<strong>#{bundle['messages.info']}</strong><h:outputText escape="false" value="#{flash['infoMsg']} "/>
</div>
</ui:fragment>
<ui:fragment rendered="#{not empty flash['warningMsg']}">
<div class="alert alert-warning">
<span class="glyphicon glyphicon-exclamation-sign"></span>&#160;<strong>Info</strong><h:outputText escape="false" value="#{flash['warningMsg']} "/>
<span class="glyphicon glyphicon-exclamation-sign"></span>&#160;<strong>#{bundle['messages.info']}</strong><h:outputText escape="false" value="#{flash['warningMsg']} "/>
</div>
</ui:fragment>
<ui:fragment rendered="#{facesContext.validationFailed}">
<div class="alert alert-danger">
<span class="glyphicon glyphicon-exclamation-sign"></span>&#160;<strong>Validation Error</strong>Please scroll down to see details.
<span class="glyphicon glyphicon-exclamation-sign"></span>&#160;<strong>#{bundle['messages.validation']}</strong>#{bundle['messages.validation.msg']}
</div>
</ui:fragment>
<ui:repeat rendered="#{!facesContext.validationFailed}" value="#{facesContext.messageList}" var="msg">
Expand All @@ -48,6 +73,7 @@
</ui:fragment>
<span class="glyphicon glyphicon-info-sign"></span>&#160;<strong>#{msg.summary}</strong>&#160;<h:outputText value="#{msg.detail}" rendered="#{!empty msg.detail and (msg.detail != msg.summary)}"/>
<ui:fragment rendered="#{level eq 'FATAL'}">
<!-- FIXME: Dataverse Support -->
Please contact <a href="#" onclick="event.preventDefault();PF('contactForm').show();" title="Contact Dataverse Support">Dataverse Support</a> for assistance.
<strong>Date/Time: </strong>
<h:outputText value="#{now}">
Expand Down

0 comments on commit d958d7d

Please sign in to comment.