Commit 9c130a29 authored by michael.simon's avatar michael.simon
Browse files

again changes to ui

parent fca74e8f
......@@ -41,7 +41,7 @@
border: none;
}
.ui-helper-hidden {
label.ui-helper-hidden {
display: none !important;
}
......
......@@ -21,84 +21,83 @@
<ui:param name="title" value="#{messages.title}"/>
<ui:define name="content">
<h:form id="form">
<h:form id="form" styleClass="fancy form full">
<p:panel id="tokenPanel" header="Token Admin">
<p:panelGrid columns="2">
<h:outputLabel value="Eppn" for="@next" />
<p:autoComplete id="userAutocompl" multiple="false" value="#{tokenAdminIndexBean.selectedUser}"
completeMethod="#{tokenAdminIndexBean.completeUser}" minQueryLength="2"
var="u" itemLabel="#{u.eppn}" itemValue="#{u}" converter="#{userConverter}"
forceSelection="true">
<p:column style="width:20%">
<h:outputText value="#{u.id}" />
</p:column>
<p:column>
<h:outputText value="#{u.eppn}" />
</p:column>
<p:column>
<h:outputText value="#{u.surName}" />
</p:column>
<p:column>
<h:outputText value="#{u.givenName}" />
</p:column>
</p:autoComplete>
<p:focus for="userAutocompl" />
</p:panelGrid>
<p:outputPanel style="margin-bottom: 16px;">
<p:commandButton action="#{tokenAdminIndexBean.searchToken()}" value="Search" update="tokenPanel,messageBox"/>
</p:outputPanel>
<p:panel rendered="#{tokenAdminIndexBean.readOnly}">
<h:outputText value="No User selected, or Token read only" />
</p:panel>
<h3>Token Admin</h3>
<p:messages id="messageBox" showDetail="true" escape="false" />
<p:dataGrid var="token" value="#{tokenAdminIndexBean.userTokenList}" columns="2" styleClass="whitefoot"
layout="grid" style="margin-bottom: 16px;"
rendered="#{not tokenAdminIndexBean.readOnly}">
<f:facet name="header">#{messages.twofa_list} (#{tokenAdminIndexBean.selectedUser.eppn})</f:facet>
<p:panel styleClass="grayback" style="margin-bottom: 0px;">
<f:facet name="header">
<i class="fa fa-fw fa-key"></i>
<b><h:outputText value="#{token.serial}" /></b>
</f:facet>
<p:panelGrid columns="2">
<p:outputPanel>
<h:graphicImage width="60px" value="#{resource['img/smartphone.svg']}" alt="Smartphone" rendered="#{token.tokenType == 'TOTP' and token.serial.startsWith('TOTP')}"/>
<h:graphicImage width="60px" value="#{resource['img/kittoken_small.png']}" alt="Hardware Token" rendered="#{token.tokenType == 'TOTP' and not token.serial.startsWith('TOTP')}"/>
<h:graphicImage width="60px" value="#{resource['img/yubikey_small.png']}" alt="Yubikey" rendered="#{token.tokenType == 'yubico'}"/>
<h:graphicImage width="60px" value="#{resource['img/tanlist.svg']}" alt="Backup TAN List" rendered="#{token.tokenType == 'HMAC'}"/>
</p:outputPanel>
<p:outputPanel>
<h:panelGrid columns="2" style="margin-bottom: 16px;">
<p:outputLabel for="@next" value="#{messages.twofa_tokentype}:" />
<h:panelGroup>
<h:outputText value="#{messages.twofa_tokentype_totp}" rendered="#{token.tokenType == 'TOTP' and token.serial.startsWith('TOTP')}"/>
<h:outputText value="#{messages.twofa_tokentype_totp_hardware}" rendered="#{token.tokenType == 'TOTP' and not token.serial.startsWith('TOTP')}"/>
<h:outputText value="#{messages.twofa_tokentype_tanlist}" rendered="#{token.tokenType == 'HMAC'}"/>
<h:outputText value="#{messages.twofa_tokentype_yubikey}" rendered="#{token.tokenType == 'yubico'}"/>
</h:panelGroup>
<p:outputLabel for="@next" value="#{messages.twofa_active}:" />
<h:outputText value="#{token.isactive ? messages.yes : messages.no}" />
</h:panelGrid>
<p:panel style="margin: 8px;" rendered="#{! token.isactive and (token.tokenDesc.contains('INIT'))}">
<h:outputText value="#{messages.twofa_token_not_init}" style="color:red;" />
</p:panel>
<p:commandButton action="#{tokenAdminIndexBean.disableToken(token.serial)}" value="#{messages.disable}"
update="@form" rendered="#{token.isactive}"/>
<p:commandButton action="#{tokenAdminIndexBean.enableToken(token.serial)}" value="#{messages.enable}"
update="@form" rendered="#{! token.isactive and (! token.tokenDesc.contains('INIT'))}"/>
</p:outputPanel>
</p:panelGrid>
</p:panel>
</p:dataGrid>
<p:panelGrid columns="2">
<h:outputLabel value="Eppn" for="@next" />
<p:autoComplete id="userAutocompl" multiple="false" value="#{tokenAdminIndexBean.selectedUser}"
completeMethod="#{tokenAdminIndexBean.completeUser}" minQueryLength="2"
var="u" itemLabel="#{u.eppn}" itemValue="#{u}" converter="#{userConverter}"
forceSelection="true">
<p:column style="width:20%">
<h:outputText value="#{u.id}" />
</p:column>
<p:column>
<h:outputText value="#{u.eppn}" />
</p:column>
<p:column>
<h:outputText value="#{u.surName}" />
</p:column>
<p:column>
<h:outputText value="#{u.givenName}" />
</p:column>
</p:autoComplete>
</p:panelGrid>
<p:focus for="userAutocompl" />
<p:outputPanel style="margin-bottom: 16px;">
<p:commandButton action="#{tokenAdminIndexBean.searchToken()}" value="Search" update="form"/>
</p:outputPanel>
<p:panel rendered="#{tokenAdminIndexBean.readOnly}">
<h:outputText value="No User selected, or Token read only" />
</p:panel>
<p:messages id="messageBox" showDetail="true" escape="false" />
<p:dataGrid var="token" value="#{tokenAdminIndexBean.userTokenList}" columns="2" styleClass="whitefoot"
layout="grid" style="margin-bottom: 16px;"
rendered="#{not tokenAdminIndexBean.readOnly}">
<f:facet name="header">#{messages.twofa_list} (#{tokenAdminIndexBean.selectedUser.eppn})</f:facet>
<p:panel styleClass="grayback" style="margin-bottom: 0px;">
<f:facet name="header">
<i class="fa fa-fw fa-key"></i>
<b><h:outputText value="#{token.serial}" /></b>
</f:facet>
<p:panelGrid columns="2">
<p:outputPanel>
<h:graphicImage width="60px" value="#{resource['img/smartphone.svg']}" alt="Smartphone" rendered="#{token.tokenType == 'TOTP' and token.serial.startsWith('TOTP')}"/>
<h:graphicImage width="60px" value="#{resource['img/kittoken_small.png']}" alt="Hardware Token" rendered="#{token.tokenType == 'TOTP' and not token.serial.startsWith('TOTP')}"/>
<h:graphicImage width="60px" value="#{resource['img/yubikey_small.png']}" alt="Yubikey" rendered="#{token.tokenType == 'yubico'}"/>
<h:graphicImage width="60px" value="#{resource['img/tanlist.svg']}" alt="Backup TAN List" rendered="#{token.tokenType == 'HMAC'}"/>
</p:outputPanel>
<p:outputPanel>
<h:panelGrid columns="2" style="margin-bottom: 16px;">
<p:outputLabel for="@next" value="#{messages.twofa_tokentype}:" />
<h:panelGroup>
<h:outputText value="#{messages.twofa_tokentype_totp}" rendered="#{token.tokenType == 'TOTP' and token.serial.startsWith('TOTP')}"/>
<h:outputText value="#{messages.twofa_tokentype_totp_hardware}" rendered="#{token.tokenType == 'TOTP' and not token.serial.startsWith('TOTP')}"/>
<h:outputText value="#{messages.twofa_tokentype_tanlist}" rendered="#{token.tokenType == 'HMAC'}"/>
<h:outputText value="#{messages.twofa_tokentype_yubikey}" rendered="#{token.tokenType == 'yubico'}"/>
</h:panelGroup>
<p:outputLabel for="@next" value="#{messages.twofa_active}:" />
<h:outputText value="#{token.isactive ? messages.yes : messages.no}" />
</h:panelGrid>
<p:panel style="margin: 8px;" rendered="#{! token.isactive and (token.tokenDesc.contains('INIT'))}">
<h:outputText value="#{messages.twofa_token_not_init}" style="color:red;" />
</p:panel>
<p:commandButton action="#{tokenAdminIndexBean.disableToken(token.serial)}" value="#{messages.disable}"
update="@form" rendered="#{token.isactive}"/>
<p:commandButton action="#{tokenAdminIndexBean.enableToken(token.serial)}" value="#{messages.enable}"
update="@form" rendered="#{! token.isactive and (! token.tokenDesc.contains('INIT'))}"/>
</p:outputPanel>
</p:panelGrid>
</p:panel>
</p:dataGrid>
</h:form>
</ui:define>
</ui:composition>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment