office-dynamixs-ai/dynamixs-ai-app/docker/deployments/dynamixs-ai.war/pages/admin/profile.xhtml
2025-05-31 14:46:56 +02:00

319 lines
9.7 KiB
HTML

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:i="http://xmlns.jcp.org/jsf/composite/imixs"
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
xmlns:marty="http://xmlns.jcp.org/jsf/composite/marty"
template="/layout/template.xhtml">
<f:metadata>
<f:viewAction action="#{workflowController.onLoad()}" />
</f:metadata>
<ui:define name="content">
<script type="text/javascript">
/*<![CDATA[*/
$(document).ready(function() {
// set default role IMIXS-WORKFLOW-Author if no role is yet set...
// test if we have already values for display name
var dispn=$("input[id$='displayname_id']").val();
if (!dispn || dispn=="") {
// seems to be a new profile, we set author access...
$("input[id$='user_groups:2']").prop('checked', true);
}
});
/*]]>*/
</script>
<f:view>
<h:form pt:autocomplete="on" enctype="multipart/form-data">
<marty:userSearch />
<div class="imixs-form">
<div class="imixs-header">
<h1>
<h:outputText
value="#{message['profile.title']}: #{workflowController.workitem.item['txtName']} " />
</h1>
</div>
<div class="imixs-body">
<div class="imixs-tabs">
<ul>
<li><a href="#tab-1">#{message['profile.sub_title_general']}</a></li>
<li><a href="#tab-2">#{message['profile.sub_title_settings']}</a></li>
<ui:fragment
rendered="#{propertyController.getProperty('profile.x509') eq 'true'}">
<li><a href="#tab-3">X509</a></li>
</ui:fragment>
</ul>
<div id="tab-1">
<div class="imixs-form-panel imixs-form-section-2">
<!-- Enable local database security? -->
<h:panelGroup
rendered="#{setupController.workitem.item['keyEnableUserDB']}">
<dl>
<dt>
#{message['profile.userid']}<span class="imixs-required">*</span>
</dt>
<dd>
<h:inputText required="true" id="txtname_id"
disabled="#{! empty workflowController.workitem.item['txtName']}"
value="#{workflowController.workitem.item['txtName']}" />
</dd>
</dl>
<dl>
<dt>
<h:outputLabel value="#{message['profile.password']}" />
</dt>
<dd>
<h:inputSecret redisplay="true" required="false"
value="#{workflowController.workitem.item['txtPassword']}" />
</dd>
</dl>
</h:panelGroup>
<dl>
<dt>
<h:outputLabel value="#{message['profile.displayname']}">
</h:outputLabel>
<span class="imixs-required">*</span>
</dt>
<dd>
<h:inputText required="true"
value="#{workflowController.workitem.item['txtUserName']}"
id="displayname_id">
</h:inputText>
</dd>
</dl>
<dl>
<dt>
<h:outputLabel value="#{message['profile.initials']}">
</h:outputLabel>
</dt>
<dd>
<h:inputText required="false"
value="#{workflowController.workitem.item['txtInitials']}">
</h:inputText>
</dd>
</dl>
<dl>
<dt>
<h:outputLabel for="email_id"
value="#{message['profile.email']}">
</h:outputLabel>
<span class="imixs-required">*</span>
</dt>
<dd>
<h:inputText required="true"
value="#{workflowController.workitem.item['txtEmail']}"
id="email_id">
</h:inputText>
</dd>
</dl>
<dl>
<dt>#{message['profile.deputy']}</dt>
<dd>
<marty:userInput
value="#{workflowController.workitem.item['namDeputy']}"
editmode="true" />
</dd>
</dl>
</div>
<!-- custom panel -->
<ui:include src="/pages/profile/sub_profile_custom.xhtml">
<ui:param name="workitem"
value="#{workflowController.workitem}" />
</ui:include>
<!-- User Icon -->
<div class="imixs-form-panel" style="width: 50%;">
<h2>User Icon</h2>
<h:panelGroup layout="block" id="usericonpanel"
style="float: left; margin-right: 20px;">
<h:graphicImage styleClass="imixs-user-icon"
rendered="#{! empty workflowController.workitem.item['txtusericon']}"
value="/api/snapshot/#{workflowController.workitem.item['$uniqueid']}/file/#{workflowController.workitem.item['txtusericon']}">
</h:graphicImage>
</h:panelGroup>
<h:panelGroup layout="block" styleClass="imixs-form-section"
style="clear: none; width:80%;">
<i:imixsFileUpload id="file_upload_id"
workitem="#{workflowController.workitem}"
context_url="#{facesContext.externalContext.requestContextPath}/api/workflow/workitem/#{workflowController.workitem.item['$uniqueid']}"
hideattachments="true" />
<div style="clear: left;" />
<h:commandButton value="#{message.remove}"
rendered="#{! empty workflowController.workitem.item['txtusericon']}"
actionListener="#{userController.removeUserIcon()}">
<f:ajax render="usericonpanel"></f:ajax>
</h:commandButton>
</h:panelGroup>
</div>
</div>
<!-- Security Groups -->
<div id="tab-2">
<div class="imixs-form-panel imixs-form-section-2">
<!-- Enable local database security? -->
<h:panelGroup
rendered="#{setupController.workitem.item['keyEnableUserDB']}">
<dl>
<dt>
<h:outputLabel value="#{message['profile.groups']}" />
</dt>
<dd>
<h:selectOneRadio layout="pageDirection" id="user_groups"
value="#{accessRoleController.userRole}">
<c:forEach
items="#{accessRoleController.accessRoles}"
var="group">
<f:selectItem itemLabel="#{group}" itemValue="#{group}"></f:selectItem>
</c:forEach>
</h:selectOneRadio>
</dd>
</dl>
<dl>
<dt>#{message['profile.locale']}</dt>
<dd>
<h:selectOneMenu id="locale_id" layout="pageDirection"
value="#{workflowController.workitem.item['txtLocale']}">
<f:selectItem itemLabel="Deutsch" itemValue="de_DE" />
<f:selectItem itemLabel="English" itemValue="en_EN" />
</h:selectOneMenu>
</dd>
</dl>
</h:panelGroup>
</div>
<div class="imixs-form-panel imixs-form-section">
<dl>
<dt>#{message.description}</dt>
<dd>
<h:inputTextarea required="false"
value="#{workflowController.workitem.item['txtComments']}"
id="description_id" style="height: 7em; width: 95%">
</h:inputTextarea>
</dd>
</dl>
</div>
</div>
<!-- X509 -->
<ui:fragment
rendered="#{propertyController.getProperty('profile.x509') eq 'true'}">
<div id="tab-3">
<div class="imixs-form-panel imixs-form-section-2">
<dl>
<dt>Organisation</dt>
<dd>
<h:inputText
value="#{workflowController.workitem.item['x509.o']}" />
</dd>
</dl>
<dl>
<dt>Org Units</dt>
<dd>
<h:inputTextarea required="false"
converter="org.imixs.VectorConverter" style="height: 4em;"
value="#{workflowController.workitem.itemList['x509.ou']}">
</h:inputTextarea>
</dd>
</dl>
<dl>
<dt>Country</dt>
<dd>
<h:inputText
value="#{workflowController.workitem.item['x509.country']}" />
</dd>
</dl>
<dl>
<dt>City</dt>
<dd>
<h:inputText
value="#{workflowController.workitem.item['x509.city']}" />
</dd>
</dl>
<dl>
<dt>State</dt>
<dd>
<h:inputText
value="#{workflowController.workitem.item['x509.state']}" />
</dd>
</dl>
</div>
<div class="imixs-form-panel imixs-form-section-2">
<dl>
<dt>Signature</dt>
<dd>
<h:panelGroup id="signatureimage">
<h:graphicImage style="max-width:200px;"
rendered="#{! empty workflowController.workitem.item['signature.image']}"
value="/api/snapshot/#{workflowController.workitem.item['$uniqueid']}/file/#{workflowController.workitem.item['signature.image']}">
</h:graphicImage>
<br />
<h:commandButton value="#{message.remove}"
rendered="#{! empty workflowController.workitem.item['signature.image']}"
actionListener="#{userController.removeSignature()}">
<f:ajax render="signatureimage"></f:ajax>
</h:commandButton>
</h:panelGroup>
</dd>
</dl>
</div>
</div>
</ui:fragment>
</div>
</div>
<!-- form-body end -->
<ui:include src="/pages/admin/sub_footer.xhtml">
<ui:param name="action" value="/pages/admin/profilelist" />
</ui:include>
</div>
</h:form>
</f:view>
</ui:define>
</ui:composition>