diff options
Diffstat (limited to 'id/ConfigWebTool/src/main/webapp')
46 files changed, 1627 insertions, 250 deletions
diff --git a/id/ConfigWebTool/src/main/webapp/WEB-INF/log4j.properties b/id/ConfigWebTool/src/main/webapp/WEB-INF/log4j.properties index 3ca86f404..1c5b79e8f 100644 --- a/id/ConfigWebTool/src/main/webapp/WEB-INF/log4j.properties +++ b/id/ConfigWebTool/src/main/webapp/WEB-INF/log4j.properties @@ -1,3 +1,25 @@ +############################################################################### +# Copyright 2014 Federal Chancellery Austria +# MOA-ID has been developed in a cooperation between BRZ, the Federal +# Chancellery Austria - ICT staff unit, and Graz University of Technology. +# +# Licensed under the EUPL, Version 1.1 or - as soon they will be approved by +# the European Commission - subsequent versions of the EUPL (the "Licence"); +# You may not use this work except in compliance with the Licence. +# You may obtain a copy of the Licence at: +# http://www.osor.eu/eupl/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the Licence is distributed on an "AS IS" basis, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Licence for the specific language governing permissions and +# limitations under the Licence. +# +# This product combines work with different licenses. See the "NOTICE" text +# file for details on the various modules and licenses. +# The "NOTICE" text file is part of the distribution. Any derivative works +# that you distribute must include a readable copy of the "NOTICE" text file. +############################################################################### # Set root category priority to INFO and its only appender to CONSOLE. log4j.rootCategory=INFO, CONSOLE #log4j.rootCategory=INFO, CONSOLE, LOGFILE diff --git a/id/ConfigWebTool/src/main/webapp/WEB-INF/web.xml b/id/ConfigWebTool/src/main/webapp/WEB-INF/web.xml index 7b27b0c4d..a44cf8ce5 100644 --- a/id/ConfigWebTool/src/main/webapp/WEB-INF/web.xml +++ b/id/ConfigWebTool/src/main/webapp/WEB-INF/web.xml @@ -24,7 +24,7 @@ </init-param> <init-param> <param-name>allowed</param-name> - <param-value>^.*((/index.action)|(/error.action)|(/authenticate.action)|(/logout.action)|(/jsp/.*)|(/css/.*)|(/images/.*)|(/js/.*))$</param-value> + <param-value>^.*((/index.action)|(/error.action)|(/authenticate.action)|(/pvp2login.action.*)|(/mailAddressVerification.action.*)|(/logout.action)|(/jsp/.*)|(/css/.*)|(/servlet/.*)|(/images/.*)|(/js/.*))$</param-value> </init-param> </filter> <filter-mapping> @@ -61,6 +61,28 @@ </init-param> </filter> + <servlet> + <servlet-name>pvp2login</servlet-name> + <display-name>pvp2login</display-name> + <servlet-class>at.gv.egovernment.moa.id.configuration.auth.pvp2.Authenticate</servlet-class> + </servlet> + + <servlet> + <servlet-name>buildmetadata</servlet-name> + <display-name>buildmetadata</display-name> + <servlet-class>at.gv.egovernment.moa.id.configuration.auth.pvp2.BuildMetadata</servlet-class> + </servlet> + + <servlet-mapping> + <servlet-name>buildmetadata</servlet-name> + <url-pattern>/servlet/metadata</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>pvp2login</servlet-name> + <url-pattern>/servlet/pvp2login</url-pattern> + </servlet-mapping> + <!-- <filter-mapping> <filter-name>sitemash</filter-name> <url-pattern>/*</url-pattern> diff --git a/id/ConfigWebTool/src/main/webapp/css/colorpicker.css b/id/ConfigWebTool/src/main/webapp/css/colorpicker.css new file mode 100644 index 000000000..0b3d5d936 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/css/colorpicker.css @@ -0,0 +1,161 @@ +.colorpicker { + width: 356px; + height: 176px; + overflow: hidden; + position: absolute; + background: url(../images/colorpicker_background.png); + font-family: Arial, Helvetica, sans-serif; + display: none; +} +.colorpicker_color { + width: 150px; + height: 150px; + left: 14px; + top: 13px; + position: absolute; + background: #f00; + overflow: hidden; + cursor: crosshair; +} +.colorpicker_color div { + position: absolute; + top: 0; + left: 0; + width: 150px; + height: 150px; + background: url(../images/colorpicker_overlay.png); +} +.colorpicker_color div div { + position: absolute; + top: 0; + left: 0; + width: 11px; + height: 11px; + overflow: hidden; + background: url(../images/colorpicker_select.gif); + margin: -5px 0 0 -5px; +} +.colorpicker_hue { + position: absolute; + top: 13px; + left: 171px; + width: 35px; + height: 150px; + cursor: n-resize; +} +.colorpicker_hue div { + position: absolute; + width: 35px; + height: 9px; + overflow: hidden; + background: url(../images/colorpicker_indic.gif) left top; + margin: -4px 0 0 0; + left: 0px; +} +.colorpicker_new_color { + position: absolute; + width: 60px; + height: 30px; + left: 213px; + top: 13px; + background: #f00; +} +.colorpicker_current_color { + position: absolute; + width: 60px; + height: 30px; + left: 283px; + top: 13px; + background: #f00; +} +.colorpicker input { + background-color: transparent; + border: 1px solid transparent; + position: absolute; + font-size: 10px; + font-family: Arial, Helvetica, sans-serif; + color: #898989; + top: 4px; + right: 11px; + text-align: right; + margin: 0; + padding: 0; + height: 11px; +} +.colorpicker_hex { + position: absolute; + width: 72px; + height: 22px; + background: url(../images/colorpicker_hex.png) top; + left: 212px; + top: 142px; +} +.colorpicker_hex input { + right: 6px; +} +.colorpicker_field { + height: 22px; + width: 62px; + background-position: top; + position: absolute; +} +.colorpicker_field span { + position: absolute; + width: 12px; + height: 22px; + overflow: hidden; + top: 0; + right: 0; + cursor: n-resize; +} +.colorpicker_rgb_r { + background-image: url(../images/colorpicker_rgb_r.png); + top: 52px; + left: 212px; +} +.colorpicker_rgb_g { + background-image: url(../images/colorpicker_rgb_g.png); + top: 82px; + left: 212px; +} +.colorpicker_rgb_b { + background-image: url(../images/colorpicker_rgb_b.png); + top: 112px; + left: 212px; +} +.colorpicker_hsb_h { + background-image: url(../images/colorpicker_hsb_h.png); + top: 52px; + left: 282px; +} +.colorpicker_hsb_s { + background-image: url(../images/colorpicker_hsb_s.png); + top: 82px; + left: 282px; +} +.colorpicker_hsb_b { + background-image: url(../images/colorpicker_hsb_b.png); + top: 112px; + left: 282px; +} +.colorpicker_submit { + position: absolute; + width: 22px; + height: 22px; + background: url(../images/colorpicker_submit.png) top; + left: 322px; + top: 142px; + overflow: hidden; +} +.colorpicker_focus { + background-position: center; +} +.colorpicker_hex.colorpicker_focus { + background-position: bottom; +} +.colorpicker_submit.colorpicker_focus { + background-position: bottom; +} +.colorpicker_slider { + background-position: bottom; +} diff --git a/id/ConfigWebTool/src/main/webapp/css/index.css b/id/ConfigWebTool/src/main/webapp/css/index.css index 6eeb6a4ee..14591f1dc 100644 --- a/id/ConfigWebTool/src/main/webapp/css/index.css +++ b/id/ConfigWebTool/src/main/webapp/css/index.css @@ -22,6 +22,34 @@ padding-right: 25px; } +#passwordlogin { + float: left; +} + +#bkulogin { + float: left; + margin-left: 50px; +} + +#bkuloginbutton { + background:-moz-linear-gradient(bottom,#b3b3b3,#f1f1f1); /* Firefox */ + background:-webkit-gradient(linear,left top,left bottom,from(#b3b3b3),to(#f1f1f1)); /* Chrome, Safari */ + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3',endColorstr='#f1f1f1'); + + display: block; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + width: 200px; + /* background-color: gold; */ + border-radius: 10px; + box-shadow: 8px 8px 8px #666; + border-style: solid; + border-color: black; + border-width: 2px; + +} + #menu_area { margin-top: 25px; border-color: black; @@ -106,6 +134,33 @@ display: none; } +#formcustom_button_hidden { + display: none; +} + +#formcustom_button_show { + margin-bottom: 50px; + clear: both; +} + +#formcustom_area { + margin-bottom: 50px; +} + +#formCustomValues { + float: left; +} + +#formCustomPreview { + float: left; + margin-bottom: 25px; + margin-left: 25px; +} + +#mail_area input { + float: right; +} + .oa_protocol_area { clear: both; margin-left: 25px; @@ -147,6 +202,7 @@ margin-top: 6px; } + .oa_config_block h3 { padding-top: 25px; } @@ -184,7 +240,7 @@ } .wwgrp { - clear:both; + clear:left; } #oa_saml1_area .wwgrp { @@ -193,6 +249,10 @@ margin-right: 50px; } +#oa_config_businessservice .wwgrp { + clear: none; +} + div .wwgrp br { display: none; } @@ -202,6 +262,15 @@ div .wwgrp br { } +.textfield_middle { + width: 100px; + +} + +.textfield_mail { + width: 300px; +} + .textfield_long { width: 600px; @@ -212,7 +281,13 @@ div .wwgrp br { height: 200px; text-align: left; } - + +.selectfield { + width: 80px; + float: left; + margin-right: 5px; +} + .checkbox{ margin-top: 7px; } @@ -271,13 +346,19 @@ div .wwgrp br { width: 200px; } -.userListThird { +.userListFirstSecond { position: relative; + width: 400px; float: left; } -.disabled { +.userListThird { + position: relative; + float: left; +} +#usernamepassword_area { + display: none; } #footer_area { diff --git a/id/ConfigWebTool/src/main/webapp/error.jsp b/id/ConfigWebTool/src/main/webapp/error.jsp index 97dc218e7..8993c1102 100644 --- a/id/ConfigWebTool/src/main/webapp/error.jsp +++ b/id/ConfigWebTool/src/main/webapp/error.jsp @@ -1,3 +1,4 @@ +<%@page import="at.gv.egovernment.moa.id.configuration.config.ConfigurationProvider"%> <%@page import="at.gv.egovernment.moa.id.configuration.helper.LanguageHelper"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> @@ -11,10 +12,11 @@ <title><%=LanguageHelper.getGUIString("title", request) %></title> </head> - <body> - <h1><%=LanguageHelper.getGUIString("webpages.error.header", request) %></h1> + <body style="text-align: center;"> + <h1 style="color: red;"><%=LanguageHelper.getGUIString("webpages.error.header", request) %></h1> <div id="information_area"> + <p><%=LanguageHelper.getGUIString("error.general.text", request) %></p> <s:if test="hasActionErrors()"> <div id="error_area"> <label><%=LanguageHelper.getGUIString("error.title", request) %></label> diff --git a/id/ConfigWebTool/src/main/webapp/images/blank.gif b/id/ConfigWebTool/src/main/webapp/images/blank.gif Binary files differnew file mode 100644 index 000000000..75b945d25 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/blank.gif diff --git a/id/ConfigWebTool/src/main/webapp/images/colorpicker_background.png b/id/ConfigWebTool/src/main/webapp/images/colorpicker_background.png Binary files differnew file mode 100644 index 000000000..8401572f1 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/colorpicker_background.png diff --git a/id/ConfigWebTool/src/main/webapp/images/colorpicker_hex.png b/id/ConfigWebTool/src/main/webapp/images/colorpicker_hex.png Binary files differnew file mode 100644 index 000000000..4e532d7c6 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/colorpicker_hex.png diff --git a/id/ConfigWebTool/src/main/webapp/images/colorpicker_hsb_b.png b/id/ConfigWebTool/src/main/webapp/images/colorpicker_hsb_b.png Binary files differnew file mode 100644 index 000000000..dfac595d0 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/colorpicker_hsb_b.png diff --git a/id/ConfigWebTool/src/main/webapp/images/colorpicker_hsb_h.png b/id/ConfigWebTool/src/main/webapp/images/colorpicker_hsb_h.png Binary files differnew file mode 100644 index 000000000..3977ed9f2 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/colorpicker_hsb_h.png diff --git a/id/ConfigWebTool/src/main/webapp/images/colorpicker_hsb_s.png b/id/ConfigWebTool/src/main/webapp/images/colorpicker_hsb_s.png Binary files differnew file mode 100644 index 000000000..a2a699736 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/colorpicker_hsb_s.png diff --git a/id/ConfigWebTool/src/main/webapp/images/colorpicker_indic.gif b/id/ConfigWebTool/src/main/webapp/images/colorpicker_indic.gif Binary files differnew file mode 100644 index 000000000..f9fa95e28 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/colorpicker_indic.gif diff --git a/id/ConfigWebTool/src/main/webapp/images/colorpicker_overlay.png b/id/ConfigWebTool/src/main/webapp/images/colorpicker_overlay.png Binary files differnew file mode 100644 index 000000000..561cdd9c5 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/colorpicker_overlay.png diff --git a/id/ConfigWebTool/src/main/webapp/images/colorpicker_rgb_b.png b/id/ConfigWebTool/src/main/webapp/images/colorpicker_rgb_b.png Binary files differnew file mode 100644 index 000000000..dfac595d0 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/colorpicker_rgb_b.png diff --git a/id/ConfigWebTool/src/main/webapp/images/colorpicker_rgb_g.png b/id/ConfigWebTool/src/main/webapp/images/colorpicker_rgb_g.png Binary files differnew file mode 100644 index 000000000..72b32760a --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/colorpicker_rgb_g.png diff --git a/id/ConfigWebTool/src/main/webapp/images/colorpicker_rgb_r.png b/id/ConfigWebTool/src/main/webapp/images/colorpicker_rgb_r.png Binary files differnew file mode 100644 index 000000000..4855fe03f --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/colorpicker_rgb_r.png diff --git a/id/ConfigWebTool/src/main/webapp/images/colorpicker_select.gif b/id/ConfigWebTool/src/main/webapp/images/colorpicker_select.gif Binary files differnew file mode 100644 index 000000000..599f7f13a --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/colorpicker_select.gif diff --git a/id/ConfigWebTool/src/main/webapp/images/colorpicker_submit.png b/id/ConfigWebTool/src/main/webapp/images/colorpicker_submit.png Binary files differnew file mode 100644 index 000000000..7f4c0825f --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/colorpicker_submit.png diff --git a/id/ConfigWebTool/src/main/webapp/images/custom_background.png b/id/ConfigWebTool/src/main/webapp/images/custom_background.png Binary files differnew file mode 100644 index 000000000..cf55ffdd6 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/custom_background.png diff --git a/id/ConfigWebTool/src/main/webapp/images/custom_hex.png b/id/ConfigWebTool/src/main/webapp/images/custom_hex.png Binary files differnew file mode 100644 index 000000000..888f44449 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/custom_hex.png diff --git a/id/ConfigWebTool/src/main/webapp/images/custom_hsb_b.png b/id/ConfigWebTool/src/main/webapp/images/custom_hsb_b.png Binary files differnew file mode 100644 index 000000000..2f99dae8e --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/custom_hsb_b.png diff --git a/id/ConfigWebTool/src/main/webapp/images/custom_hsb_h.png b/id/ConfigWebTool/src/main/webapp/images/custom_hsb_h.png Binary files differnew file mode 100644 index 000000000..a217e9218 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/custom_hsb_h.png diff --git a/id/ConfigWebTool/src/main/webapp/images/custom_hsb_s.png b/id/ConfigWebTool/src/main/webapp/images/custom_hsb_s.png Binary files differnew file mode 100644 index 000000000..7826b4150 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/custom_hsb_s.png diff --git a/id/ConfigWebTool/src/main/webapp/images/custom_indic.gif b/id/ConfigWebTool/src/main/webapp/images/custom_indic.gif Binary files differnew file mode 100644 index 000000000..222fb94cf --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/custom_indic.gif diff --git a/id/ConfigWebTool/src/main/webapp/images/custom_rgb_b.png b/id/ConfigWebTool/src/main/webapp/images/custom_rgb_b.png Binary files differnew file mode 100644 index 000000000..80764e5d6 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/custom_rgb_b.png diff --git a/id/ConfigWebTool/src/main/webapp/images/custom_rgb_g.png b/id/ConfigWebTool/src/main/webapp/images/custom_rgb_g.png Binary files differnew file mode 100644 index 000000000..fc9778be1 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/custom_rgb_g.png diff --git a/id/ConfigWebTool/src/main/webapp/images/custom_rgb_r.png b/id/ConfigWebTool/src/main/webapp/images/custom_rgb_r.png Binary files differnew file mode 100644 index 000000000..91b0cd4c5 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/custom_rgb_r.png diff --git a/id/ConfigWebTool/src/main/webapp/images/custom_submit.png b/id/ConfigWebTool/src/main/webapp/images/custom_submit.png Binary files differnew file mode 100644 index 000000000..cd202cd93 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/custom_submit.png diff --git a/id/ConfigWebTool/src/main/webapp/images/select.png b/id/ConfigWebTool/src/main/webapp/images/select.png Binary files differnew file mode 100644 index 000000000..21213bfd5 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/select.png diff --git a/id/ConfigWebTool/src/main/webapp/images/select2.png b/id/ConfigWebTool/src/main/webapp/images/select2.png Binary files differnew file mode 100644 index 000000000..2cd2cabeb --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/select2.png diff --git a/id/ConfigWebTool/src/main/webapp/images/slider.png b/id/ConfigWebTool/src/main/webapp/images/slider.png Binary files differnew file mode 100644 index 000000000..8b03da96e --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/images/slider.png diff --git a/id/ConfigWebTool/src/main/webapp/index.jsp b/id/ConfigWebTool/src/main/webapp/index.jsp index 4e49eac75..4c78699fc 100644 --- a/id/ConfigWebTool/src/main/webapp/index.jsp +++ b/id/ConfigWebTool/src/main/webapp/index.jsp @@ -13,42 +13,56 @@ <body> <h1><%=LanguageHelper.getGUIString("webpages.index.header", request) %></h1> - + <div id="information_area"> + + <s:if test="hasActionMessages()"> + <div id="message_area"> + <label><%=LanguageHelper.getGUIString("message.title", request) %></label> + <s:actionmessage/> + </div> + </s:if> + <s:if test="hasActionErrors()"> <div id="error_area"> - <label><%=LanguageHelper.getGUIString("error.title", request) %></label> - <s:actionerror/> - </div> - </s:if> + <label><%=LanguageHelper.getGUIString("error.title", request) %></label> + <s:actionerror/> + </div> + </s:if> <div id="information_area"> <p><%=LanguageHelper.getGUIString("webpages.index.desciption.head", request) %></p> <div class="oa_config_block"> - <s:form namespace="/" method="POST" enctype="multipart/form-data"> + <s:form id="passwordlogin" namespace="/" method="POST" enctype="multipart/form-data"> <s:textfield name="username" value="%{username}" labelposition="left" key="webpages.edituser.username" - cssClass="textfield_long" + cssClass="textfield_mail" maxlength="16"> </s:textfield> <s:password name="password" labelposition="left" key="webpages.edituser.password" - cssClass="textfield_long" + cssClass="textfield_mail" maxlength="16"> </s:password> <s:submit key="webpages.index.login" action="authenticate"/> </s:form> + + <s:if test="isPvp2LoginActiv()"> + <div id="bkulogin"> + <a id="bkuloginbutton" href="servlet/pvp2login"><%=LanguageHelper.getGUIString("webpages.index.login.pvp2", request) %></a> + </div> + </s:if> </div> - + </div> </body> diff --git a/id/ConfigWebTool/src/main/webapp/js/colorpicker.js b/id/ConfigWebTool/src/main/webapp/js/colorpicker.js new file mode 100644 index 000000000..d54c0d271 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/js/colorpicker.js @@ -0,0 +1,506 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ +/** + * + * Color picker + * Author: Stefan Petre www.eyecon.ro + * + * Dual licensed under the MIT and GPL licenses + * + */ +(function ($) { + var ColorPicker = function () { + var + ids = {}, + inAction, + charMin = 65, + visible, + tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>', + defaults = { + eventName: 'click', + onShow: function () {}, + onBeforeShow: function(){}, + onHide: function () {}, + onChange: function () {}, + onSubmit: function () {}, + color: 'ff0000', + livePreview: true, + flat: false + }, + fillRGBFields = function (hsb, cal) { + var rgb = HSBToRGB(hsb); + $(cal).data('colorpicker').fields + .eq(1).val(rgb.r).end() + .eq(2).val(rgb.g).end() + .eq(3).val(rgb.b).end(); + }, + fillHSBFields = function (hsb, cal) { + $(cal).data('colorpicker').fields + .eq(4).val(hsb.h).end() + .eq(5).val(hsb.s).end() + .eq(6).val(hsb.b).end(); + }, + fillHexFields = function (hsb, cal) { + $(cal).data('colorpicker').fields + .eq(0).val(HSBToHex(hsb)).end(); + }, + setSelector = function (hsb, cal) { + $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100})); + $(cal).data('colorpicker').selectorIndic.css({ + left: parseInt(150 * hsb.s/100, 10), + top: parseInt(150 * (100-hsb.b)/100, 10) + }); + }, + setHue = function (hsb, cal) { + $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10)); + }, + setCurrentColor = function (hsb, cal) { + $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb)); + }, + setNewColor = function (hsb, cal) { + $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb)); + }, + keyDown = function (ev) { + var pressedKey = ev.charCode || ev.keyCode || -1; + if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) { + return false; + } + var cal = $(this).parent().parent(); + if (cal.data('colorpicker').livePreview === true) { + change.apply(this); + } + }, + change = function (ev) { + var cal = $(this).parent().parent(), col; + if (this.parentNode.className.indexOf('_hex') > 0) { + cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value)); + } else if (this.parentNode.className.indexOf('_hsb') > 0) { + cal.data('colorpicker').color = col = fixHSB({ + h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10), + s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10), + b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10) + }); + } else { + cal.data('colorpicker').color = col = RGBToHSB(fixRGB({ + r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10), + g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10), + b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10) + })); + } + if (ev) { + fillRGBFields(col, cal.get(0)); + fillHexFields(col, cal.get(0)); + fillHSBFields(col, cal.get(0)); + } + setSelector(col, cal.get(0)); + setHue(col, cal.get(0)); + setNewColor(col, cal.get(0)); + cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]); + }, + blur = function (ev) { + var cal = $(this).parent().parent(); + cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus'); + }, + focus = function () { + charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65; + $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus'); + $(this).parent().addClass('colorpicker_focus'); + }, + downIncrement = function (ev) { + var field = $(this).parent().find('input').focus(); + var current = { + el: $(this).parent().addClass('colorpicker_slider'), + max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255), + y: ev.pageY, + field: field, + val: parseInt(field.val(), 10), + preview: $(this).parent().parent().data('colorpicker').livePreview + }; + $(document).bind('mouseup', current, upIncrement); + $(document).bind('mousemove', current, moveIncrement); + }, + moveIncrement = function (ev) { + ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10)))); + if (ev.data.preview) { + change.apply(ev.data.field.get(0), [true]); + } + return false; + }, + upIncrement = function (ev) { + change.apply(ev.data.field.get(0), [true]); + ev.data.el.removeClass('colorpicker_slider').find('input').focus(); + $(document).unbind('mouseup', upIncrement); + $(document).unbind('mousemove', moveIncrement); + return false; + }, + downHue = function (ev) { + var current = { + cal: $(this).parent(), + y: $(this).offset().top + }; + current.preview = current.cal.data('colorpicker').livePreview; + $(document).bind('mouseup', current, upHue); + $(document).bind('mousemove', current, moveHue); + }, + moveHue = function (ev) { + change.apply( + ev.data.cal.data('colorpicker') + .fields + .eq(4) + .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10)) + .get(0), + [ev.data.preview] + ); + return false; + }, + upHue = function (ev) { + fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + $(document).unbind('mouseup', upHue); + $(document).unbind('mousemove', moveHue); + return false; + }, + downSelector = function (ev) { + var current = { + cal: $(this).parent(), + pos: $(this).offset() + }; + current.preview = current.cal.data('colorpicker').livePreview; + $(document).bind('mouseup', current, upSelector); + $(document).bind('mousemove', current, moveSelector); + }, + moveSelector = function (ev) { + change.apply( + ev.data.cal.data('colorpicker') + .fields + .eq(6) + .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10)) + .end() + .eq(5) + .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10)) + .get(0), + [ev.data.preview] + ); + return false; + }, + upSelector = function (ev) { + fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); + $(document).unbind('mouseup', upSelector); + $(document).unbind('mousemove', moveSelector); + return false; + }, + enterSubmit = function (ev) { + $(this).addClass('colorpicker_focus'); + }, + leaveSubmit = function (ev) { + $(this).removeClass('colorpicker_focus'); + }, + clickSubmit = function (ev) { + var cal = $(this).parent(); + var col = cal.data('colorpicker').color; + cal.data('colorpicker').origColor = col; + setCurrentColor(col, cal.get(0)); + cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el); + }, + show = function (ev) { + var cal = $('#' + $(this).data('colorpickerId')); + cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]); + var pos = $(this).offset(); + var viewPort = getViewport(); + var top = pos.top + this.offsetHeight; + var left = pos.left; + if (top + 176 > viewPort.t + viewPort.h) { + top -= this.offsetHeight + 176; + } + if (left + 356 > viewPort.l + viewPort.w) { + left -= 356; + } + cal.css({left: left + 'px', top: top + 'px'}); + if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) { + cal.show(); + } + $(document).bind('mousedown', {cal: cal}, hide); + return false; + }, + hide = function (ev) { + if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) { + if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) { + ev.data.cal.hide(); + } + $(document).unbind('mousedown', hide); + } + }, + isChildOf = function(parentEl, el, container) { + if (parentEl == el) { + return true; + } + if (parentEl.contains) { + return parentEl.contains(el); + } + if ( parentEl.compareDocumentPosition ) { + return !!(parentEl.compareDocumentPosition(el) & 16); + } + var prEl = el.parentNode; + while(prEl && prEl != container) { + if (prEl == parentEl) + return true; + prEl = prEl.parentNode; + } + return false; + }, + getViewport = function () { + var m = document.compatMode == 'CSS1Compat'; + return { + l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft), + t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop), + w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth), + h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight) + }; + }, + fixHSB = function (hsb) { + return { + h: Math.min(360, Math.max(0, hsb.h)), + s: Math.min(100, Math.max(0, hsb.s)), + b: Math.min(100, Math.max(0, hsb.b)) + }; + }, + fixRGB = function (rgb) { + return { + r: Math.min(255, Math.max(0, rgb.r)), + g: Math.min(255, Math.max(0, rgb.g)), + b: Math.min(255, Math.max(0, rgb.b)) + }; + }, + fixHex = function (hex) { + var len = 6 - hex.length; + if (len > 0) { + var o = []; + for (var i=0; i<len; i++) { + o.push('0'); + } + o.push(hex); + hex = o.join(''); + } + return hex; + }, + HexToRGB = function (hex) { + var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16); + return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)}; + }, + HexToHSB = function (hex) { + return RGBToHSB(HexToRGB(hex)); + }, + RGBToHSB = function (rgb) { + var hsb = { + h: 0, + s: 0, + b: 0 + }; + var min = Math.min(rgb.r, rgb.g, rgb.b); + var max = Math.max(rgb.r, rgb.g, rgb.b); + var delta = max - min; + hsb.b = max; + if (max != 0) { + + } + hsb.s = max != 0 ? 255 * delta / max : 0; + if (hsb.s != 0) { + if (rgb.r == max) { + hsb.h = (rgb.g - rgb.b) / delta; + } else if (rgb.g == max) { + hsb.h = 2 + (rgb.b - rgb.r) / delta; + } else { + hsb.h = 4 + (rgb.r - rgb.g) / delta; + } + } else { + hsb.h = -1; + } + hsb.h *= 60; + if (hsb.h < 0) { + hsb.h += 360; + } + hsb.s *= 100/255; + hsb.b *= 100/255; + return hsb; + }, + HSBToRGB = function (hsb) { + var rgb = {}; + var h = Math.round(hsb.h); + var s = Math.round(hsb.s*255/100); + var v = Math.round(hsb.b*255/100); + if(s == 0) { + rgb.r = rgb.g = rgb.b = v; + } else { + var t1 = v; + var t2 = (255-s)*v/255; + var t3 = (t1-t2)*(h%60)/60; + if(h==360) h = 0; + if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3} + else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3} + else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3} + else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3} + else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3} + else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3} + else {rgb.r=0; rgb.g=0; rgb.b=0} + } + return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)}; + }, + RGBToHex = function (rgb) { + var hex = [ + rgb.r.toString(16), + rgb.g.toString(16), + rgb.b.toString(16) + ]; + $.each(hex, function (nr, val) { + if (val.length == 1) { + hex[nr] = '0' + val; + } + }); + return hex.join(''); + }, + HSBToHex = function (hsb) { + return RGBToHex(HSBToRGB(hsb)); + }, + restoreOriginal = function () { + var cal = $(this).parent(); + var col = cal.data('colorpicker').origColor; + cal.data('colorpicker').color = col; + fillRGBFields(col, cal.get(0)); + fillHexFields(col, cal.get(0)); + fillHSBFields(col, cal.get(0)); + setSelector(col, cal.get(0)); + setHue(col, cal.get(0)); + setNewColor(col, cal.get(0)); + }; + return { + init: function (opt) { + opt = $.extend({}, defaults, opt||{}); + if (typeof opt.color == 'string') { + opt.color = HexToHSB(opt.color); + } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) { + opt.color = RGBToHSB(opt.color); + } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) { + opt.color = fixHSB(opt.color); + } else { + return this; + } + return this.each(function () { + if (!$(this).data('colorpickerId')) { + var options = $.extend({}, opt); + options.origColor = opt.color; + var id = 'collorpicker_' + parseInt(Math.random() * 1000); + $(this).data('colorpickerId', id); + var cal = $(tpl).attr('id', id); + if (options.flat) { + cal.appendTo(this).show(); + } else { + cal.appendTo(document.body); + } + options.fields = cal + .find('input') + .bind('keyup', keyDown) + .bind('change', change) + .bind('blur', blur) + .bind('focus', focus); + cal + .find('span').bind('mousedown', downIncrement).end() + .find('>div.colorpicker_current_color').bind('click', restoreOriginal); + options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector); + options.selectorIndic = options.selector.find('div div'); + options.el = this; + options.hue = cal.find('div.colorpicker_hue div'); + cal.find('div.colorpicker_hue').bind('mousedown', downHue); + options.newColor = cal.find('div.colorpicker_new_color'); + options.currentColor = cal.find('div.colorpicker_current_color'); + cal.data('colorpicker', options); + cal.find('div.colorpicker_submit') + .bind('mouseenter', enterSubmit) + .bind('mouseleave', leaveSubmit) + .bind('click', clickSubmit); + fillRGBFields(options.color, cal.get(0)); + fillHSBFields(options.color, cal.get(0)); + fillHexFields(options.color, cal.get(0)); + setHue(options.color, cal.get(0)); + setSelector(options.color, cal.get(0)); + setCurrentColor(options.color, cal.get(0)); + setNewColor(options.color, cal.get(0)); + if (options.flat) { + cal.css({ + position: 'relative', + display: 'block' + }); + } else { + $(this).bind(options.eventName, show); + } + } + }); + }, + showPicker: function() { + return this.each( function () { + if ($(this).data('colorpickerId')) { + show.apply(this); + } + }); + }, + hidePicker: function() { + return this.each( function () { + if ($(this).data('colorpickerId')) { + $('#' + $(this).data('colorpickerId')).hide(); + } + }); + }, + setColor: function(col) { + if (typeof col == 'string') { + col = HexToHSB(col); + } else if (col.r != undefined && col.g != undefined && col.b != undefined) { + col = RGBToHSB(col); + } else if (col.h != undefined && col.s != undefined && col.b != undefined) { + col = fixHSB(col); + } else { + return this; + } + return this.each(function(){ + if ($(this).data('colorpickerId')) { + var cal = $('#' + $(this).data('colorpickerId')); + cal.data('colorpicker').color = col; + cal.data('colorpicker').origColor = col; + fillRGBFields(col, cal.get(0)); + fillHSBFields(col, cal.get(0)); + fillHexFields(col, cal.get(0)); + setHue(col, cal.get(0)); + setSelector(col, cal.get(0)); + setCurrentColor(col, cal.get(0)); + setNewColor(col, cal.get(0)); + } + }); + } + }; + }(); + $.fn.extend({ + ColorPicker: ColorPicker.init, + ColorPickerHide: ColorPicker.hidePicker, + ColorPickerShow: ColorPicker.showPicker, + ColorPickerSetColor: ColorPicker.setColor + }); +})(jQuery)
\ No newline at end of file diff --git a/id/ConfigWebTool/src/main/webapp/js/common.js b/id/ConfigWebTool/src/main/webapp/js/common.js index 249cb37fa..11fc0b2be 100644 --- a/id/ConfigWebTool/src/main/webapp/js/common.js +++ b/id/ConfigWebTool/src/main/webapp/js/common.js @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ function oaBusinessService() { if ($('#OAisbusinessservice').attr('checked') == 'checked') { @@ -44,6 +66,29 @@ function oaPVP2(){ $('#button_pvp2_hidden').css('display', "block"); } } +function oaOAuth20(){ + if ($('#oa_oauth20_area').css('display') == "block") { + $('#oa_oauth20_area').css('display', "none"); + $('#button_oauth20_show').css('display', "block"); + $('#button_oauth20_hidden').css('display', "none"); + } else { + $('#oa_oauth20_area').css('display', "block"); + $('#button_oauth20_show').css('display', "none"); + $('#button_oauth20_hidden').css('display', "block"); + } +} +function oaFormCustom() { + if ($('#formcustom_area').css('display') == "block") { + $('#formcustom_area').css('display', "none"); + $('#formcustom_button_show').css('display', "block"); + $('#formcustom_button_hidden').css('display', "none"); + } else { + $('#formcustom_area').css('display', "block"); + $('#formcustom_button_show').css('display', "none"); + $('#formcustom_button_hidden').css('display', "block"); + $("#formCustomPreview>iframe").attr("src", "./bkuFramePreview.action"); + } +} function editOA(oaid){ $('#selectOAForm_OAID').val(oaid); $('#selectOAForm').submit(); @@ -63,9 +108,95 @@ function oaLegacyService() { } } +function AdminTarget() { + if ($('#adminTarget').attr('checked') == 'checked') { + + $('#admin_target_area').css('display', "block"); + + } else { + + $('#admin_target_area').css('display', "none"); + + } +} +function HideAdminTarget() { + $('#adminTarget').removeAttr("checked"); + $('#admin_target_area').css('display', "none"); +} +function oaTargetSubSector() { + if ($('#OAisTargetSubSector').attr('checked') == 'checked') { + + $('#wwgrp_OAtarget_subsector').css('display', "block"); + + } else { + + $('#wwgrp_OAtarget_subsector').css('display', "none"); + + } +} +function UseUserNamePassword() { + if ($('#isusernamepasswordallowed').size() == 0) { + $('#usernamepassword_area').css('display', "none"); + return; + } + + if ($('#isusernamepasswordallowed').attr('checked') == 'checked') { + if ($('#editUser_user_username').val() == "") { + $('#editUser_user_username').removeAttr("disabled"); + } + $('#usernamepassword_area').css('display', "block"); + + } else { + $('#editUser_user_username').prop("disabled", "disabled"); + $('#usernamepassword_area').css('display', "none"); + + } +} +function sendVerificationMail() { + $.ajax({ + xhr: function() { + var xhr = new window.XMLHttpRequest(); + return xhr; + }, + type: "GET", + url: "servlet/sendVerificationMail.action", + data: "", + success: function (msg) { + alert(msg); + }, + error: function () { + alert('Anfrage konnte nicht gesendet werden!'); + }, + }); +} +function updateBKUFormPreview(module) { + var value = $("#"+module).val(); + + $("#formCustomPreview>iframe").attr("src", "./bkuFramePreview.action?module="+module+"&value="+encodeURIComponent(value.replace("#",""))); +} + +function userOnLoad() { + UseUserNamePassword(); + return true; +} function oaOnLoad() { oaBusinessService(); oaSSOService(); oaLegacyService(); + AdminTarget(); + oaTargetSubSector(); + + $(".colorfield").each( + function() { + $(this).ColorPicker({ + color : $(this).val(), + onSubmit : function(hsb, hex, rgb, el) { + $(el).val(hex); + updateBKUFormPreview($(el).attr("id")); + } + }); + } + ); + return true; }
\ No newline at end of file diff --git a/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp b/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp index 2b24f0b89..05f4a1106 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp @@ -341,6 +341,9 @@ <br> <br> + + <s:hidden name="formID" + value="%{formID}"></s:hidden> <div id="button_area"> <s:submit key="webpages.edit.back" action="backGeneralConfig"/> diff --git a/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp b/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp index 60f253222..97f0d01c2 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp @@ -1,16 +1,18 @@ <%@ page contentType="text/html;charset=UTF-8" %> <%@page import="at.gv.egovernment.moa.id.configuration.helper.LanguageHelper"%> <%@ taglib prefix="s" uri="/struts-tags" %> - + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <link rel="stylesheet" type="text/css" href="../css/index.css"> + <link rel="stylesheet" media="screen" type="text/css" href="../css/colorpicker.css" /> + <title><%=LanguageHelper.getGUIString("title", request) %></title> <script type="text/javascript" src="../js/common.js"></script> <script src="../js/jquery.js"></script> - + <script type="text/javascript" src="../js/colorpicker.js"></script> </head> <body onload="oaOnLoad()"> @@ -64,123 +66,212 @@ key="webpages.oaconfig.general.isbusinessservice" cssClass="checkbox" onclick="oaBusinessService();" - id="OAisbusinessservice"> + id="OAisbusinessservice" + disabled="%{isOnlyBusinessService()}"> </s:checkbox> </div> <div id="oa_config_businessservice" class="oa_config_block"> <h3><%=LanguageHelper.getGUIString("webpages.oaconfig.general.business.header", request) %></h3> + <s:select list="generalOA.identificationTypeList" + key="webpages.oaconfig.general.business.value" + labelposition="left" + cssClass="selectfield" + value="%{generalOA.identificationType}" + name="generalOA.identificationType" + disabled="%{isDeaktivededBusinessService()}"> + </s:select> + <s:textfield name="generalOA.identificationNumber" value="%{generalOA.identificationNumber}" - labelposition="left" - key="webpages.oaconfig.general.business.value" - cssClass="textfield_long"> + cssClass="textfield_middle" + disabled="%{isDeaktivededBusinessService()}"> </s:textfield> </div> - <div id="oa_config_publicservice" class="oa_config_block"> - <h3><%=LanguageHelper.getGUIString("webpages.oaconfig.general.public.header", request) %></h3> - - <s:textfield name="generalOA.target" - value="%{generalOA.target}" - labelposition="left" - key="webpages.oaconfig.general.target" - cssClass="textfield_short"> - </s:textfield> - - <s:textfield name="generalOA.targetFriendlyName" - value="%{generalOA.targetFriendlyName}" - labelposition="left" - key="webpages.oaconfig.general.target.friendlyname" - cssClass="textfield_long"> - </s:textfield> - </div> - - <div class="oa_config_block"> - <h3><%=LanguageHelper.getGUIString("webpages.oaconfig.general.bku.header", request) %></h3> - - <s:textfield name="generalOA.bkuOnlineURL" - value="%{generalOA.bkuOnlineURL}" - labelposition="left" - key="webpages.oaconfig.general.bku.online" - cssClass="textfield_long"> - </s:textfield> - - <s:textfield name="generalOA.bkuHandyURL" - value="%{generalOA.bkuHandyURL}" - labelposition="left" - key="webpages.oaconfig.general.bku.handy" - cssClass="textfield_long"> - </s:textfield> - - <s:textfield name="generalOA.bkuLocalURL" - value="%{generalOA.bkuLocalURL}" - labelposition="left" - key="webpages.oaconfig.general.bku.local" - cssClass="textfield_long"> - </s:textfield> - - <s:if test="authUser.isAdmin()"> - <s:textfield name="generalOA.slVersion" - value="%{generalOA.slVersion}" + <s:if test="!isOnlyBusinessService()"> + <div id="oa_config_publicservice" class="oa_config_block"> + <h3><%=LanguageHelper.getGUIString("webpages.oaconfig.general.public.header", request) %></h3> + + <s:if test="authUser.isAdmin()"> + <s:select list="generalOA.targetList" + key="webpages.oaconfig.general.target" + labelposition="left" + cssClass="selectfield" + value="%{generalOA.target}" + name="generalOA.target" + onchange="HideAdminTarget();"> + </s:select> + </s:if> + <s:else> + <s:select list="generalOA.targetList" + key="webpages.oaconfig.general.target" + labelposition="left" + cssClass="selectfield" + value="%{generalOA.target}" + name="generalOA.target"> + </s:select> + </s:else> + + <s:checkbox name="subTargetSet" + value="%{subTargetSet}" labelposition="left" - key="webpages.oaconfig.general.bku.slversion" - cssClass="textfield_long"> + key="webpages.oaconfig.general.target.subsector.checkbox" + cssClass="checkbox" + onclick="oaTargetSubSector();" + id="OAisTargetSubSector"> + </s:checkbox> + + <s:textfield name="generalOA.target_subsector" + value="%{generalOA.target_subsector}" + labelposition="left" + key="webpages.oaconfig.general.target.subsector" + cssClass="selectfield" + id="OAtarget_subsector"> </s:textfield> - </s:if> - <s:radio list="generalOA.keyBoxIdentifierList" - name="generalOA.keyBoxIdentifier" - value="%{generalOA.keyBoxIdentifier}" - labelposition="left" - key="webpages.oaconfig.general.bku.keyboxidentifier" - cssClass="radio"> - </s:radio> - <s:checkbox name="generalOA.legacy" - value="%{generalOA.legacy}" - labelposition="left" - key="webpages.oaconfig.general.bku.legacy" - cssClass="checkbox" - onclick="oaLegacyService();" - id="OAislegacy"> - </s:checkbox> - <div id="oa_config_sltemplates"> - <s:textfield name="generalOA.SLTemplateURL1" - value="%{generalOA.SLTemplateURL1}" + + + <s:if test="authUser.isAdmin()"> + <s:checkbox + name="generalOA.AdminTarget" + value="%{generalOA.AdminTarget}" + cssClass="checkbox" + onclick="AdminTarget();" + labelposition="left" + key="webpages.oaconfig.general.target.admin.checkbox" + id="adminTarget"> + </s:checkbox> + + <div id="admin_target_area"> + <s:textfield name="generalOA.target_admin" + value="%{generalOA.target_admin}" + labelposition="left" + key="webpages.oaconfig.general.target.admin" + cssClass="textfield_short"> + </s:textfield> + <s:textfield name="generalOA.targetFriendlyName" + value="%{generalOA.targetFriendlyName}" + labelposition="left" + key="webpages.oaconfig.general.target.friendlyname" + cssClass="textfield_long"> + </s:textfield> + </div> + </s:if> + <s:else> + <s:if test="generalOA.target_admin neq null"> + <s:textfield name="generalOA.target_admin" + value="%{generalOA.target_admin}" + labelposition="left" + key="webpages.oaconfig.general.target.admin.disabled" + cssClass="textfield_short" + disabled="true"> + </s:textfield> + </s:if> + <%-- <s:if test="generalOA.targetFriendlyName neq null"> + <s:textfield name="generalOA.targetFriendlyName" + value="%{generalOA.targetFriendlyName}" + labelposition="left" + key="webpages.oaconfig.general.target.friendlyname.disabled" + cssClass="textfield_long"> + </s:textfield> + </s:if> --%> + </s:else> + </div> + </s:if> + + <s:if test="authUser.isAdmin()"> + <div class="oa_config_block"> + <h3><%=LanguageHelper.getGUIString("webpages.oaconfig.general.bku.header", request) %></h3> + + <s:textfield name="generalOA.bkuOnlineURL" + value="%{generalOA.bkuOnlineURL}" labelposition="left" - key="webpages.oaconfig.general.bku.sltemplate.first" + key="webpages.oaconfig.general.bku.online" cssClass="textfield_long"> </s:textfield> - <s:textfield name="generalOA.SLTemplateURL2" - value="%{generalOA.SLTemplateURL2}" + + <s:textfield name="generalOA.bkuHandyURL" + value="%{generalOA.bkuHandyURL}" labelposition="left" - key="webpages.oaconfig.general.bku.sltemplate.second" + key="webpages.oaconfig.general.bku.handy" cssClass="textfield_long"> </s:textfield> - <s:textfield name="generalOA.SLTemplateURL3" - value="%{generalOA.SLTemplateURL3}" + + <s:textfield name="generalOA.bkuLocalURL" + value="%{generalOA.bkuLocalURL}" labelposition="left" - key="webpages.oaconfig.general.bku.sltemplate.third" + key="webpages.oaconfig.general.bku.local" cssClass="textfield_long"> </s:textfield> + + <s:radio list="generalOA.keyBoxIdentifierList" + name="generalOA.keyBoxIdentifier" + value="%{generalOA.keyBoxIdentifier}" + labelposition="left" + key="webpages.oaconfig.general.bku.keyboxidentifier" + cssClass="radio"> + </s:radio> + <s:checkbox name="generalOA.legacy" + value="%{generalOA.legacy}" + labelposition="left" + key="webpages.oaconfig.general.bku.legacy" + cssClass="checkbox" + onclick="oaLegacyService();" + id="OAislegacy"> + </s:checkbox> + <div id="oa_config_sltemplates"> + <s:textfield name="generalOA.SLTemplateURL1" + value="%{generalOA.SLTemplateURL1}" + labelposition="left" + key="webpages.oaconfig.general.bku.sltemplate.first" + cssClass="textfield_long"> + </s:textfield> + <s:textfield name="generalOA.SLTemplateURL2" + value="%{generalOA.SLTemplateURL2}" + labelposition="left" + key="webpages.oaconfig.general.bku.sltemplate.second" + cssClass="textfield_long"> + </s:textfield> + <s:textfield name="generalOA.SLTemplateURL3" + value="%{generalOA.SLTemplateURL3}" + labelposition="left" + key="webpages.oaconfig.general.bku.sltemplate.third" + cssClass="textfield_long"> + </s:textfield> + </div> </div> - - - </div> + </s:if> <div class="oa_config_block"> <h3><%=LanguageHelper.getGUIString("webpages.oaconfig.general.mandate.header", request) %></h3> + + <s:checkbox name="generalOA.useMandates" + value="%{generalOA.useMandates}" + labelposition="left" + key="webpages.oaconfig.general.mandate.usemandate" + cssClass="checkbox"> + </s:checkbox> + <s:textfield name="generalOA.mandateProfiles" value="%{generalOA.mandateProfiles}" labelposition="left" key="webpages.oaconfig.general.mandate.profiles" cssClass="textfield_long"> </s:textfield> + + <s:checkbox name="formOA.onlyMandateAllowed" + value="%{formOA.onlyMandateAllowed}" + labelposition="left" + key="webpages.oaconfig.general.BKUSelection.isOnlyMandateLoginAllowed" + cssClass="checkbox"> + </s:checkbox> + </div> <div class="oa_config_block"> - <h3><%=LanguageHelper.getGUIString("webpages.oaconfig.sso.header", request) %></h3> + <p><strong><%=LanguageHelper.getGUIString("webpages.oaconfig.sso.header", request) %></strong></p> <s:checkbox name="ssoOA.useSSO" value="%{ssoOA.useSSO}" @@ -213,12 +304,15 @@ <div class="oa_config_block"> <h3><%=LanguageHelper.getGUIString("webpages.oaconfig.protocols.header", request) %></h3> - <button type="button" class="oa_buttons" onclick="oaSAML1();" id="button_smal1_show"> - <%=LanguageHelper.getGUIString("webpages.oaconfig.menu.saml1.show", request) %> - </button> - <button type="button" class="oa_buttons" onclick="oaSAML1();" id="button_saml1_hidden"> - <%=LanguageHelper.getGUIString("webpages.oaconfig.menu.saml1.hidden", request) %> - </button> + + <s:if test="authUser.isAdmin() || saml1OA.isActive()"> + <button type="button" class="oa_buttons" onclick="oaSAML1();" id="button_smal1_show"> + <%=LanguageHelper.getGUIString("webpages.oaconfig.menu.saml1.show", request) %> + </button> + <button type="button" class="oa_buttons" onclick="oaSAML1();" id="button_saml1_hidden"> + <%=LanguageHelper.getGUIString("webpages.oaconfig.menu.saml1.hidden", request) %> + </button> + </s:if> <button type="button" class="oa_buttons" onclick="oaPVP2();" id="button_pvp2_show"> <%=LanguageHelper.getGUIString("webpages.oaconfig.menu.pvp2.show", request) %> @@ -226,9 +320,25 @@ <button type="button" class="oa_buttons" onclick="oaPVP2();" id="button_pvp2_hidden"> <%=LanguageHelper.getGUIString("webpages.oaconfig.menu.pvp2.hidden", request) %> </button> + + <button type="button" class="oa_buttons" onclick="oaOAuth20();" id="button_oauth20_show"> + <%=LanguageHelper.getGUIString("webpages.oaconfig.menu.oauth20.show", request) %> + </button> + <button type="button" style="display:none" class="oa_buttons" onclick="oaOAuth20();" id="button_oauth20_hidden"> + <%=LanguageHelper.getGUIString("webpages.oaconfig.menu.oauth20.hidden", request) %> + </button> <div id="oa_saml1_area" class="oa_protocol_area"> <h4><%=LanguageHelper.getGUIString("webpages.oaconfig.protocols.saml1.header", request) %></h4> + + <s:if test="authUser.isAdmin()"> + <s:checkbox name="saml1OA.Active" + value="%{saml1OA.Active}" + labelposition="left" + key="webpages.oaconfig.saml1.isActice" + cssClass="checkbox"> + </s:checkbox> + </s:if> <s:checkbox name="saml1OA.provideStammZahl" value="%{saml1OA.provideStammZahl}" labelposition="left" @@ -241,13 +351,13 @@ key="webpages.oaconfig.saml1.provideAuthBlock" cssClass="checkbox"> </s:checkbox> + <br> <s:checkbox name="saml1OA.provideIdentityLink" value="%{saml1OA.provideIdentityLink}" labelposition="left" key="webpages.oaconfig.saml1.provideIdentityLink" cssClass="checkbox"> - </s:checkbox> - <br> + </s:checkbox> <s:checkbox name="saml1OA.provideCertificate" value="%{saml1OA.provideCertificate}" labelposition="left" @@ -294,44 +404,171 @@ <s:file name="pvp2OA.fileUpload" key="webpages.oaconfig.pvp2.certifcate" cssClass="textfield_long"></s:file> </div> </div> + + <div id="oa_oauth20_area" class="oa_protocol_area"> + <h4><%=LanguageHelper.getGUIString("webpages.oaconfig.protocols.oauth20.header", request) %></h4> + + <s:label key="webpages.oaconfig.oauth20.clientId" value="%{oauth20OA.clientId}"/> + + <s:label key="webpages.oaconfig.oauth20.clientSecret" value="%{oauth20OA.clientSecret}"/> + + <s:textfield name="oauth20OA.redirectUri" + value="%{oauth20OA.redirectUri}" + labelposition="left" + key="webpages.oaconfig.oauth20.redirectUri" + cssClass="textfield_long"> + </s:textfield> + </div> </div> <div class="oa_config_block"> <h3><%=LanguageHelper.getGUIString("webpages.oaconfig.general.aditional.header", request) %></h3> - <s:checkbox name="generalOA.useIFrame" - value="%{generalOA.useIFrame}" - labelposition="left" - key="webpages.oaconfig.general.aditional.iframe" - cssClass="checkbox"> - </s:checkbox> - - <s:checkbox name="generalOA.useUTC" - value="%{generalOA.useUTC}" - labelposition="left" - key="webpages.oaconfig.general.aditional.useUTC" - cssClass="checkbox"> - </s:checkbox> - <%-- <s:checkbox name="generalOA.calculateHPI" value="%{generalOA.calculateHPI}" labelposition="left" key="webpages.oaconfig.general.aditional.calculateHPI" cssClass="textfield_long"> </s:checkbox> --%> - - <s:textarea name="generalOA.aditionalAuthBlockText" - value="%{generalOA.aditionalAuthBlockText}" + + <s:checkbox name="generalOA.HideBPKAuthBlock" + value="%{generalOA.HideBPKAuthBlock}" labelposition="left" - key="webpages.oaconfig.general.aditional.authblocktext" - cssClass="textfield_large"> - </s:textarea> + key="webpages.oaconfig.general.isHideBPKAuthBlock" + cssClass="checkbox"> + </s:checkbox> + <s:if test="authUser.isAdmin()"> + <s:textarea name="generalOA.aditionalAuthBlockText" + value="%{generalOA.aditionalAuthBlockText}" + labelposition="left" + key="webpages.oaconfig.general.aditional.authblocktext" + cssClass="textfield_large"> + </s:textarea> + + + <button type="button" class="oa_buttons" onclick="oaFormCustom();" id="formcustom_button_show"> + <%=LanguageHelper.getGUIString("webpages.oaconfig.general.BKUSelection.button.show", request) %> + </button> + <button type="button" class="oa_buttons" onclick="oaFormCustom();" id="formcustom_button_hidden"> + <%=LanguageHelper.getGUIString("webpages.oaconfig.general.BKUSelection.button.hidden", request) %> + </button> + + <div id="formcustom_area" class="oa_protocol_area"> + <h4><%=LanguageHelper.getGUIString("webpages.oaconfig.general.BKUSelection.header", request) %></h4> + + <div id="formCustomValues"> + <s:textfield name="formOA.backGroundColor" + value="%{formOA.backGroundColor}" + labelposition="left" + key="webpages.oaconfig.general.BKUSelection.backgroundcolor" + cssClass="textfield_middle colorfield" + onchange='updateBKUFormPreview("MAIN_BACKGOUNDCOLOR")' + id="MAIN_BACKGOUNDCOLOR"> + </s:textfield> + <s:textfield name="formOA.frontColor" + value="%{formOA.frontColor}" + labelposition="left" + key="webpages.oaconfig.general.BKUSelection.frontcolor" + cssClass="textfield_middle colorfield" + onchange='updateBKUFormPreview("MAIN_COLOR")' + id="MAIN_COLOR"> + </s:textfield> + + <s:textfield name="formOA.header_BackGroundColor" + value="%{formOA.header_BackGroundColor}" + labelposition="left" + key="webpages.oaconfig.general.BKUSelection.header.backgroundcolor" + cssClass="textfield_middle colorfield" + onchange='updateBKUFormPreview("HEADER_BACKGROUNDCOLOR")' + id="HEADER_BACKGROUNDCOLOR"> + </s:textfield> + <s:textfield name="formOA.header_FrontColor" + value="%{formOA.header_FrontColor}" + labelposition="left" + key="webpages.oaconfig.general.BKUSelection.header.frontcolor" + cssClass="textfield_middle colorfield" + onchange='updateBKUFormPreview("HEADER_COLOR")' + id="HEADER_COLOR"> + </s:textfield> + <s:textfield name="formOA.header_text" + value="%{formOA.header_text}" + labelposition="left" + key="webpages.oaconfig.general.BKUSelection.header.text" + cssClass="textfield_middle" + onchange='updateBKUFormPreview("HEADER_TEXT")' + id="HEADER_TEXT"> + </s:textfield> + + <%-- <s:textfield name="formOA.button_BackGroundColor" + value="%{formOA.button_BackGroundColor}" + labelposition="left" + key="webpages.oaconfig.general.BKUSelection.header.button.background" + cssClass="textfield_middle colorfield" + onchange='updateBKUFormPreview("BUTTON_BACKGROUNDCOLOR")' + id="BUTTON_BACKGROUNDCOLOR"> + </s:textfield> + <s:textfield name="formOA.button_BackGroundColorFocus" + value="%{formOA.button_BackGroundColorFocus}" + labelposition="left" + key="webpages.oaconfig.general.BKUSelection.header.button.background.focus" + cssClass="textfield_middle colorfield" + onchange='updateBKUFormPreview("BUTTON_BACKGROUNDCOLOR_FOCUS")' + id="BUTTON_BACKGROUNDCOLOR_FOCUS"> + </s:textfield> + <s:textfield name="formOA.button_FrontColor" + value="%{formOA.button_FrontColor}" + labelposition="left" + key="webpages.oaconfig.general.BKUSelection.header.button.front" + cssClass="textfield_middle colorfield" + onchange='updateBKUFormPreview("BUTTON_COLOR")' + id="BUTTON_COLOR"> + </s:textfield> --%> + + <s:select list="formOA.appletRedirectTargetList" + key="webpages.oaconfig.general.BKUSelection.redirectTarget" + labelposition="left" + cssClass="selectfield" + value="%{formOA.appletRedirectTarget}" + name="formOA.appletRedirectTarget"> + </s:select> + + <s:select list="formOA.fontTypeList" + key="webpages.oaconfig.general.BKUSelection.fonttype.list" + labelposition="left" + cssClass="selectfield" + value="%{formOA.fontType}" + name="formOA.fontTypeListValue" + id="fontTypeList" + onchange='$("#FONTTYPE").val($("#fontTypeList").val());updateBKUFormPreview("FONTTYPE");'> + </s:select> + + <s:textfield name="formOA.fontType" + value="%{formOA.fontType}" + labelposition="left" + key="webpages.oaconfig.general.BKUSelection.fonttype" + cssClass="textfield_mail" + onchange='updateBKUFormPreview("FONTTYPE")' + id="FONTTYPE"> + </s:textfield> + </div> + + <div id="formCustomPreview"> + <iframe scrolling="none" + title="BKUForm Preview" + height="220" + width="250"> + </iframe> + </div> + + </div> + </s:if> + </div> -<%-- <s:hidden name="generalOA.dbID" - value="%{generalOA.dbID}"></s:hidden> --%> + <s:hidden name="formID" + value="%{formID}"></s:hidden> <div id="button_area"> diff --git a/id/ConfigWebTool/src/main/webapp/jsp/edituser.jsp b/id/ConfigWebTool/src/main/webapp/jsp/edituser.jsp index 067bcd57d..994389de3 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/edituser.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/edituser.jsp @@ -6,20 +6,29 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> + <title><%=LanguageHelper.getGUIString("title", request) %></title> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> + <link rel="stylesheet" type="text/css" href="../css/index.css"> - <title><%=LanguageHelper.getGUIString("title", request) %></title> <script type="text/javascript" src="../js/common.js"></script> <script src="../js/jquery.js"></script> </head> - <body> + <body onload="userOnLoad();"> <jsp:include page="snippets/header_userinfos.jsp"></jsp:include> - + <jsp:include page="snippets/main_menu.jsp"></jsp:include> <div id="information_area"> + + <s:if test="hasActionMessages()"> + <div id="error_area"> + <label><%=LanguageHelper.getGUIString("error.title", request) %></label> + <s:actionmessage/> + </div> + </s:if> + <s:if test="hasActionErrors()"> <div id="error_area"> <label><%=LanguageHelper.getGUIString("error.title", request) %></label> @@ -28,118 +37,26 @@ </s:if> <div id="list_area"> - + <s:form namespace="/secure" method="POST" enctype="multipart/form-data"> - - <div class="oa_config_block"> - <h3><%=LanguageHelper.getGUIString("webpages.edituser.header", request) %></h3> - <s:textfield name="user.givenName" - value="%{user.givenName}" - labelposition="left" - key="webpages.edituser.givenname" - cssClass="textfield_long"> - </s:textfield> - <s:textfield name="user.familyName" - value="%{user.familyName}" - labelposition="left" - key="webpages.edituser.familyName" - cssClass="textfield_long"> - </s:textfield> - <s:textfield name="user.institut" - value="%{user.institut}" - labelposition="left" - key="webpages.edituser.institut" - cssClass="textfield_long"> - </s:textfield> - <s:textfield name="user.mail" - value="%{user.mail}" - labelposition="left" - key="webpages.edituser.mail" - cssClass="textfield_long"> - </s:textfield> - <s:textfield name="user.phone" - value="%{user.phone}" - labelposition="left" - key="webpages.edituser.phone" - cssClass="textfield_long"> - </s:textfield> - </div> + <jsp:include page="snippets/userfields.jsp"></jsp:include> - <div class="oa_config_block"> - <h3><%=LanguageHelper.getGUIString("webpages.edituser.access.header", request) %></h3> - <s:if test="isNewUser()"> - <s:textfield name="user.username" - value="%{user.username}" - labelposition="left" - key="webpages.edituser.username" - cssClass="textfield_long" - maxlength="16"> - </s:textfield> - </s:if> - <s:else> - <s:textfield name="user.username" - value="%{user.username}" - labelposition="left" - key="webpages.edituser.username" - cssClass="textfield_long" - disabled="true" - maxlength="16"> - </s:textfield> - </s:else> - - <s:password name="user.password" - labelposition="left" - key="webpages.edituser.password" - cssClass="textfield_long" - maxlength="16"> - </s:password> - - <s:password name="user.password_second" - labelposition="left" - key="webpages.edituser.password_second" - cssClass="textfield_long" - maxlength="16"> - </s:password> - - <s:textfield name="user.bpk" - value="%{user.bpk}" - labelposition="left" - key="webpages.edituser.bpk" - cssClass="textfield_long"> - </s:textfield> - </div> - - <s:if test="authUser.isAdmin()"> - <div class="oa_config_block"> - <h3><%=LanguageHelper.getGUIString("webpages.edituser.role.header", request) %></h3> - <s:checkbox name="user.active" - value="%{user.active}" - labelposition="left" - key="webpages.edituser.active" - cssClass="checkbox"> - </s:checkbox> - <s:checkbox name="user.admin" - value="%{user.admin}" - labelposition="left" - key="webpages.edituser.admin" - cssClass="checkbox"> - </s:checkbox> - </div> - </s:if> - - <s:hidden name="user.userID" value="%{user.userID}"></s:hidden> + <s:hidden name="formID" value="%{formID}"></s:hidden> <div id="button_area"> <s:if test="authUser.isAdmin()"> - <s:submit key="webpages.edit.back" action="usermanagementInit"/> - </s:if> + <s:submit key="webpages.edit.back" action="%{nextPage}"/> + </s:if> + <s:submit key="webpages.edit.save" action="saveUser"/> - <s:if test="!isNewUser()"> - <s:submit key="webpages.edit.delete.user" action="deleteUser"/> + <s:if test="!isNewUser()"> + <s:submit key="webpages.edit.delete.user" action="deleteUser"/> </s:if> - </div> + </div> + </s:form> + </div> </div> diff --git a/id/ConfigWebTool/src/main/webapp/jsp/importexport.jsp b/id/ConfigWebTool/src/main/webapp/jsp/importexport.jsp index b28bc5f57..c619e64b1 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/importexport.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/importexport.jsp @@ -42,6 +42,8 @@ <h3><%=LanguageHelper.getGUIString("webpages.inportexport.legacyimport.header", request) %></h3> <s:file name="fileUpload" key="webpages.inportexport.legacyimport.upload" cssClass="textfield_long"></s:file> + <s:hidden name="formID" value="%{formID}"></s:hidden> + <div id="button_area"> <%-- <s:submit key="webpages.edit.back" action="main"/> --%> <s:submit key="webpages.edit.import" action="importlegacy"/> @@ -57,6 +59,8 @@ <h3><%=LanguageHelper.getGUIString("webpages.inportexport.import.header", request) %></h3> <s:file name="fileUpload" key="webpages.inportexport.import.upload" cssClass="textfield_long"></s:file> + <s:hidden name="formID" value="%{formID}"></s:hidden> + <div id="button_area"> <s:submit key="webpages.edit.import" action="importConfig"/> <s:submit key="webpages.edit.export" action="exportConfig"/> diff --git a/id/ConfigWebTool/src/main/webapp/jsp/mainpage.jsp b/id/ConfigWebTool/src/main/webapp/jsp/mainpage.jsp index b700970cc..c9f1e00f6 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/mainpage.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/mainpage.jsp @@ -25,6 +25,14 @@ <s:actionmessage/> </div> </s:if> + + <s:if test="hasActionErrors()"> + <div id="error_area"> + <label><%=LanguageHelper.getGUIString("error.title", request) %></label> + <s:actionerror/> + </div> + </s:if> + <p>Im Menü auf der rechten Seite können Sie die einzelnen Operationen wählen.</p> </div> diff --git a/id/ConfigWebTool/src/main/webapp/jsp/newUserRequest.jsp b/id/ConfigWebTool/src/main/webapp/jsp/newUserRequest.jsp new file mode 100644 index 000000000..9995f9f31 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/jsp/newUserRequest.jsp @@ -0,0 +1,57 @@ +<%@page import="at.gv.egovernment.moa.id.configuration.helper.LanguageHelper"%> + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> + <head> + <title><%=LanguageHelper.getGUIString("title", request) %></title> + <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> + + <link rel="stylesheet" type="text/css" href="./css/index.css"> + <script type="text/javascript" src="./js/common.js"></script> + <script src="./js/jquery.js"></script> + </head> + + <body> + + <jsp:include page="snippets/header_userinfos.jsp"></jsp:include> + + <div id="information_area"> + + <s:if test="!authUser.isAuthenticated()"> + <p>Füllen sie die nachstehenden Felder aus um einen neuen Benutzer zu beantraten.</p> + <p>Danach erhalten sie eine Mail zur Verifzierung Ihrer Mailadresse. + Nach Bestätiung dieser Verifikationsmail wird der Administrator über Ihre Anfrage informiert. + Die Freischaltung kann somit eine gewisse Zeit in Anspruch nehmen. </p> + + </s:if> + + <s:if test="hasActionErrors()"> + <div id="error_area"> + <label><%=LanguageHelper.getGUIString("error.title", request) %></label> + <s:actionerror/> + </div> + </s:if> + + <div id="list_area"> + + <s:form namespace="/" method="POST" enctype="multipart/form-data"> + <jsp:include page="snippets/userfields.jsp"></jsp:include> + + <s:hidden name="formID" value="%{formID}"></s:hidden> + + <div id="button_area"> + <s:submit key="webpages.edit.newUser" action="requestNewUser"/> + </div> + + </s:form> + + </div> + </div> + + <jsp:include page="snippets/footer.jsp"></jsp:include> + + </body> +</html>
\ No newline at end of file diff --git a/id/ConfigWebTool/src/main/webapp/jsp/openadminrequests.jsp b/id/ConfigWebTool/src/main/webapp/jsp/openadminrequests.jsp new file mode 100644 index 000000000..954bf9b8b --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/jsp/openadminrequests.jsp @@ -0,0 +1,51 @@ +<%@page import="at.gv.egovernment.moa.id.configuration.helper.LanguageHelper"%> + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> + <head> + <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> + <link rel="stylesheet" type="text/css" href="../css/index.css"> + <title><%=LanguageHelper.getGUIString("title", request) %></title> + <script type="text/javascript" src="../js/common.js"></script> + <script src="../js/jquery.js"></script> + </head> + + <body> + + <jsp:include page="snippets/header_userinfos.jsp"></jsp:include> + + <jsp:include page="snippets/main_menu.jsp"></jsp:include> + + <div id="information_area"> + <s:if test="hasActionErrors()"> + <div id="error_area"> + <label><%=LanguageHelper.getGUIString("error.title", request) %></label> + <s:actionerror/> + </div> + </s:if> + + <h2><%=LanguageHelper.getGUIString("webpages.openadminrequests.header", request) %></h2> + + <s:if test="authUser.isAdmin()"> + + <div class="oa_config_block"> + <h3><%=LanguageHelper.getGUIString("webpages.openadminrequests.users.header", request) %></h3> + <jsp:include page="snippets/user_list.jsp"></jsp:include> + </div> + + <div class="oa_config_block"> + <h3><%=LanguageHelper.getGUIString("webpages.openadminrequests.oas.header", request) %></h3> + <jsp:include page="snippets/oas_list.jsp"></jsp:include> + </div> + + </s:if> + + </div> + + <jsp:include page="snippets/footer.jsp"></jsp:include> + + </body> +</html>
\ No newline at end of file diff --git a/id/ConfigWebTool/src/main/webapp/jsp/snippets/header_userinfos.jsp b/id/ConfigWebTool/src/main/webapp/jsp/snippets/header_userinfos.jsp index 72affde79..e9192b46e 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/snippets/header_userinfos.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/snippets/header_userinfos.jsp @@ -5,9 +5,14 @@ <html> <div id="header_area"> <!-- <div> --> - <%=LanguageHelper.getGUIString("webpages.header.info", request) %> - <s:property value="authUser.givenName"/> <s:property value="authUser.familyName"/>, - <%=LanguageHelper.getGUIString("webpages.header.lastlogin", request) %> <s:property value="authUser.lastLogin"/> + <%=LanguageHelper.getGUIString("webpages.header.info", request) %> + <s:if test="authUser.isMandateUser()"> + <s:property value="authUser.institute"/> + </s:if> + <s:else> + <s:property value="authUser.givenName"/> <s:property value="authUser.familyName"/>, + </s:else> + <%=LanguageHelper.getGUIString("webpages.header.lastlogin", request) %> <s:property value="authUser.getFormatedLastLogin()"/> <s:url action="logout" var="logoutURL" namespace="/"/> <a id="logoutbutton" href="<s:property value="#logoutURL" />"><%=LanguageHelper.getGUIString("webpages.index.logout", request) %></a> diff --git a/id/ConfigWebTool/src/main/webapp/jsp/snippets/main_menu.jsp b/id/ConfigWebTool/src/main/webapp/jsp/snippets/main_menu.jsp index 26b12cdcb..4d02f4bda 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/snippets/main_menu.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/snippets/main_menu.jsp @@ -32,11 +32,13 @@ <s:url action="usermanagementInit" var="userManagementUrl" namespace="/secure"/> <a href="<s:property value="#userManagementUrl" />"><%=LanguageHelper.getGUIString("webpages.mainpage.menu.general.usermanagement", request) %></a> </div> - -<%-- <div class="menu_element"> - <a href=""><%=LanguageHelper.getGUIString("webpages.mainpage.menu.general.user", request) %></a> - </div> --%> + <s:if test="authUser.isAdmin()"> + <div class="menu_element"> + <s:url action="adminRequestsInit" var="adminRequestsUrl" namespace="/secure"/> + <a href="<s:property value="#adminRequestsUrl" />"><%=LanguageHelper.getGUIString("webpages.mainpage.menu.general.adminrequests", request) %></a> + </div> + </s:if> </div> </html>
\ No newline at end of file diff --git a/id/ConfigWebTool/src/main/webapp/jsp/snippets/user_list.jsp b/id/ConfigWebTool/src/main/webapp/jsp/snippets/user_list.jsp index c5b67cbac..a1e8530af 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/snippets/user_list.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/snippets/user_list.jsp @@ -4,7 +4,6 @@ <html> <s:if test="userlist && userlist.size > 0"> - <h3><%=LanguageHelper.getGUIString("webpages.listUsers.list.header", request) %></h3> <div id="list_area"> <div id="listHeader" class="listElement"> <div class="userListFirst"> @@ -21,12 +20,22 @@ <s:iterator var="UserElement" value="userlist"> <div class="listElement" onclick="userOA(<s:property value='userID'/>);"> - <div class="userListFirst"> - <s:property value="givenName"/> - </div> - <div class="userListSecond"> - <s:property value="familyName"/> - </div> + <s:if test="isMandateUser()"> + <div class="userListFirstSecond"> + <s:property value="institute"/> + </div> +<!-- <div class="userListSecond"> + + </div> + --> </s:if> + <s:else> + <div class="userListFirst"> + <s:property value="familyName"/> + </div> + <div class="userListSecond"> + <s:property value="givenName"/> + </div> + </s:else> <div class="userListThird"> <s:property value="userName"/> </div> diff --git a/id/ConfigWebTool/src/main/webapp/jsp/snippets/userfields.jsp b/id/ConfigWebTool/src/main/webapp/jsp/snippets/userfields.jsp new file mode 100644 index 000000000..7d28a9236 --- /dev/null +++ b/id/ConfigWebTool/src/main/webapp/jsp/snippets/userfields.jsp @@ -0,0 +1,144 @@ +<%@page import="at.gv.egovernment.moa.id.configuration.helper.LanguageHelper"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<html> + <div class="oa_config_block"> + <h3><%=LanguageHelper.getGUIString("webpages.edituser.header", request) %></h3> + + <s:if test="!user.isIsmandateuser()"> + <s:textfield name="user.givenName" + value="%{user.givenName}" + labelposition="left" + key="webpages.edituser.givenname" + cssClass="textfield_long" + disabled="%{user.isPVPGenerated()}"> + </s:textfield> + <s:textfield name="user.familyName" + value="%{user.familyName}" + labelposition="left" + key="webpages.edituser.familyName" + cssClass="textfield_long" + disabled="%{user.isPVPGenerated()}"> + </s:textfield> + </s:if> + <s:textfield name="user.institut" + value="%{user.institut}" + labelposition="left" + key="webpages.edituser.institut" + cssClass="textfield_long" + disabled="%{user.isPVPGenerated() && user.isIsmandateuser()}"> + </s:textfield> + + <s:if test="authUser.isAuthenticated()"> + <div id="mail_area"> + <s:textfield name="user.mail" + value="%{user.mail}" + labelposition="left" + key="webpages.edituser.mail" + cssClass="textfield_mail"> + </s:textfield> + <input type="button" + onclick="sendVerificationMail();" + value='<%=LanguageHelper.getGUIString("webpages.edituser.verify.mail.button", request) %>' + /> + </div> + </s:if> + <s:else> + <s:textfield name="user.mail" + value="%{user.mail}" + labelposition="left" + key="webpages.edituser.mail" + cssClass="textfield_long"> + </s:textfield> + </s:else> + + + <s:textfield name="user.phone" + value="%{user.phone}" + labelposition="left" + key="webpages.edituser.phone" + cssClass="textfield_long"> + </s:textfield> + </div> + + <div class="oa_config_block"> + <h3><%=LanguageHelper.getGUIString("webpages.edituser.access.header", request) %></h3> + + <div id="usernamepassword_area"> +<%-- <s:if test="user.isIsusernamepasswordallowed()"> --%> + <s:if test="isNewUser()"> + <s:textfield name="user.username" + value="%{user.username}" + labelposition="left" + key="webpages.edituser.username" + cssClass="textfield_long" + maxlength="16"> + </s:textfield> + </s:if> + <s:else> + <s:textfield name="user.username" + value="%{user.username}" + labelposition="left" + key="webpages.edituser.username" + cssClass="textfield_long" + disabled="true" + maxlength="16"> + </s:textfield> + </s:else> + + <s:password name="user.password" + labelposition="left" + key="webpages.edituser.password" + cssClass="textfield_long" + maxlength="16"> + </s:password> + + <s:password name="user.password_second" + labelposition="left" + key="webpages.edituser.password_second" + cssClass="textfield_long" + maxlength="16"> + </s:password> + <%-- </s:if> --%> + </div> + + <s:textfield name="user.bpk" + value="%{user.bpk}" + labelposition="left" + key="webpages.edituser.bpk" + cssClass="textfield_long" + disabled="%{user.isPVPGenerated()}"> + </s:textfield> + </div> + + <s:if test="authUser.isAdmin() || user.isIsusernamepasswordallowed()"> + <div class="oa_config_block"> + <h3><%=LanguageHelper.getGUIString("webpages.edituser.role.header", request) %></h3> + <s:if test="authUser.isAdmin()"> + <s:checkbox name="user.active" + value="%{user.active}" + labelposition="left" + key="webpages.edituser.active" + cssClass="checkbox"> + </s:checkbox> + <s:checkbox name="user.admin" + value="%{user.admin}" + labelposition="left" + key="webpages.edituser.admin" + cssClass="checkbox"> + </s:checkbox> + </s:if> + <s:checkbox name="user.isusernamepasswordallowed" + value="%{user.isusernamepasswordallowed}" + labelposition="left" + key="webpages.edituser.isusernamepasswordallowed" + cssClass="checkbox" + id="isusernamepasswordallowed" + onclick="UseUserNamePassword();"> + </s:checkbox> + </div> + </s:if> + + <s:hidden name="user.userID" value="%{user.userID}"></s:hidden> +</html>
\ No newline at end of file diff --git a/id/ConfigWebTool/src/main/webapp/jsp/usermanagement.jsp b/id/ConfigWebTool/src/main/webapp/jsp/usermanagement.jsp index a29780cff..1d5d4ac12 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/usermanagement.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/usermanagement.jsp @@ -30,7 +30,8 @@ <h2><%=LanguageHelper.getGUIString("webpages.usermanagement.header", request) %></h2> <s:if test="authUser.isAdmin()"> - + + <h3><%=LanguageHelper.getGUIString("webpages.listUsers.list.header", request) %></h3> <jsp:include page="snippets/user_list.jsp"></jsp:include> <div id="list_area"> |