]> git.mxchange.org Git - pizzaservice-war.git/blob - web/admin/category.xhtml
added some http-only configuration to avoid common XSS
[pizzaservice-war.git] / web / admin / category.xhtml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml"
4           xmlns:ui="http://java.sun.com/jsf/facelets"
5           xmlns:h="http://xmlns.jcp.org/jsf/html"
6           xmlns:f="http://xmlns.jcp.org/jsf/core"
7           >
8
9         <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
10                 <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_CATEGORIES}</ui:define>
11
12                 <ui:define name="content_header">
13                         #{msg.CONTENT_TITLE_ADMIN_CATEGORIES}
14                 </ui:define>
15
16                 <ui:define name="content">
17                         <div class="para">
18                                 <h:form id="form">
19                                         <h:dataTable id="categories" var="cat" value="#{controller.allCategories}" styleClass="table" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_CATEGORY}">
20                                                 <h:column>
21                                                         <f:facet name="header">#{msg.SELECT_ENTRY}</f:facet>
22                                                         #{cat.categoryId}:
23                                                         <h:selectBooleanCheckbox class="input" value="true" />
24                                                 </h:column>
25
26                                                 <h:column>
27                                                         <f:facet name="header">#{msg.ADMIN_ENTER_CATEGORY_TITLE}</f:facet>
28                                                                 #{cat.categoryTitle}
29                                                 </h:column>
30
31                                                 <h:column>
32                                                         <f:facet name="header">#{msg.ADMIN_PARENT_CATEGORY}</f:facet>
33                                                                 #{cat.parentCategory.categoryId}
34                                                 </h:column>
35                                         </h:dataTable>
36
37                                         <div class="table_footer">
38                                                 <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
39                                                 <h:commandButton class="submit" type="submit" id="edit" action="#{admin_category.editCategory(cat)}" value="#{msg.ADMIN_BUTTON_EDIT_ENTRIES}" />
40                                                 <h:commandButton class="delete" type="submit" id="delete" action="#{admin_category.deleteCategory(cat)}" value="#{msg.ADMIN_BUTTON_DELETE_ENTRIES}" />
41                                         </div>
42                                 </h:form>
43                         </div>
44
45                         <div class="para">
46                                 <h:form id="add_category">
47                                         <div class="table">
48                                                 <div class="table_header">
49                                                         #{msg.ADMIN_ADD_CATEGORY_TITLE}
50                                                 </div>
51
52                                                 <fieldset id="product_data">
53                                                         <legend>#{msg.PLEASE_FILL_ALL_FIELDS}</legend>
54
55                                                         <div class="table_row">
56                                                                 <div class="table_left">
57                                                                         #{msg.ADMIN_ENTER_CATEGORY_TITLE}
58                                                                         <div class="tiny">#{msg.ADMIN_ENTER_CATEGORY_TITLE_EXAMPLE}</div>
59                                                                 </div>
60
61                                                                 <div class="table_right">
62                                                                         <h:inputText class="input" id="guest_title" value="#{admin_category.categoryTitle}" size="10" maxlength="255" required="true" />
63                                                                 </div>
64
65                                                                 <div class="clear"></div>
66                                                         </div>
67
68                                                         <div class="table_row">
69                                                                 <div class="table_left">
70                                                                         #{msg.ADMIN_PARENT_CATEGORY}
71                                                                 </div>
72
73                                                                 <div class="table_right">
74                                                                         <ui:include src="/WEB-INF/templates/admin/admin_parent_category_selection_box.tpl" />
75                                                                 </div>
76
77                                                                 <div class="clear"></div>
78                                                         </div>
79                                                 </fieldset>
80
81                                                 <div class="table_footer">
82                                                         <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
83                                                         <h:commandButton class="submit" type="submit" action="#{admin_category.addCategory()}" value="#{msg.ADMIN_BUTTON_ADD_CATEGORY}" />
84                                                 </div>
85                                         </div>
86                                 </h:form>
87                         </div>
88                 </ui:define>
89         </ui:composition>
90 </html>