Fixes styling on passwordChanger to be inline with Belle styles

This commit is contained in:
Shannon
2013-10-18 11:55:53 +11:00
parent e0c1b5cd8d
commit a663cad110
2 changed files with 51 additions and 40 deletions

View File

@@ -8,7 +8,7 @@
toggle: function (e) {
if (!$("#umbPasswordChanger").is(":visible")) {
this.togglePasswordInputValidators(true);
$(e).closest(".propertyItem").replaceWith($("#umbPasswordChanger"));
$(e).closest(".umb-el-wrap").replaceWith($("#umbPasswordChanger"));
$("#umbPasswordChanger").show();
$("#<%=IsChangingPasswordField.ClientID%>").val("true");
$(e).hide();
@@ -64,59 +64,70 @@
<a href="#" id="changePasswordButton">Change password</a><br />
<div class="propertyItem" id="umbPasswordChanger" style="display: none;">
<asp:HiddenField runat="server" ID="IsChangingPasswordField" Value="false" />
<asp:PlaceHolder runat="server" ID="ResetPlaceHolder" Visible="<%#Provider.EnablePasswordReset %>">
<div class="propertyItemheader"><%=umbraco.ui.GetText("user", "resetPassword")%></div>
<div class="propertyItemContent">
<asp:CheckBox runat="server" ID="ResetPasswordCheckBox" />
</div>
<div class="umb-el-wrap">
<label class="control-label" for="<%=ResetPasswordCheckBox.ClientID %>"><%=umbraco.ui.GetText("user", "resetPassword")%></label>
<div class="controls controls-row">
<asp:CheckBox runat="server" ID="ResetPasswordCheckBox" />
</div>
</div>
</asp:PlaceHolder>
<div id="passwordInputArea">
<asp:PlaceHolder runat="server" ID="CurrentPasswordPlaceHolder" Visible="<%#Provider.EnablePasswordRetrieval == false %>">
<div class="propertyItemheader"><%=umbraco.ui.GetText("user", "passwordCurrent")%></div>
<div class="propertyItemContent">
<asp:TextBox ID="umbPasswordChanger_passwordCurrent" autocomplete="off" AutoCompleteType="None" TextMode="password" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="CurrentPasswordValidator" Enabled="False" runat="server"
Display="Dynamic"
ControlToValidate="umbPasswordChanger_passwordCurrent"
ErrorMessage="Required" />
<div class="umb-el-wrap ">
<label class="control-label" for="<%=umbPasswordChanger_passwordCurrent.ClientID %>"><%=umbraco.ui.GetText("user", "passwordCurrent")%></label>
<div class="controls controls-row">
<asp:TextBox ID="umbPasswordChanger_passwordCurrent" autocomplete="off" AutoCompleteType="None" TextMode="password" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="CurrentPasswordValidator" Enabled="False" runat="server"
Display="Dynamic"
ControlToValidate="umbPasswordChanger_passwordCurrent"
ErrorMessage="Required" />
</div>
</div>
</asp:PlaceHolder>
<div class="propertyItemheader"><%=umbraco.ui.GetText("user", "newPassword")%></div>
<div class="propertyItemContent">
<asp:TextBox ID="umbPasswordChanger_passwordNew" autocomplete="off" AutoCompleteType="None" TextMode="password" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="NewPasswordRequiredValidator" Enabled="False" runat="server"
Display="Dynamic"
ControlToValidate="umbPasswordChanger_passwordNew"
ErrorMessage="Required" />
<asp:RegularExpressionValidator ID="NewPasswordLengthValidator" runat="server"
Display="Dynamic"
ControlToValidate="umbPasswordChanger_passwordNew"
ErrorMessage='<%# "Minimum " + Provider.MinRequiredPasswordLength + " characters" %>'
ValidationExpression='<%# ".{" + Provider.MinRequiredPasswordLength + "}.*" %>' />
<div class="umb-el-wrap ">
<label class="control-label" for="<%=umbPasswordChanger_passwordNew.ClientID %>"><%=umbraco.ui.GetText("user", "newPassword")%></label>
<div class="controls controls-row">
<asp:TextBox ID="umbPasswordChanger_passwordNew" autocomplete="off" AutoCompleteType="None" TextMode="password" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="NewPasswordRequiredValidator" Enabled="False" runat="server"
Display="Dynamic"
ControlToValidate="umbPasswordChanger_passwordNew"
ErrorMessage="Required" />
<asp:RegularExpressionValidator ID="NewPasswordLengthValidator" runat="server"
Display="Dynamic"
ControlToValidate="umbPasswordChanger_passwordNew"
ErrorMessage='<%# "Minimum " + Provider.MinRequiredPasswordLength + " characters" %>'
ValidationExpression='<%# ".{" + Provider.MinRequiredPasswordLength + "}.*" %>' />
</div>
</div>
<div class="umb-el-wrap ">
<label class="control-label" for="<%=umbPasswordChanger_passwordNewConfirm.ClientID %>"><%=umbraco.ui.GetText("user", "confirmNewPassword")%></label>
<div class="controls controls-row">
<asp:TextBox ID="umbPasswordChanger_passwordNewConfirm" autocomplete="off" AutoCompleteType="None" TextMode="password" runat="server"></asp:TextBox>
<asp:CompareValidator ID="ConfirmPasswordValidator" runat="server" Enabled="False"
Display="Dynamic"
ErrorMessage="Passwords must match"
ControlToValidate="umbPasswordChanger_passwordNew"
ControlToCompare="umbPasswordChanger_passwordNewConfirm"
Operator="Equal" />
</div>
</div>
<div class="propertyItemheader"><%=umbraco.ui.GetText("user", "confirmNewPassword")%></div>
<div class="propertyItemContent">
<asp:TextBox ID="umbPasswordChanger_passwordNewConfirm" autocomplete="off" AutoCompleteType="None" TextMode="password" runat="server"></asp:TextBox>
<asp:CompareValidator ID="ConfirmPasswordValidator" runat="server" Enabled="False"
Display="Dynamic"
ErrorMessage="Passwords must match"
ControlToValidate="umbPasswordChanger_passwordNew"
ControlToCompare="umbPasswordChanger_passwordNewConfirm"
Operator="Equal" />
</div>
</div>
</div>
<div id="Div1" runat="server" class="success" style="margin-top:10px;width:300px;" Visible="<%# string.IsNullOrWhiteSpace(ChangingPasswordModel.GeneratedPassword) == false %>">
<div id="Div1" runat="server" class="alert alert-success" style="margin-top: 10px; width: 300px;" visible="<%# string.IsNullOrWhiteSpace(ChangingPasswordModel.GeneratedPassword) == false %>">
<p style="text-align: center">
Password has been reset to<br/><br/>
Password has been reset to<br />
<br />
<strong><%# ChangingPasswordModel.GeneratedPassword %></strong>
</p>
</div>
</div>

View File

@@ -167,7 +167,7 @@ namespace umbraco.cms.presentation.user
Visible = false,
EnableViewState = false
};
validatorContainer.Attributes["class"] = "error";
validatorContainer.Attributes["class"] = "alert alert-error";
validatorContainer.Style.Add(HtmlTextWriterStyle.MarginTop, "10px");
validatorContainer.Style.Add(HtmlTextWriterStyle.Width, "300px");
var validatorContainer2 = new HtmlGenericControl("p");