浏览代码

Console UI: OneWayPassword attribute are now displayed properly according to the new layout

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4818 a333f486-631f-4898-b8df-5754b55c2be0
glajarige 8 年之前
父节点
当前提交
0e6e8888ec
共有 3 个文件被更改,包括 30 次插入3 次删除
  1. 8 2
      application/ui.passwordwidget.class.inc.php
  2. 11 0
      css/light-grey.css
  3. 11 1
      css/light-grey.scss

+ 8 - 2
application/ui.passwordwidget.class.inc.php

@@ -58,9 +58,15 @@ class UIPasswordWidget
 		$sConfirmPasswordValue = $aPasswordValues ? $aPasswordValues['confirm'] : '*****';
 		$sChangedValue = (($sPasswordValue != '*****') || ($sConfirmPasswordValue != '*****')) ? 1 : 0;
 		$sHtmlValue = '';
-		$sHtmlValue = '<input type="password" maxlength="255" name="attr_'.$sCode.'[value]" id="'.$this->iId.'" value="'.htmlentities($sPasswordValue, ENT_QUOTES, 'UTF-8').'"/>&nbsp;<span class="form_validation" id="v_'.$this->iId.'"></span><span id="fstatus_'.$this->iId.'"></span><br/>';
-		$sHtmlValue .= '<input type="password" maxlength="255" id="'.$this->iId.'_confirm" value="'.htmlentities($sConfirmPasswordValue, ENT_QUOTES, 'UTF-8').'" name="attr_'.$sCode.'[confirm]"/> '.Dict::S('UI:PasswordConfirm').' <input id="'.$this->iId.'_reset" type="button" value="'.Dict::S('UI:Button:ResetPassword').'" onClick="ResetPwd(\''.$this->iId.'\');">';
+		$sHtmlValue .= '<div class="field_input_zone field_input_onewaypassword">';
+		$sHtmlValue .= '<input type="password" maxlength="255" name="attr_'.$sCode.'[value]" id="'.$this->iId.'" value="'.htmlentities($sPasswordValue, ENT_QUOTES, 'UTF-8').'"/>';
+		$sHtmlValue .= '<input type="password" maxlength="255" id="'.$this->iId.'_confirm" value="'.htmlentities($sConfirmPasswordValue, ENT_QUOTES, 'UTF-8').'" name="attr_'.$sCode.'[confirm]"/>';
+		$sHtmlValue .= '<span>'.Dict::S('UI:PasswordConfirm').'</span>';
+		$sHtmlValue .= '<input id="'.$this->iId.'_reset" type="button" value="'.Dict::S('UI:Button:ResetPassword').'" onClick="ResetPwd(\''.$this->iId.'\');">';
 		$sHtmlValue .= '<input type="hidden" id="'.$this->iId.'_changed" name="attr_'.$sCode.'[changed]" value="'.$sChangedValue.'"/>';
+		$sHtmlValue .= '</div>';
+
+		$sHtmlValue .= '<span class="form_validation" id="v_'.$this->iId.'"></span><span class="field_status" id="fstatus_'.$this->iId.'"></span>';
 
 		$oPage->add_ready_script("$('#$this->iId').bind('keyup change', function(evt) { return PasswordFieldChanged('$this->iId') } );"); // Bind to a custom event: validate
 		$oPage->add_ready_script("$('#$this->iId').bind('keyup change validate', function(evt, sFormId) { return ValidatePasswordField('$this->iId', sFormId) } );"); // Bind to a custom event: validate

+ 11 - 0
css/light-grey.css

@@ -1217,6 +1217,17 @@ span.form_validation {
 .details > .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_string > select, .details > .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_password > select, .details > .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_string input, .details > .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_password input {
   width: 100%;
 }
+.details > .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_onewaypassword {
+  display: table-cell;
+  width: auto;
+}
+.details > .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_onewaypassword > * {
+  display: block;
+  width: 100%;
+}
+.details > .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_onewaypassword > span {
+  margin-bottom: 3px;
+}
 .details > .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_date, .details > .field_container > div > div.field_value .attribute-edit .field_input_zone.field_input_datetime {
   display: table;
   width: 100%;

+ 11 - 1
css/light-grey.scss

@@ -1327,7 +1327,17 @@ span.form_validation {
 							}
 
 							&.field_input_onewaypassword{
-								// Not implemented yet
+								display: table-cell;
+								width: auto;
+
+								> *{
+									display: block;
+									width: 100%;
+								}
+
+								> span{
+									margin-bottom: 3px;
+								}
 							}
 
 							&.field_input_date,