<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="SchimbareParola_new.aspx.vb"
Inherits="UtilizatoriParola_SchimbareParola_new" %>
<%@ Register Assembly="DevExpress.Web.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web" TagPrefix="dx" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Schimbare parola</title>
<link href="../Styles/PopUpStyleSheet.css" rel="stylesheet" type="text/css" />
<link href="../Styles/StyleSheetPassword.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
if (!window.console) console = { log: function () { } };
</script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
</head>
<body class="BodyPopUpCSS">
<form id="form1" runat="server">
<asp:ScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ScriptManager>
<script type="text/javascript" id="dxss_request">
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_initializeRequest(initializeRequest);
prm.add_pageLoaded(pageLoaded);
function initializeRequest(sender, args) {
ASPxButtonUpdate.SetEnabled(false);
var detView = document.getElementById('<%= Me.DetailsView1.ClientID %>');
loadingPanel.ShowInElement(detView);
} // end initializeRequest
function pageLoaded(sender, args) {
var panels = args.get_panelsUpdated();
if (panels.length > 0) {
loadingPanel.Hide();
}
// activez butonul
ASPxButtonUpdate.SetEnabled(true);
} // end pageLoaded
function Renunta_click() {
window.parent.RenuntaSchimbareParola();
// return false;
}
</script>
<script type="text/javascript">
function getPasswordStrengthState() {
$get("<%= Me.hiddenValidNewPassword %>").value = $find("newPassStrength")._getPasswordStrength();
}
</script>
<%--marius--%>
<script>
// Funcție pentru afișarea ferestrei modale cu un mesaj dat
function showModal(message) {
var modal = document.getElementById("myModal");
var modalText = document.getElementById("modalText");
modalText.innerHTML = message;
modal.style.display = "block";
}
// Funcție pentru ascunderea ferestrei modale
//function closeModal() {
// var modal = document.getElementById("myModal");
// modal.style.display = "none";
//}
// Înlocuiți apelul Response.Write cu acest cod pentru a afișa fereastra modală
//showModal(getTextDictionar("NEW_PASS_REDIRECT_MSG"));
// Adăugați un eveniment de închidere a ferestrei modale atunci când faceți clic pe "×" (close)
//var closeButton = document.getElementsByClassName("close")[0];
//closeButton.onclick = closeModal;
// Închideți fereastra modală dacă utilizatorul face clic în afara acesteia
//window.onclick = function(event) {
// var modal = document.getElementById("myModal");
// if (event.target == modal) {
// closeModal();
// }
//};
</script>
<style>
.modal {
display: none;
position: fixed;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0,0,0,0.7);
}
.modal-content {
background-color: #fff;
margin: 10% auto;
padding: 20px;
border: 1px solid #888;
width: 40%;
}
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover {
color: #000;
text-decoration: none;
cursor: pointer;
}
.hidden {
display: none;
}
</style>
<div id="myModal" class="modal">
<div class="modal-content">
<button id="close-btn">
<span id="closeModal">×</span>
</button>
<p id="modalText"></p>
</div>
</div>
<%--marius--%>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" AutoGenerateEditButton="false"
Width="40%">
<FieldHeaderStyle Width="120px" />
<Fields>
<asp:TemplateField HeaderText="USER_NAME"
ItemStyle-BorderWidth="1px"
ItemStyle-BorderStyle="Solid"
ItemStyle-BorderColor="#AECAF0">
<EditItemTemplate>
<asp:Label ID="lblUSER_NAME" runat="server" Text='<%# Bind("USER_NAME") %>'></asp:Label>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="FULL_NAME"
ItemStyle-BorderWidth="1px"
ItemStyle-BorderStyle="Solid"
ItemStyle-BorderColor="#AECAF0">
<EditItemTemplate>
<asp:Label ID="lblFULL_NAME" runat="server" Text='<%# Bind("FULL_NAME") %>'></asp:Label>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="PAROLA_VECHE"
ItemStyle-BorderWidth="1px"
ItemStyle-BorderStyle="Solid"
ItemStyle-BorderColor="#AECAF0">
<EditItemTemplate>
<asp:TextBox ID="txtParolaVeche" runat="server" TextMode="Password" MaxLength="36"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvParolaVeche" runat="server"
ControlToValidate="txtParolaVeche" ErrorMessage="Trebuie sa scrieti o veche parola">*</asp:RequiredFieldValidator>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="PAROLANOUA"
ItemStyle-BorderWidth="1px"
ItemStyle-BorderStyle="Solid"
ItemStyle-BorderColor="#AECAF0">
<EditItemTemplate>
<asp:TextBox ID="txtParolaNoua" runat="server" TextMode="Password" MaxLength="36" autocomplete="off" onkeypress="getPasswordStrengthState()"></asp:TextBox>
<asp:CustomValidator ID="CustomValidatorParolaNoua" runat="server"
OnServerValidate="ParolaNoua_ServerValidate"
ErrorMessage="Trebuie sa scrieti o parola" Display="Dynamic">*</asp:CustomValidator>
<br />
<asp:Label ID="txtParolaNoua_HelpLabel" runat="server" Font-Size="10px" Font-Bold="false" Font-Italic="true" ForeColor="Gray" />
<asp:PasswordStrength ID="passStrength" runat="server"
BehaviorID="newPassStrength"
TargetControlID="txtParolaNoua"
DisplayPosition="AboveRight"
StrengthIndicatorType="Text"
TextStrengthDescriptions="Very Poor;Weak;Average;Good;Excellent"
HelpStatusLabelID="txtParolaNoua_HelpLabel"
PreferredPasswordLength="6"
MinimumNumericCharacters="1"
MinimumSymbolCharacters="1"
StrengthStyles="TextIndicator_TextBox1_Strength1;TextIndicator_TextBox1_Strength2;TextIndicator_TextBox1_Strength3;TextIndicator_TextBox1_Strength4;TextIndicator_TextBox1_Strength5"></asp:PasswordStrength>
<asp:HiddenField ID="hfParolaNoua" runat="server" />
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="CONFIRMAREPAROLA"
ItemStyle-BorderWidth="1px"
ItemStyle-BorderStyle="Solid"
ItemStyle-BorderColor="#AECAF0">
<EditItemTemplate>
<asp:TextBox ID="txtConfirmareParola" runat="server" TextMode="Password" MaxLength="36"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvConfirmareParola" runat="server" ControlToValidate="txtConfirmareParola"
ErrorMessage="Confirmati parola">*</asp:RequiredFieldValidator>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False"
ItemStyle-BorderWidth="1px"
ItemStyle-BorderStyle="Solid"
ItemStyle-BorderColor="#AECAF0">
<EditItemTemplate>
<table>
<tr>
<td>
<dx:ASPxButton ID="ASPxButtonUpdate" ClientInstanceName="ASPxButtonUpdate" runat="server"
Text='<%# getTextDictionar("Save") %>' CausesValidation="true" CommandName="Update">
</dx:ASPxButton>
</td>
<td>
<dx:ASPxButton ID="ASPxButtonCancelEdit" runat="server" Text='<%# getTextDictionar("Cancel") %>'
CausesValidation="false" AutoPostBack="false" ClientEnabled="true" ClientInstanceName="ASPxButtonCancelEdit">
<ClientSideEvents Click="Renunta_click" />
</dx:ASPxButton>
</td>
</tr>
</table>
</EditItemTemplate>
</asp:TemplateField>
</Fields>
</asp:DetailsView>
<asp:ValidationSummary ID="ValidationSummaryUtilizatori" runat="server" />
<asp:Label ID="lblMesaj" runat="server" ForeColor="Red"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
<dx:ASPxLoadingPanel ID="ASPxLoadingPanel1" runat="server"
Text="Asteptati..."
ClientInstanceName="loadingPanel"
VerticalOffset="0"
HorizontalOffset="0">
</dx:ASPxLoadingPanel>
</form>
</body>
</html>
<script type="text/javascript">
$(function () {
$("#close-btn").click(function (event) {
$("#myModal").addClass("hidden");
console.log("here");
console.log("am ajuns aici");
});
});
</script>