<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jspf/include/taglibs.jsp"%>

    <div class="tab ${requestScope.paymentName} balance textColor4 borderRadius border4" style="text-align: center; padding: 10px 20px;">
    <h3>${requestScope.paymentPayText}</h3>
    <c:if test="${empty requestScope.paymentFormHidden}">
	<form action="" method="GET">
		<input type="hidden" name="action" value="${action}">
		<input type="hidden" name="module" value="${module}">
		<input type="hidden" name="mid" value="${mid}">
		<input type="hidden" name="contractId" value="${contract.id}">
		<input type="hidden" name="operation" value="pay" />
	</c:if>
		<c:if test="${not empty dataMap['customerAddressEnable'] and dataMap['customerAddressEnable']}">
			<c:if test="${not empty dataMap['customerAddressRequired'] and dataMap['customerAddressRequired']}"><c:set var="customerAddressRequiredFunction">checkCustomerAddress( this.form.customerAddress.value, '${dataMap['customerAddressTitle']}' ) &&</c:set></c:if>
			<div>${dataMap['customerAddressTitle']}: <input type="text" name="customerAddress" size="10" maxlength="50" value="${dataMap['customerAddress']}" style="text-align: center;"/></div>
		</c:if>
		<c:if test="${empty requestScope.paymentPaySum}"><c:set var="paymentPaySum" scope="request">Сумма (от <fmt:formatNumber groupingUsed="true" maxFractionDigits="2" minFractionDigits="2" value="${dataMap['sumMin']}" /> до <fmt:formatNumber groupingUsed="true" maxFractionDigits="2" minFractionDigits="2" value="${dataMap['sumMax']}" />): <input type="text" name="sum" size="10" style="text-align: center;" onkeyup="onKeyUpPaymentSum(this);"/></c:set></c:if>
		<c:if test="${empty requestScope.paymentPayButton}"><c:set var="paymentPayButton" scope="request"><button type="submit" onclick="if ( ${customerAddressRequiredFunction} checkPaymentSum( this.form.sum.value, ${dataMap['sumMin']}, ${dataMap['sumMax']}, '${currencyTitleMedium}' ) ) { return doPay( this.form ) } return false;" class="button" style="margin-left: 5px;">Оплатить</button></c:set></c:if>
		<div>${requestScope.paymentPaySumBefore}${requestScope.paymentPaySum}${requestScope.paymentPaySumAfter}${requestScope.paymentPayButton}</div>${requestScope.paymentPayNoteMessage}
    <c:if test="${empty requestScope.paymentFormHidden}"></form></c:if>
	</div>
