<!---- CUSTOMIZED CONTENT ---->
<td colspan="3" ng-if="theField01.contentType=='fftable4updl2'"  >
  <fftable4updl2Directive style="max-width:350px;" ></fftable4updl2Directive>
</td>


<!---- FIELD LABEL ---->

<!-- Field label in case of insert/update container -->
<td ng-if="theField01.contentType!='fftable4updl2' && 
           (!theField01.fieldDesc.fieldTypeIsRelation ||
            theField01.fieldDesc.fieldTypeIsRelationWithForm ||
            theField01.fieldDesc.fieldTypeIsRelationListOfValue)" 
    ng-show="visible" >
            <label style="font-weight: normal" >{{theField01.fieldDesc.alias}}
            </label>
</td>

<!----  ---->


<!---- SPACE ---->

<!-- Space column between label and field value -->
<!-- original: <td ng-if="theField01.contentType!='fftable4updl2'" style="width:25px;"></td> -->
<td style="width:25px;" ng-if="!theField01.fieldDesc.fieldTypeIsRelation 
           || theField01.fieldDesc.fieldTypeIsRelationListOfValue
           || theField01.fieldDesc.fieldTypeIsRelationWithForm" 
           ng-show="visible" ></td>

<!----  ---->


<!---- FIELD VALUES ---->
  
  
<td ng-if="theField01.contentType!='fftable4updl2'  && 
           (!theField01.fieldDesc.fieldTypeIsRelation ||
            theField01.fieldDesc.fieldTypeIsRelationWithForm ||
            theField01.fieldDesc.fieldTypeIsRelationListOfValue)"
    ng-show="visible"   >

  <!---- Geometry field ---->
  <GeometryFieldDirective ng-if="theField01.fieldDesc.fieldTypeIsGeometry" ng-show="visible">
  </GeometryFieldDirective>

  <!---- Date field ---->
  <div class="form-group" ng-if="theField01.fieldDesc.fieldTypeIsDate" 
  						  ng-class="{'has-error': datepickerForm.date.$invalid}"
  						  ng-show="visible">
      <input type="text" class="form-control" ng-change="valueChanged()"
      		 data-date-format="dd/MM/yyyy" data_autoclose="true" 
      		 ng-disabled="theField01.fieldDesc.readOnly || theField01.mode=='readonly' || stepReadOnly"
      		 ng-model="theField01.objectField.value" name="date" bs-datepicker/>
  </div>
  
  <!---- Text field ----> 
  <input type="text" class="form-control" ng-change="valueChanged()" 
  		 ng-if="theField01.fieldDesc.fieldTypeIsString && !theField01.fieldDesc.fieldTypeIsDomain"
  		 ng-disabled="theField01.fieldDesc.readOnly || theField01.mode=='readonly'  || stepReadOnly"
  		 maxlength="{{maxLength}}"
         ng-model="theField01.objectField.value" ng-model-options="{ debounce: 2000 }" 
         ng-show="visible" />
 
  <!-- text for relation when accessed through a form -->
  <table ng-if="theField01.fieldDesc.fieldTypeIsRelationWithForm" ng-show="visible">
    <tr>
        <td>
             <input type="text" class="form-control" ng-change="valueChanged()" 
                     readonly="readonly"
                    ng-model="theField01.objectField.valueToDisplay" />
        </td>
        <td width="5px">
        </td>
        <td>
             <button ng-click="openForm()"  >
                <img src="img/common/form.png"></img>
             </button>
        </td>
     </tr>
  </table>
 
  <table ng-if="theField01.fieldDesc.fieldTypeIsComment && !fieldTypeIsDomain" ng-show="visible">
      <tr>
          <td>
              <textarea type="text" class="form-control" ng-change="valueChanged()"
                     ng-class="{ 'form-control': !requiredValueIsNull , 'form-control mandatoryField': requiredValueIsNull  }"
                     ng-readonly="theField01.mode=='readonly'  || stepReadOnly" 
                     rows="{{theField01.rows}}"
                     ng-model="theField01.objectField.value" >
              </textarea>
          </td>
          <td>
              <img src="img/common/8px-View-fullscreen.png" title='Grande zone de saisie'
                   ng-show="!hideSmallViewComment" ng-init="hideSmallViewComment=false"
                   ng-click="openCommentInput()" ng-mouseover="hideSmallViewComment=true" /> 
              <img src="img/common/16px-View-fullscreen.png" title='Grande zone de saisie' 
                   ng-show="hideSmallViewComment" 
                   ng-click="openCommentInput()" ng-mouseleave="hideSmallViewComment=false" /> 
          </td>
      </tr>
  </table>
 
   <!-- Numeric field -->
  <input type="text" numbers-only class="form-control" ng-change="valueChanged()" 
  		 ng-if="theField01.fieldDesc.fieldTypeIsNumber && !theField01.fieldDesc.fieldTypeIsDomain"
  		 ng-show="!fieldHasUnit && visible"
  		 ng-readonly="theField01.mode=='readonly' || stepReadOnly"
       ng-model="theField01.objectField.value" />

   <table ng-show="fieldHasUnit && visible">
    <tr>
        <td>
          <input type="text" numbers-only class="form-control" ng-change="valueChanged()" 
             ng-class="{ 'form-control': !requiredValueIsNull , 'form-control mandatoryField': requiredValueIsNull  }"
             ng-readonly="theField01.mode=='readonly' || stepReadOnly" 
             ng-if="theField01.fieldDesc.fieldTypeIsNumber && !fieldTypeIsDomain"
             ng-attr-title="{{theField01.objectField.value+' '+dbUnit}}"
             ng-model="numericValue.value" />         
        </td>
        <td>
          <select ng-if="fieldHasUnit"
                  ng-options="unit.symbol for unit in unitDesc.multiple"
                  ng-attr-title="{{currentUnitFactor.value.tooltip}}"
                  ng-model="currentUnitFactor.value"
                  ng-disabled="theField01.mode=='readonly' || stepReadOnly"
                >
          </select>
        </td>
    </tr>      
  </table>

  <!-- True/false value field -->
  <input type="checkbox" class="form-control" ng-change="valueChanged()" 
         ng-if="theField01.fieldDesc.fieldTypeIsBoolean"
         ng-true-value="'1'" ng-false-value="'0'"
         ng-disabled="theField01.mode=='readonly' || stepReadOnly"
         ng-model="theField01.objectField.value"
         style="display:inline;width:20px;"
         ng-show="visible" />
  
  <ffl2AttachmentDirective ng-if="theField01.fieldDesc.fieldTypeIsSingleAttachment" 
  				my-cardinality="1" my-parent-type="level2" ng-show="visible">
  </ffl2AttachmentDirective>
  
  <ffl2AttachmentDirective ng-if="theField01.fieldDesc.fieldTypeIsMultipleAttachments" 
  				my-cardinality="n" my-parent-type="level2" ng-show="visible">
  </ffl2AttachmentDirective>
  
  <!-- Report field -->
   <ReportFieldDirective ng-if="theField01.fieldDesc.fieldTypeIsReport" ng-show="visible">
  </ReportFieldDirective>

  <!-- Dropdown value list for domains -->
  <select class="select01" 
  		  ng-change="valueChanged()"
          ng-if="theField01.fieldDesc.fieldTypeIsDomain"
          ng-model="theField01.objectField.value"
          ng-disabled="theField01.mode=='readonly' || stepReadOnly"
          ng-options="desc.code as desc.value for desc in theField01.fieldDesc.listOfValues"
          ng-show="visible">
  </select>

  <!-- Send mail field -->
<SendMailFieldDirective ng-if="theField01.fieldDesc.fieldTypeIsSendMail" ng-show="visible"></SendMailFieldDirective>
  
  <!-- List box for 1:n and m:n relations -->
<td ng-if="theField01.fieldDesc.fieldTypeIsRelation 
           && !theField01.fieldDesc.fieldTypeIsRelationListOfValue
           && !theField01.fieldDesc.fieldTypeIsRelationWithForm" 
           ng-show="visible"
        colspan=3>
 <div RelationFormFieldl2Directive>
 <!-- 
  <select class="select01" size={{theField01.lineNumber}}
          ng-change="valueChanged()"
          ng-model="theField01.objectField.value" ng-options="desc.code as desc.value for desc in theField01.fieldDesc.domain">
  </select>
   -->
 </div>
</td>
