<commit_before><?xml version="1.0" encoding="UTF-8"?>
<dynaForm name="link" type="xmlform" width="100%" labelWidth="400px" enableTemplate="1">
  <PME_A type="hidden"/>
  <PME_TYPE type="hidden"/>
  <PME_TITLE type="title" enableHTML="1">
    <en>Properties</en>
  </PME_TITLE>
  <PME_XMLNODE_NAME type="text" size="42" maxlength="64" validate="NodeName" dependentFields="PME_VALIDATE_NAME" required="1">
    <en>Field Name</en>
  </PME_XMLNODE_NAME>
  <PME_XMLNODE_NAME_OLD type="hidden"/>
  <PME_VALIDATE_NAME type="hidden" sqlConnection="XMLDB">
    SELECT XMLNODE_NAME, TYPE FROM dynaForm WHERE XMLNODE_NAME = @@PME_XMLNODE_NAME
  </PME_VALIDATE_NAME>

  <PME_LABEL type="text" maxlength="255" size="42">
    <en>Label</en>
  </PME_LABEL>

  <PME_SUBTITLE3 type="title" enableHTML="1">
    <en>Behaviour</en>
  </PME_SUBTITLE3>

  <PME_LINK type="text" maxlength="255" size="42" defaultvalue="">
    <en>Link</en>
  </PME_LINK>

  <PME_TARGET_SEL type="dropdown" defaultValue="_blank">
    <en>Target
      <option name="_blank">Blank</option>
      <option name="_self">Self</option>
      <option name="_parent">Parent</option>
      <option name="_top">Top</option>
      <option name="">Framename</option>
    </en>
  </PME_TARGET_SEL>
  <PME_TARGET type="text" size="22"/>

  <PME_VALUE type="text" maxlength="50" size="42" defaultvalue="">
    <en>Value</en>
  </PME_VALUE>

  <PME_HINT type="textarea" cols="40" rows="3">
    <en>Hint</en>
  </PME_HINT>

  <BTN_CANCEL type="button" onclick="cancel();">
    <en>Cancel</en>
  </BTN_CANCEL>

  <PME_ACCEPT type="button" onclick="fieldsSave( this.form );">
    <en>Save</en>
  </PME_ACCEPT>

  <PME_JS type="javascript"><![CDATA[
  var fieldForm="link";
  var fieldName=getField("PME_XMLNODE_NAME",fieldForm);
  var savedFieldName=fieldName.value;
  var pme_validating;
  fieldName.focus();
  fieldName.select();
  leimnud.event.add(fieldName, 'change', {method:dynaformVerifyFieldName, instance:fieldName, event:true});

  leimnud.event.add(getField('PME_TARGET_SEL'), 'change', setTarget);
  setTarget();
  function setTarget(){ 
    target = getField('PME_TARGET');
    targetSel = getField('PME_TARGET_SEL');
    
    if(targetSel.value == ''){
      target.style.display = 'block';
      if(target.value == '_top' || target.value == '_blank' || target.value == '_parent' || target.value == '_self'){
        target.value = '';
      }
    } else {
      target.value = targetSel.value;
      target.style.display = 'none';
    }
  }

function cancel(){
    currentPopupWindow.remove();
}
  ]]></PME_JS>
</dynaForm>  <commit_msg> A URL validation was added to the field Link<commit_after><?xml version="1.0" encoding="UTF-8"?>
<dynaForm name="link" type="xmlform" width="100%" labelWidth="400px" enableTemplate="1">
  <PME_A type="hidden"/>
  <PME_TYPE type="hidden"/>
  <PME_TITLE type="title" enableHTML="1">
    <en><![CDATA[Properties]]></en>
    <es><![CDATA[Propiedades]]></es>
  </PME_TITLE>
  <PME_XMLNODE_NAME type="text" size="42" maxlength="64" validate="NodeName" dependentFields="PME_VALIDATE_NAME" required="1">
    <en><![CDATA[Field Name]]></en>
    <es><![CDATA[Nombre del campo]]></es>
  </PME_XMLNODE_NAME>
  <PME_XMLNODE_NAME_OLD type="hidden"/>
  <PME_VALIDATE_NAME type="hidden" sqlConnection="XMLDB">
    SELECT XMLNODE_NAME, TYPE FROM dynaForm WHERE XMLNODE_NAME = @@PME_XMLNODE_NAME
  </PME_VALIDATE_NAME>
  <PME_LABEL type="text" maxlength="255" size="42">
    <en><![CDATA[Label]]></en>
    <es><![CDATA[Etiqueta]]></es>
  </PME_LABEL>
  <PME_SUBTITLE3 type="title" enableHTML="1">
    <en><![CDATA[Behaviour]]></en>
    <es><![CDATA[Comportamiento]]></es>
  </PME_SUBTITLE3>
  <PME_LINK type="text" maxlength="255" size="42" defaultvalue="">
    <en><![CDATA[Link]]></en>
    <es><![CDATA[Enlace]]></es>
  </PME_LINK>
  <PME_TARGET_SEL type="dropdown" defaultValue="_blank">
    <en><![CDATA[\n]]><option name="_blank"><![CDATA[Blank]]></option><option name="_self"><![CDATA[Self]]></option><option name="_parent"><![CDATA[Parent]]></option><option name="_top"><![CDATA[Top]]></option><option name=""><![CDATA[Framename]]></option></en>
    <es><![CDATA[Objeto]]><option name="_blank"><![CDATA[Blanco]]></option><option name="_self"><![CDATA[A si mismo]]></option><option name="_parent"><![CDATA[Padres]]></option><option name="_top"><![CDATA[Arriba]]></option><option name=""><![CDATA[Framename]]></option></es>
  </PME_TARGET_SEL>
  <PME_TARGET type="text" size="22"/>
  <PME_VALUE type="text" maxlength="50" size="42" defaultvalue="">
    <en><![CDATA[Value]]></en>
    <es><![CDATA[Valor]]></es>
  </PME_VALUE>
  <PME_HINT type="textarea" cols="40" rows="3">
    <en><![CDATA[Hint]]></en>
    <es><![CDATA[Sugerencia]]></es>
  </PME_HINT>
  <BTN_CANCEL type="button" onclick="cancel();">
    <en><![CDATA[Cancel]]></en>
    <es><![CDATA[Cancelar]]></es>
  </BTN_CANCEL>
  <PME_ACCEPT type="button" onclick="erase(); fieldsSave( this.form );">
    <en><![CDATA[Save]]></en>
    <es><![CDATA[Guardar]]></es>
  </PME_ACCEPT>
  <PME_JS type="javascript"><![CDATA[
 function erase (){
    if(getField('PME_LINK').value=='http://www.processmaker.com'){
      getField('PME_LINK').value='';
      getField('PME_LINK').style.color="#000000";
    }
  }
  if (!(getField('PME_XMLNODE_NAME').value)) {
    getField('PME_LINK').value='http://www.processmaker.com';
    getField('PME_LINK').style.color="#A4A4A4";
  }
  var fieldForm="link";
  var fieldName=getField("PME_XMLNODE_NAME",fieldForm);
  var savedFieldName=fieldName.value;
  var pme_validating;
  fieldName.focus();
  fieldName.select();
  leimnud.event.add(fieldName, 'change', {method:dynaformVerifyFieldName, instance:fieldName, event:true});

  leimnud.event.add(getField('PME_TARGET_SEL'), 'change', setTarget);
  setTarget();
  function setTarget(){ 
    target = getField('PME_TARGET');
    targetSel = getField('PME_TARGET_SEL');
    
    if(targetSel.value == ''){
      target.style.display = 'block';
      if(target.value == '_top' || target.value == '_blank' || target.value == '_parent' || target.value == '_self'){
        target.value = '';
      }
    } else {
      target.value = targetSel.value;
      target.style.display = 'none';
    }
  }

  leimnud.event.add(getField('PME_LINK'), 'focus', function() {
    if(getField('PME_LINK').value=='http://www.processmaker.com'){
    getField('PME_LINK').value='';
    getField('PME_LINK').style.color="#000000";
    }
  });
  leimnud.event.add(getField('PME_LINK'), 'blur', function() {
    var valor_form = new input(getField('PME_LINK'));
    getField('PME_LINK').value=getField('PME_LINK').value.replace(/ /g, '');
    if(getField('PME_LINK').value==''){
      getField('PME_LINK').value='http://www.processmaker.com';
      getField('PME_LINK').style.color="#A4A4A4";
    } else {
        var link = getField('PME_LINK').value.split('.');
        if (link[0]=='www') {
        getField('PME_LINK').value = ('http://'+getField('PME_LINK').value);
        valor_form.passed();
        }else{
          var link1 = getField('PME_LINK').value.split(':');
          if (link1[0]=='javascript') {
            valor_form.passed();
          }
        }
        var link2 = getField('PME_LINK').value.split('.');
        if ((link2[0]=='http://www')&&(link2[1]!='')&&(link2[2])) {
          valor_form.passed();
        } else {
            valor_form.failed();
            alert('Invalid URL');
          }        
      }
  });
function cancel(){
  currentPopupWindow.remove();
}
  ]]></PME_JS>
</dynaForm>

{'fraction_non_alphanumeric': 0.21290751829673984, 'fraction_numerical': 0.013972055888223553, 'mean_word_length': 4.502196193265007, 'pattern_counts': {'":': 0, '<': 187, '<?xml version=': 2, '>': 187, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 4}, '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': '6980691', 'n_tokens_mistral': 2848, 'n_tokens_neox': 2732, 'n_words': 380}