]> git.mxchange.org Git - addressbook-war.git/commitdiff
Continued with cleanup: (please cherry-pick)
authorRoland Häder <roland@mxchange.org>
Fri, 5 Aug 2016 15:42:16 +0000 (17:42 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 6 Aug 2016 21:35:13 +0000 (23:35 +0200)
- enumerations cannot be compared in JSF until JSF 3.0, so compare only the string, thanks to BalusC@stackoverflow
- a lot CSS cleanups, such as correct padding and sizes
- replaced table_row -> para
- removed table_left/right_25/75 (was not working somewhy correctly)

web/admin/user/admin_user_unlock.xhtml
web/resources/css/cssLayout.css
web/resources/css/default.css

index 4a369191b87e1e17b649e3e09fc33f24218180f1..f9ed10adc2c9862d029a679f7c398aa6d6662307 100644 (file)
@@ -23,7 +23,7 @@
                        <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.user}" />
 
                        <h:form id="form_admin_user_unlock" rendered="#{not empty beanHelper.user}">
-                               <div class="table_big">
+                               <div class="table_medium">
                                        <div class="table_header">
                                                <h:outputFormat value="#{msg.ADMIN_UNLOCK_USER_TITLE}">
                                                        <f:param value="#{beanHelper.user.userName}" />
                                                </h:outputFormat>
                                        </div>
 
-                                       <div class="table_row">
-                                               <div class="table_left25">
+                                       <div class="para">
+                                               <div>
                                                        <h:outputLabel for="contactGender" value="#{msg.PERSONAL_DATA_GENDER}" />
                                                </div>
 
-                                               <div class="table_right75">
+                                               <div>
                                                        <h:outputText id="contactGender" value="#{msg[beanHelper.user.userContact.contactGender.messageKey]}" />
                                                </div>
-
-                                               <div class="clear"></div>
                                        </div>
 
-                                       <div class="table_row">
-                                               <div class="table_left25">
+                                       <div class="para">
+                                               <div>
                                                        <h:outputLabel for="contactFirstName" value="#{msg.PERSONAL_DATA_FIRST_NAME}" />
                                                </div>
 
-                                               <div class="table_right75">
+                                               <div>
                                                        <h:outputText id="contactFirstName" value="#{beanHelper.user.userContact.contactFirstName}" />
                                                </div>
-
-                                               <div class="clear"></div>
                                        </div>
 
-                                       <div class="table_row">
-                                               <div class="table_left25">
+                                       <div class="para">
+                                               <div>
                                                        <h:outputLabel for="contactFamilyName" value="#{msg.PERSONAL_DATA_FAMILY_NAME}" />
                                                </div>
 
-                                               <div class="table_right75">
+                                               <div>
                                                        <h:outputText id="contactFamilyName" value="#{beanHelper.user.userContact.contactFamilyName}" />
                                                </div>
-
-                                               <div class="clear"></div>
                                        </div>
 
-                                       <div class="table_row">
-                                               <div class="table_left25">
+                                       <div class="para">
+                                               <div>
                                                        <h:outputLabel for="userLockReason" value="#{msg.ADMIN_ENTER_USER_LOCK_REASON}" />
                                                </div>
 
-                                               <div class="table_right75">
-                                                       <h:inputTextarea id="userLockReason" value="#{adminUserController.userLockReason}" cols="30" rows="20" required="true" requiredMessage="#{msg.ADMIN_USER_UNLOCK_REASON_REQUIRED}" />
+                                               <div>
+                                                       <h:inputTextarea id="userLockReason" value="#{adminUserController.userLockReason}" cols="50" rows="10" required="true" requiredMessage="#{msg.ADMIN_USER_UNLOCK_REASON_REQUIRED}" rendered="#{beanHelper.user.userAccountStatus == 'CONFIRMED'}" />
 
-                                                       <h:outputText value="#{adminUserController.userLockReason}" />
+                                                       <h:outputText value="#{adminUserController.userLockReason}" rendered="#{beanHelper.user.userAccountStatus == 'LOCKED'}" />
 
-                                                       <h:outputText value="#{msg.ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == UserAccountStatus.UNCONFIRMED}" />
+                                                       <h:outputText value="#{msg.ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}" />
                                                </div>
-
-                                               <div class="clear"></div>
                                        </div>
 
                                        <div class="table_footer">
                                                <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
 
-                                               <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.lockUserAccount(beanHelper.user)}" value="#{msg.BUTTON_ADMIN_LOCK_USER_ACCOUNT}" rendered="#{beanHelper.user.userAccountStatus == UserAccountStatus.CONFIRMED}" />
-
-                                               <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.unlockUserAccount(beanHelper.user)}" value="#{msg.BUTTON_ADMIN_UNLOCK_USER_ACCOUNT}" rendered="#{beanHelper.user.userAccountStatus == UserAccountStatus.LOCKED}" />
+                                               <ui:fragment rendered="#{beanHelper.user.userAccountStatus == 'CONFIRMED'}">
+                                                       <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.lockUserAccount(beanHelper.user)}" value="#{msg.BUTTON_ADMIN_LOCK_USER_ACCOUNT}" />
+                                               </ui:fragment>
 
-                                               <h:outputText value="#{msg.ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == UserAccountStatus.UNCONFIRMED}" />
+                                               <ui:fragment rendered="#{beanHelper.user.userAccountStatus == 'LOCKED'}">
+                                                       <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.unlockUserAccount(beanHelper.user)}" value="#{msg.BUTTON_ADMIN_UNLOCK_USER_ACCOUNT}" />
+                                               </ui:fragment>
 
-                                               <div class="clear"></div>
+                                               <h:outputText value="#{msg.ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}" />
                                        </div>
                                </div>
                        </h:form>
index 01512149678ffe395264b836341c2b31bdbd8853..cf19d773dec2a4d6261c1de5d944042f8785fcf2 100644 (file)
@@ -44,7 +44,8 @@ div, table {
 }
 
 .left_content {
-       padding: 5px;
+       padding-right: 5px;
+       padding-bottom: 5px;
        margin-left: 190px;
 }
 
@@ -70,7 +71,7 @@ table, .table, .table_medium {
 }
 
 .table_medium {
-       width: 700px;
+       width: 620px;
 }
 
 .table_big {
index db4c73f3b45158f88ee0e64792a5f3bf22918d7a..2c2688d1c63c63990368f57eb165450e6962e5cb 100644 (file)
@@ -3,7 +3,7 @@ body {
        font-size: 12px;
        font-family: sans-serif;
        color: #000000;
-       margin: 10px;
+       margin: 0px;
 }
 
 h1 {