<commit_before><#--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->
<#include "customercommon.ftl">

<#if canNotView>
  <@commonMsg type="error-perm">${uiLabelMap.AccountingCardInfoNotBelongToYou}.</@commonMsg>
  <@menu type="button">
    <@menuitem type="link" href=makeOfbizUrl("${donePage}") class="+${styles.action_nav!} ${styles.action_cancel!}" text=uiLabelMap.CommonGoBack />
  </@menu>
<#else>

<#macro menuContent menuArgs={}>
  <@menu args=menuArgs>
    <@menuitem type="link" href=makeOfbizUrl("${donePage}") class="+${styles.action_nav!} ${styles.action_cancel!}" text=uiLabelMap.CommonGoBack />
    <@menuitem type="link" href="javascript:document.editgiftcardform.submit()" class="+${styles.action_run_sys!} ${styles.action_update!}" text=uiLabelMap.CommonSave />
  </@menu>
</#macro>
<#assign sectionTitle>
  <#if !eftAccount??>
    ${uiLabelMap.AccountingAddNewGiftCard}
  <#else>
    <#-- Cato: duplicate: ${uiLabelMap.AccountingEditGiftCard} -->
  </#if>
</#assign>
<@section title=sectionTitle menuContent=menuContent menuLayoutGeneral="bottom">
  <form method="post" action="<@ofbizUrl><#if !giftCard??>createGiftCard?DONE_PAGE=${donePage}<#else>updateGiftCard?DONE_PAGE=${donePage}</#if></@ofbizUrl>" name="editgiftcardform">
    <#if giftCard??>
      <input type="hidden" name="paymentMethodId" value="${paymentMethodId}" />
    </#if>

    <#if giftCardData?has_content && giftCardData.cardNumber?has_content>
      <#assign pcardNumberDisplay = "">
      <#assign pcardNumber = giftCardData.cardNumber!>
      <#if pcardNumber?has_content>
        <#assign psize = pcardNumber?length - 4>
        <#if (0 < psize)>
          <#list 0..(psize-1) as foo>
            <#assign pcardNumberDisplay = pcardNumberDisplay + "*">
          </#list>
          <#assign pcardNumberDisplay = pcardNumberDisplay + pcardNumber[psize .. psize + 3]>
        <#else>
          <#assign pcardNumberDisplay = pcardNumber>
        </#if>
      </#if>
    </#if>
    <@field type="input" label="${uiLabelMap.AccountingCardNumber}" size="20" maxlength="60" name="cardNumber" value=(pcardNumberDisplay!) />
    <@field type="password" label="${uiLabelMap.AccountingPINNumber}" size="10" maxlength="60" name="pinNumber" value=(giftCardData.pinNumber!) />

    <@field type="generic" label="${uiLabelMap.AccountingExpirationDate}">
        <#assign expMonth = "">
        <#assign expYear = "">
        <#if giftCardData?? && giftCardData.expireDate??>
          <#assign expDate = giftCard.expireDate!?string>
          <#if (expDate?? && (expDate?index_of("/") > 0))>
            <#assign expMonth = expDate?substring(0, expDate?index_of("/"))>
            <#assign expYear = expDate?substring(expDate?index_of("/")+1)>
          </#if>
        </#if>
        <@field type="select" inline=true name="expMonth" onChange="javascript:makeExpDate();" tooltip=uiLabelMap.CommonMonth>
          <#if giftCardData?has_content && expMonth?has_content>
            <#assign ccExprMonth = expMonth>
          <#else>
            <#assign ccExprMonth = requestParameters.expMonth!><commit_msg>NoRef missing value crash<commit_after><#--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->
<#include "customercommon.ftl">

<#if canNotView>
  <@commonMsg type="error-perm">${uiLabelMap.AccountingCardInfoNotBelongToYou}.</@commonMsg>
  <@menu type="button">
    <@menuitem type="link" href=makeOfbizUrl("${donePage}") class="+${styles.action_nav!} ${styles.action_cancel!}" text=uiLabelMap.CommonGoBack />
  </@menu>
<#else>

<#macro menuContent menuArgs={}>
  <@menu args=menuArgs>
    <@menuitem type="link" href=makeOfbizUrl("${donePage}") class="+${styles.action_nav!} ${styles.action_cancel!}" text=uiLabelMap.CommonGoBack />
    <@menuitem type="link" href="javascript:document.editgiftcardform.submit()" class="+${styles.action_run_sys!} ${styles.action_update!}" text=uiLabelMap.CommonSave />
  </@menu>
</#macro>
<#assign sectionTitle>
  <#if !eftAccount??>
    ${uiLabelMap.AccountingAddNewGiftCard}
  <#else>
    <#-- Cato: duplicate: ${uiLabelMap.AccountingEditGiftCard} -->
  </#if>
</#assign>
<@section title=sectionTitle menuContent=menuContent menuLayoutGeneral="bottom">
  <form method="post" action="<@ofbizUrl><#if !giftCard??>createGiftCard?DONE_PAGE=${donePage}<#else>updateGiftCard?DONE_PAGE=${donePage}</#if></@ofbizUrl>" name="editgiftcardform">
    <#if giftCard??>
      <input type="hidden" name="paymentMethodId" value="${paymentMethodId}" />
    </#if>

    <#if giftCardData?has_content && giftCardData.cardNumber?has_content>
      <#assign pcardNumberDisplay = "">
      <#assign pcardNumber = giftCardData.cardNumber!>
      <#if pcardNumber?has_content>
        <#assign psize = pcardNumber?length - 4>
        <#if (0 < psize)>
          <#list 0..(psize-1) as foo>
            <#assign pcardNumberDisplay = pcardNumberDisplay + "*">
          </#list>
          <#assign pcardNumberDisplay = pcardNumberDisplay + pcardNumber[psize .. psize + 3]>
        <#else>
          <#assign pcardNumberDisplay = pcardNumber>
        </#if>
      </#if>
    </#if>
    <@field type="input" label="${uiLabelMap.AccountingCardNumber}" size="20" maxlength="60" name="cardNumber" value=(pcardNumberDisplay!) />
    <@field type="password" label="${uiLabelMap.AccountingPINNumber}" size="10" maxlength="60" name="pinNumber" value=((giftCardData.pinNumber)!) />

    <@field type="generic" label="${uiLabelMap.AccountingExpirationDate}">
        <#assign expMonth = "">
        <#assign expYear = "">
        <#if giftCardData?? && giftCardData.expireDate??>
          <#assign expDate = giftCard.expireDate!?string>
          <#if (expDate?? && (expDate?index_of("/") > 0))>
            <#assign expMonth = expDate?substring(0, expDate?index_of("/"))>
            <#assign expYear = expDate?substring(expDate?index_of("/")+1)>
          </#if>
        </#if>
        <@field type="select" inline=true name="expMonth" onChange="javascript:makeExpDate();" tooltip=uiLabelMap.CommonMonth>
          <#if giftCardData?has_content && expMonth?has_content>
            <#assign ccExprMonth = expMonth>
          <#else>
            <#assign ccExprMonth = requestParameters.expMonth!>
{'fraction_non_alphanumeric': 0.15078947368421053, 'fraction_numerical': 0.005263157894736842, 'mean_word_length': 4.322829131652661, 'pattern_counts': {'":': 0, '<': 131, '<?xml version=': 0, '>': 131, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4260333', 'n_tokens_mistral': 2390, 'n_tokens_neox': 2353, 'n_words': 540}