Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

Commit

Permalink
chore(ui): add pattern format to all input datepicker
Browse files Browse the repository at this point in the history
  • Loading branch information
maierthomas committed Feb 21, 2018
1 parent 0b24b72 commit 73416a3
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
@@ -1,5 +1,5 @@
<%--
~ Copyright Siemens AG, 2013-2017. Part of the SW360 Portal Project.
~ Copyright Siemens AG, 2013-2018. Part of the SW360 Portal Project.
~
~ SPDX-License-Identifier: EPL-1.0
~
Expand Down Expand Up @@ -183,15 +183,13 @@
}
);
require(['jquery', 'components/includes/vendors/searchVendor', 'modules/confirm', 'modules/autocomplete', /* jquery-plugins */ 'jquery-ui' ], function($, vendorsearch, confirm, autocomplete) {
require(['jquery', 'modules/sw360Validate', 'components/includes/vendors/searchVendor', 'modules/confirm', 'modules/autocomplete', /* jquery-plugins */ 'jquery-ui' ], function($, sw360Validate, vendorsearch, confirm, autocomplete) {
Liferay.on('allPortletsReady', function() {
autocomplete.prepareForMultipleHits('programminglanguages', ${programmingLanguages});
autocomplete.prepareForMultipleHits('op_systems', ${operatingSystemsAutoC});
$('#releaseEditForm').validate({
ignore: [],
invalidHandler: invalidHandlerShowErrorTab
});
sw360Validate.validateWithInvalidHandlerNoIgnore('#releaseEditForm');
$('#formSubmit').click(
function() {
Expand Down
@@ -1,5 +1,5 @@
<%--
~ Copyright Siemens AG, 2015-2017. Part of the SW360 Portal Project.
~ Copyright Siemens AG, 2015-2018. Part of the SW360 Portal Project.
~
~ SPDX-License-Identifier: EPL-1.0
~
Expand Down Expand Up @@ -39,6 +39,7 @@
name="<portlet:namespace/><%=Release._Fields.COTS_DETAILS%><%=COTSDetails._Fields.CLEARING_DEADLINE%>"
type="text"
placeholder="Clearing Deadline YYYY-MM-DD"
pattern="\d{4}-\d{2}-\d{2}"
value="<sw360:out value="${release.cotsDetails.clearingDeadline}"/>"/>
</td>
</tr>
Expand Down
@@ -1,5 +1,5 @@
<%--
~ Copyright Siemens AG, 2013-2017. Part of the SW360 Portal Project.
~ Copyright Siemens AG, 2013-2018. Part of the SW360 Portal Project.
~
~ SPDX-License-Identifier: EPL-1.0
~
Expand Down Expand Up @@ -222,6 +222,7 @@
name="<portlet:namespace/><%=Release._Fields.CLEARING_INFORMATION%><%=ClearingInformation._Fields.PROC_START%>"
type="text"
placeholder="Process Start YYYY-MM-DD"
pattern="\d{4}-\d{2}-\d{2}"
value="<sw360:out value="${release.clearingInformation.procStart}"/>"/>
</td>
<td width="33%">
Expand All @@ -231,6 +232,7 @@
name="<portlet:namespace/><%=Release._Fields.CLEARING_INFORMATION%><%=ClearingInformation._Fields.EVALUATED%>"
type="text"
placeholder="Evaluation Date YYYY-MM-DD"
pattern="\d{4}-\d{2}-\d{2}"
value="<sw360:out value="${release.clearingInformation.evaluated}"/>"/>
</td>
<td></td>
Expand Down
@@ -1,5 +1,5 @@
<%--
~ Copyright Siemens AG, 2013-2017. Part of the SW360 Portal Project.
~ Copyright Siemens AG, 2013-2018. Part of the SW360 Portal Project.
~
~ SPDX-License-Identifier: EPL-1.0
~
Expand Down Expand Up @@ -97,6 +97,7 @@
name="<portlet:namespace/><%=Release._Fields.ECC_INFORMATION%><%=EccInformation._Fields.ASSESSMENT_DATE%>"
type="text"
placeholder="Will be set automatically"
pattern="\d{4}-\d{2}-\d{2}"
readonly
value="<sw360:out value="${release.eccInformation.assessmentDate}"/>"/>
</td>
Expand Down
@@ -1,5 +1,5 @@
<%--
~ Copyright Siemens AG, 2013-2017. Part of the SW360 Portal Project.
~ Copyright Siemens AG, 2013-2018. Part of the SW360 Portal Project.
~
~ SPDX-License-Identifier: EPL-1.0
~
Expand Down Expand Up @@ -79,6 +79,7 @@
<label class="textlabel stackedLabel" for="releaseDate">Release Date</label>
<input id="releaseDate" class="datepicker" name="<portlet:namespace/><%=Release._Fields.RELEASE_DATE%>" type="text"
placeholder="Enter Release Date"
pattern="\d{4}-\d{2}-\d{2}"
value="<sw360:out value="${release.releaseDate}"/>"/>
</td>

Expand Down
@@ -1,5 +1,5 @@
<%--
~ Copyright Siemens AG, 2017. Part of the SW360 Portal Project.
~ Copyright Siemens AG, 2017-2018. Part of the SW360 Portal Project.
~
~ SPDX-License-Identifier: EPL-1.0
~
Expand Down Expand Up @@ -50,7 +50,7 @@
<td width="33%">
<label class="textlabel stackedLabel" for="proj_deadline">Deadline for pre-evaluation</label>
<input class="toplabelledInput datepicker" id="proj_deadline"
name="<portlet:namespace/><%=Project._Fields.PREEVALUATION_DEADLINE%>" type="text"
name="<portlet:namespace/><%=Project._Fields.PREEVALUATION_DEADLINE%>" type="text" pattern="\d{4}-\d{2}-\d{2}"
value="<sw360:out value="${project.preevaluationDeadline}"/>" placeholder="Pre-evaluation date YYYY-MM-DD"/>
</td>
</tr>
Expand All @@ -74,27 +74,27 @@
<td width="33%">
<label class="textlabel stackedLabel" for="proj_systemTestStart">System test begin</label>
<input class="toplabelledInput datepicker" id="proj_systemTestStart"
name="<portlet:namespace/><%=Project._Fields.SYSTEM_TEST_START%>" type="text"
name="<portlet:namespace/><%=Project._Fields.SYSTEM_TEST_START%>" type="text" pattern="\d{4}-\d{2}-\d{2}"
value="<sw360:out value="${project.systemTestStart}"/>" placeholder="System test begin date YYYY-MM-DD"/>
</td>
<td width="33%">
<label class="textlabel stackedLabel" for="proj_systemTestEnd">System test end</label>
<input class="toplabelledInput datepicker" id="proj_systemTestEnd"
name="<portlet:namespace/><%=Project._Fields.SYSTEM_TEST_END%>" type="text"
name="<portlet:namespace/><%=Project._Fields.SYSTEM_TEST_END%>" type="text" pattern="\d{4}-\d{2}-\d{2}"
value="<sw360:out value="${project.systemTestEnd}"/>" placeholder="System test end date YYYY-MM-DD"/>
</td>
</tr>
<tr>
<td width="33%">
<label class="textlabel stackedLabel" for="proj_delivery">Delivery start date</label>
<input class="toplabelledInput datepicker" id="proj_delivery"
name="<portlet:namespace/><%=Project._Fields.DELIVERY_START%>" type="text"
name="<portlet:namespace/><%=Project._Fields.DELIVERY_START%>" type="text" pattern="\d{4}-\d{2}-\d{2}"
value="<sw360:out value="${project.deliveryStart}"/>" placeholder="Delivery start date YYYY-MM-DD"/>
</td>
<td width="33%">
<label class="textlabel stackedLabel" for="proj_phaseout">Phase-out date</label>
<input class="toplabelledInput datepicker" id="proj_phaseout"
name="<portlet:namespace/><%=Project._Fields.PHASE_OUT_SINCE%>" type="text"
name="<portlet:namespace/><%=Project._Fields.PHASE_OUT_SINCE%>" type="text" pattern="\d{4}-\d{2}-\d{2}"
value="<sw360:out value="${project.phaseOutSince}"/>" placeholder="Phase out since YYYY-MM-DD"/>
</td>
<td width="33%">
Expand Down

0 comments on commit 73416a3

Please sign in to comment.