<?php
$IMG = "/IMGS/no-image.jpg";
if(!empty($this->Profile["Avatar"])){
    $IMG = $this->Profile["Avatar"];
}

?>

<table style="width:100% " id="SquickViewProfile_Table" >
    <?php
    $nickname = $this->Profile["NickName"];
    if(empty($this->Profile["NickName"])){
        $nickname = $this->Profile["FirstName"];
    }
    
    ?>
    
    
                    <tr >
                        <td rowspan="10" style="width: 90px; vertical-align: top; border-right: 1px dotted  #ccc">
                            <img  onclick="EditMyPic(this,2,<?=$this->SID?>,1/1)" pid="<?=$this->Profile["UserID"]?>" style="-webkit-user-select: none;width: 200px; height:200px;margin-right: 10px; cursor: pointer" src="<?=$IMG?>" data-placement="top" data-toggle="tooltip" data-original-title="Click To Upload Picture" id="Form-Image"/>
                       </td>
                        <td class="popLabel">First Name</td>
                        <td class="inputLabel"><input type="text" value="<?=$this->Profile["FirstName"]?>" class="form-control col-md-12" id="Form-FirstName" name="data[FirstName]"/></td>
                    </tr>
                    <tr>
                        <td class="popLabel">Last Name</td>
                        <td class="inputLabel"><input type="text" value="<?=$this->Profile["LastName"]?>" class="form-control  col-md-12" id="Form-LastName" name="data[LastName]"/></td>
                    </tr>
                     <tr>
                        <td class="popLabel">Know As</td>
                        <td class="inputLabel"><input type="text" value="<?=$nickname?>"   class="form-control  col-md-12" id="Form-Nickname" name="data[Nickname]"/></td>
                    </tr>
                     <tr>
                        <td class="popLabel">Ethnicity </td>
                        <td class="inputLabel">
                            <select  name="data[Ethnicity]"  class=" form-control select  col-md-12"  id="Form-Ethnicity">
                           <option value="">-- Select Ethnicity --</option>
                                <?php foreach($this->Ethnicity as $Ethnicity){ ?>
                               <option value="<?=$Ethnicity["EthnicityName"]?>"
                                       <?php if($this->Profile["Ethnicity"] ==$Ethnicity["EthnicityName"] ){ echo "Selected"; }?>
                                            ><?=$Ethnicity["EthnicityName"]?></option>
                           <?php } ?>
                           </select>
                        </td>
                    </tr>
                     <tr>
                        <td class="popLabel">Height (cm)</td>
                        <td class="inputLabel"><input type="text" value="<?=$this->Profile["height"]?>"  class="form-control  col-md-12" id="Form-height" name="data[height]" "/></td>
                    </tr>
                     <tr>
                        <td class="popLabel">Weight (kg)</td>
                        <td class="inputLabel"><input type="text" value="<?=$this->Profile["weight"]?>"  class="form-control  col-md-12" id="Form-weight" name="data[weight]"/></td>
                    </tr>
                     <tr>
                       <td class="popLabel">Position</td>
                       <td class="inputLabel">
                           <select  name="squad[Positions]"  class=" form-control select col-md-12" id="Form-Positions">
                                <option value="0">-- Select Position --</option>
                           <?php foreach($this->PositionsList as $Position){ ?>
                               <option value="<?=$Position["PID"]?>" <?php if($this->Squad["Position"] ==$Position["PID"] ){ echo "Selected"; }?> ><?=$Position["Position"]?></option>
                           <?php } ?>
                           </select>
                       </td>
                    </tr>
                    
                    <?php if($this->SquadType <3){?>
                    <tr>
                        <td class="popLabel">Captain</td>
                        <td class="inputLabel"><input type="checkbox" value="1" <?php if($this->Squad["Captain"]==1){ echo "checked ";} ?> class="" id="Form-Captain" name="squad[Captain]"/></td>
                    </tr>
                    <tr>
                        <td class="popLabel">Vice Captain </td>
                        <td class="inputLabel"><input type="checkbox" value="1" <?php if($this->Squad["Vice"]==1){ echo "checked ";} ?> class="" id="Form-Vice" name="squad[Vice]"/></td>
                    </tr>
                    <?php if($this->SquadData["AllowJerseyChange"]==1){?>
                     <tr>
                        <td class="popLabel">Jersey Number</td>
                       <td class="inputLabel"><input type="text" class="form-control  col-md-12" name="squad[Jersey]"  value="<?=$this->Squad["Jersey"]?>"   id="Form-JerseyNumber"/></td>
                    </tr>
                    <?php }} ?>
                </table>