This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
/
edit_home_content.xhtml
52 lines (42 loc) · 1.98 KB
/
edit_home_content.xhtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.org/schema/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
template="/WEB-INF/template/template_2x.xhtml">
<ui:define name="page_title">#{msgs['jsf.EditHomePage']}</ui:define>
<ui:define name="center_content">
<!-- TODO pahuang do we need this? -->
<a4j:jsFunction name="cancelEditHomeContent" action="#{serverConfigurationBean.cancel()}" />
<h1>#{msgs['jsf.HomepageContent']}</h1>
<h:form id="homeContentForm">
<s:token allowMultiplePosts="true"/>
<div class="js-commonmark">
<rich:panel id="loggedIn">
<h:inputTextarea id="homeContent"
required="false"
value="#{serverConfigurationBean.homeContent}"
styleClass="code_editor text-editor js-commonmark__editor"/>
<div style="clear:both"></div>
</rich:panel>
<div class="actionButtons">
<h:commandButton id="update"
value="#{msgs['jsf.Update']}"
action="#{serverConfigurationBean.updateHomeContent}"/>
<h:button id="cancel" outcome="/home.xhtml"
value="#{msgs['jsf.Cancel']}"
onclick="cancelEditHomeContent()"/>
</div>
<hr/>
<div id="home-content-preview" class="prose prose--preview js-commonmark__preview"></div>
</div>
<h:outputScript target="body" library="webjars" name="${commonMarkRenderer.outputScriptNameSanitizer}"/>
<h:outputScript target="body" library="webjars" name="${commonMarkRenderer.outputScriptName}"/>
<h:outputScript target="body" library="script" name="commonmark-preview.js"/>
</h:form>
</ui:define>
</ui:composition>