Feldvalidatoren wurden für alle Desktop- sowie Mobilansichten eingerichtet.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="Aufträge VERAG" Language="VB" MasterPageFile="~/Customers/Customers.master" AutoEventWireup="false" CodeFile="CustomsAviso.aspx.vb" Inherits="Kundenbereich_Default" %>
|
||||
<%@ Page Title="Aufträge VERAG" Language="VB" MasterPageFile="~/Customers/Customers.master" AutoEventWireup="false" CodeFile="CustomsAviso.aspx.vb" Inherits="Kundenbereich_Default" UnobtrusiveValidationMode="None"%>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
|
||||
<!-- Bootstrap -->
|
||||
@@ -108,9 +108,10 @@
|
||||
<div class="col-12" id="cont4">
|
||||
<div class="col-12" id="container2" style="margin-left:2px">
|
||||
<asp:Label ID="lbl_von" runat="server" Text="Von:"></asp:Label>
|
||||
<asp:TextBox id="pickdate1" Type="Date" CssClass="classTarget" OnTextChanged="pickdate1_TextChanged" runat="server"></asp:TextBox>
|
||||
|
||||
<asp:TextBox id="pickdate1" Type="Date" ClientValidationFunction="validate" CssClass="classTarget" OnTextChanged="pickdate1_TextChanged" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidatorvon" runat="server" ErrorMessage="Field required" ControlToValidate="pickdate1" Text="Required" ForeColor="White" Font-Strikeout="False" Font-Underline="False" Font-Overline="False" Font-Bold="True" BackColor="Red"></asp:RequiredFieldValidator>
|
||||
<asp:Label ID="lbl_bis" runat="server" Text="Bis:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidatorbis" ClientValidationFunction="validate" runat="server" ErrorMessage="Field required" ControlToValidate="pickdate2" Text="Required" ForeColor="White" Font-Strikeout="False" Font-Underline="False" Font-Overline="False" Font-Bold="True" BackColor="Red"></asp:RequiredFieldValidator>
|
||||
<asp:TextBox id="pickdate2" Type="Date" CssClass="classTarget" OnTextChanged="pickdate2_TextChanged" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
<div id="Abstand"></div>
|
||||
@@ -131,12 +132,13 @@
|
||||
<div class="d-none d-md-block">
|
||||
<!-- Optionale Suchparameter-->
|
||||
<div class="row">
|
||||
<div id="rowcol1" class="col-12">
|
||||
<div id="rowcol1" class="col-12">
|
||||
<form class="myform" id="commentForm" method="get" action="">
|
||||
<asp:Label ID="lbl_LKWNr" runat="server" Text="LKW Nr"></asp:Label>
|
||||
<asp:TextBox ID="txt_LKWNr" runat="server" style="width:117px; margin-left:25px;"></asp:TextBox>
|
||||
|
||||
<asp:TextBox ID="txt_LKWNr" runat="server" style="width:117px; margin-left:25px;"></asp:TextBox>
|
||||
<asp:Label ID="lbl_KdNrAuftrag" runat="server" Text="Kunden Auftrags Nr" style="margin-left:45px"></asp:Label>
|
||||
<asp:TextBox ID="txt_KdNrAuftrag" runat="server" style="width:117px; margin-left:6px;"></asp:TextBox>
|
||||
<asp:TextBox ID="txt_KdNrAuftrag" runat="server" style="width:117px; margin-left:6px;"></asp:TextBox>
|
||||
</form>
|
||||
</div>
|
||||
<div id="rowcol2" class="col-12">
|
||||
<asp:Label ID="lbl_Absender" runat="server" Text="Absender"></asp:Label>
|
||||
@@ -151,7 +153,7 @@
|
||||
<div id="rowcol3" class="col-10 row" style="margin-right:/*1.52px;*/0.33480176211453744vw;">
|
||||
<div class="row">
|
||||
<asp:Label ID="lbl_LKWNr_M" runat="server" Text="LKW Nr"></asp:Label>
|
||||
<asp:TextBox ID="txt_LKWNr_M" runat="server" style="width:117px; margin-left:25px;"></asp:TextBox>
|
||||
<asp:TextBox ID="txt_LKWNr_M" runat="server" style="width:117px; margin-left:25px;"></asp:TextBox>
|
||||
</div>
|
||||
<div id="rowcol4" class="col-10 row" style="margin-right:/*1.52px;*/0.33480176211453744vw;">
|
||||
<asp:Label ID="lbl_KdNrAuftrag_M" runat="server" Text="Kunden Auftrags Nr" style="margin-left:45px"></asp:Label>
|
||||
@@ -214,24 +216,41 @@
|
||||
</script>
|
||||
<script>
|
||||
function GetSelectedVal(ele) {
|
||||
$("#container2").hide();
|
||||
var el = $(ele).closest('label').text();
|
||||
if (el == "Alle") {
|
||||
$("#container2").show();
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorvon"), true);
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorbis"), true);
|
||||
} else if (el == "Alle_M") {
|
||||
$("#container2").show();
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorvon"), true);
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorbis"), true);
|
||||
} else if (el == "Freigabe") {
|
||||
$("#container2").show();
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorvon"), true);
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorbis"), true);
|
||||
} else if (el == "Freigabe_M") {
|
||||
$("#container2").show();
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorvon"), true);
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorbis"), true);
|
||||
} else {
|
||||
$("#container2").hide();
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorvon"), false);
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorbis"), false);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
|
||||
|
||||
function EndRequestHandler(sender, args) {
|
||||
$('.classTarget).datepicker({ dateFormat: 'dd.MM.yyyy' });
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
|
||||
</asp:Content>
|
||||
@@ -160,7 +160,7 @@ Partial Class Kundenbereich_Default
|
||||
Try
|
||||
Kdnrtext = Session.Item("CustomerID").ToString
|
||||
Catch A As UnauthorizedAccessException When Kdnrtext = Nothing
|
||||
MsgBox("Dieser Bereich ist nicht gestattet! Ein Fehler ist bei der Validierung der ID augetreten! Bitte erneut versuchen!", MsgBoxStyle.Information, "Error in User Area!")
|
||||
MsgBox("Dieser Bereich ist nicht gestattet! Ein Fehler ist bei der Validierung der ID aufgetreten! Bitte erneut versuchen!", MsgBoxStyle.Information, "Error in User Area!")
|
||||
End Try
|
||||
dt = Nothing
|
||||
If txt_Absender.Text IsNot "" Then
|
||||
@@ -437,6 +437,11 @@ Partial Class Kundenbereich_Default
|
||||
End Sub
|
||||
|
||||
Protected Sub pickdate2_TextChanged(sender As Object, e As EventArgs)
|
||||
|
||||
Dim TB As TextBox = sender
|
||||
If TB.Text = "" Then
|
||||
TB.Attributes.Add("Border", "2px solid red")
|
||||
Else
|
||||
TB.Attributes.Add("Border", "None")
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user