<style>
    .form-horizontal .form-group {
        margin-left: 0 !important;
        padding:5px;
    }
    .form-group  .control-label {
        color: #000 !important;
        opacity: 1 !important;
        margin-right: -18px;
    }
    .select-meduim{
        padding-left: 10px;
        width: 50%;
    }
    .border-line{
        border-left: 2px solid #eee;
    }
    #WizardModal .form-group{
        border:0;
    }
    .star{
        float: right;
        margin-top: -28px;
        margin-right: 10px;
        color: red;
        font-size: 18px;
    }
</style>
<?php if($CanMakeMoreOrg == false) { ?>
<div class="modal fade bs-example-modal-md" data-backdrop="static" id="WizardModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-md">
        <div class="modal-content">
            <div class="modal-header text-left">
                 <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="pg-close fs-20"></i>
                </button>
                <h5 class="modal-title bold"><?php print CommonLanguage::getMessage('add_organization'); ?></h5>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-12 ">
                        <div class="col-md-12" style="margin-top: 20px;text-align: center">
                            <p style=";display: block;" class="alert alert-danger"><?php print CommonLanguage::getMessage('one_organization');?></p>
                            <p><?php print CommonLanguage::getMessage('please_contact');?> <a href="http://trustotech.com/" target="_blank" style="color:#e19421">Trusto Tech</a> <?php print CommonLanguage::getMessage('for_assistance');?></p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
            </div>
        </div>
    </div>
</div>


<?php }else{ ?>
<div class="modal fade stick-up"  data-backdrop="static" id="WizardModal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog ">
        <div class="modal-content">
            <div class="modal-header clearfix text-left">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true" id="CloseModal"><i class="pg-close fs-14"></i></button>
                <h5><?php print CommonLanguage::getMessage('organization_settings');?></h5>
                <div id="WizardValidationAlertDiv"></div>
            </div>
            <div class="modal-body">
                <div class="container-fluid ">
                    <div id="rootwizard" class="m-t-50">
                        <ul class="nav nav-tabs nav-tabs-linetriangle nav-tabs-separator nav-stack-sm">
                            <li class="active">
                                <a data-toggle="tab" href="#tab1"><i class="fa fa-shopping-cart tab-icon"></i> <span><?php print CommonLanguage::getMessage('org_name');?></span></a>
                            </li>
                            <li class="">
                                <a data-toggle="tab" href="#tab2"><i class="fa fa-truck tab-icon"></i> <span><?php print CommonLanguage::getMessage('contact_details');?></span></a>
                            </li>
                            <li class="">
                                <a data-toggle="tab" href="#tab3"><i class="fa fa-credit-card tab-icon"></i> <span> <?php print CommonLanguage::getMessage('financial_settings');?></span></a>
                            </li>
                            <li class="">
                                <a data-toggle="tab" href="#tab4"><i class="fa fa-check tab-icon"></i> <span><?php print CommonLanguage::getMessage('hierarchy');?></span></a>
                            </li>
                            <li class="">
                                <a data-toggle="tab" href="#tab5"><i class="fa fa-link tab-icon"></i> <span><?php print CommonLanguage::getMessage('social_links');?></span></a>
                            </li>
                        </ul>
                        <form  id="WizardModalForm" class="form-horizontal"  role="form" autocomplete="off" onsubmit="return false">
                            <input type="hidden" name="Organization_Business_Line" value="1"/>
                            <input type="hidden" name="Organization_Email" value="1"/>
                            <div class="tab-content">
                                <div class="tab-pane padding-20 active slide-left" id="tab1">
                                    <div class="row">
                                        <div class="col-lg-5 col-md-5 col-xs-5 b-grey ">
                                            <div class="form-group required">
                                                <label for="fname" class="col-sm-5 control-label"><?php print CommonLanguage::getMessage('display_name');?></label>
                                                <div class="col-sm-7">
                                                    <input type="text" class="form-control"  placeholder="<?php print CommonLanguage::getMessage('display_name');?>" name="Organization_Name" id="Organization_Name" required="" aria-required="true">
                                                    <span class="star">*</span>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="fname" class="col-sm-5 control-label"><?php print CommonLanguage::getMessage('legal_name');?></label>
                                                <div class="col-sm-7">
                                                    <input type="text" class="form-control "  placeholder="<?php print CommonLanguage::getMessage('legal_name');?>" name="Organization_Legal_Name" id="Organization_Legal_Name" required="" aria-required="true">
                                                    <span class="star">*</span>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="fname" class="col-sm-5 control-label"><?php print CommonLanguage::getMessage('commercial_registry');?></label>
                                                <div class="col-sm-7">
                                                    <input type="text" class="form-control"  placeholder="<?php print CommonLanguage::getMessage('commercial_registry');?>" id="Organization_Commercial_Registry" name="Organization_Commercial_Registry" required="" aria-required="true">
                                                    <span class="star">*</span>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="fname" class="col-sm-5 control-label"><?php print CommonLanguage::getMessage('local_currency');?></label>
                                                <div class="col-sm-7">

                                                    <?php echo Forms::CurrencyDropDown(1,'complete')?>
                                                    <!--                                                    <input type="text" class="form-control"  placeholder="Local Currency" id="Local_Currency" name="Local_Currency" required="" aria-required="true">-->
                                                    <span class="star">*</span>
                                                </div>
                                            </div>

                                        </div>
                                        <div class="col-lg-7 col-md-7 col-m-xs-7">
                                            <div class="col-lg-12 col-md-12 col-xs-12">
                                                <div class="form-group row">
                                                    <label for="fname" class="col-sm-3 control-label"><?php print CommonLanguage::getMessage('Email');?></label>
                                                    <div class="col-sm-8">
                                                        <input type="text" class="form-control"  placeholder="<?php print CommonLanguage::getMessage('Email');?>" name="Organization_Email" id="Organization_Email" required="" aria-required="true">
                                                        <span class="star">*</span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-lg-12 col-md-12 col-xs-12">
                                                <div class="form-group row">
                                                    <label for="fname" class="col-sm-3 control-label"><?php print CommonLanguage::getMessage('org_type');?></label>
                                                    <div class="col-sm-8">
                                                        <select class="full-width   select-meduim" data-init-plugin="select2" name="Organization_Type_ID" id="Organization_Type_ID">
                                                            <?php foreach ($TypeOrg as $Type):?>
                                                            <option value="<?php echo $Type['Organization_Type_ID']; ?>"><?php echo $Type['Organization_Type_Name']; ?></option>
                                                            <?php endforeach; ?>
                                                        </select>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-lg-12 col-md-12 col-xs-12">


                                                <div class="form-group row">
                                                    <label for="fname" class="col-sm-3 control-label"><?php print CommonLanguage::getMessage('legal_entity');?></label>
                                                    <div class="form-group col-sm-8">
                                                        <select class="full-width select-meduim" data-init-plugin="select2" name="Organization_Legal_Entity_ID" id="Organization_Legal_Entity_ID">
                                                            <?php foreach ($EntityOrg as $Entity):?>
                                                            <option value="<?php echo $Entity['Organization_Legal_Entity_ID']; ?>"><?php echo $Entity['Organization_Legal_Entity_Name']; ?></option>
                                                            <?php endforeach; ?>
                                                        </select>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-lg-12 col-md-12 col-xs-12">
                                                <div class="form-group row">
                                                    <label for="fname" class="col-sm-3 control-label"><?php print CommonLanguage::getMessage('vat_type');?></label>
                                                    <div class="form-group col-sm-4">
                                                        <select class="full-width select-meduim" data-init-plugin="select2" name="VAT_Type_ID" id="VAT_Type_ID">
                                                            <?php foreach ($vattypes as $type):?>
                                                            <option value="<?php echo $type['VAT_Type_ID']; ?>"><?php echo $type['VAT_Type_Name']; ?></option>
                                                            <?php endforeach; ?>
                                                        </select>
                                                    </div>
                                                </div>

                                                <label for="fname" class="col-sm-3 control-label"><?php print CommonLanguage::getMessage('accounts_for_employees');?></label>
                                                <div class="form-group col-sm-2">
                                                    <input type="checkbox"  id="Set_Employee_Account" name="Set_Employee_Account"/>
                                                </div>
                                            </div>
                                            <!--                                             <div class="form-group row">-->

                                            <!--                                            </div>-->
                                        </div>
                                    </div>

                                </div>
                                <div class="tab-pane slide-left padding-20" id="tab2">
                                    <div class="row row-same-height">
                                        <div class="col-md-5 b-grey sm-b-b">
                                            <div class="form-group">
                                                <label for="fname" class="col-sm-4 control-label"><?php print CommonLanguage::getMessage('fax');?></label>
                                                <div class="col-sm-8">
                                                    <input type="text" class="form-control"  placeholder="<?php print CommonLanguage::getMessage('fax');?>" name="Organization_Fax" id="Organization_Fax" >
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="fname" class="col-sm-4 control-label"><?php print CommonLanguage::getMessage('Phone');?></label>
                                                <div class="col-sm-8">
                                                    <input type="text" class="form-control"  placeholder="<?php print CommonLanguage::getMessage('Phone');?>" name="Organization_Phone" id="Organization_Phone" required="" aria-required="true">
                                                    <span class="star">*</span>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="fname" class="col-sm-4 control-label"><?php print CommonLanguage::getMessage('line_of_business');?></label>
                                                <div class="col-sm-8">
                                                    <input type="text" class="form-control"  placeholder="<?php print CommonLanguage::getMessage('line_of_business');?>" name="Organization_Business_Line" id="Organization_Business_Line" required="" aria-required="true">
                                                    <span class="star">*</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-7">
                                            <div class="form-group row">
                                                <label for="fname" class="col-sm-4 control-label"><?php print CommonLanguage::getMessage('street_address');?></label>
                                                <div class="col-sm-8">
                                                    <input type="text" class="form-control"  placeholder="<?php print CommonLanguage::getMessage('street_address');?>" name="Organization_Street" id="Organization_Street"  >
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label for="fname" class="col-sm-4 control-label"><?php print CommonLanguage::getMessage('country');?></label>
                                                <div class="form-group col-sm-8">
                                                    <select class="full-width select-meduim" data-init-plugin="select2" name="Organization_Country" connect-with-city="#Organization_City" id="Organization_Country" required>
                                                        <?php foreach ($CountryOrg as $Countries):?>
                                                        <option value="<?php echo $Countries['Country_ID']; ?>"><?php echo $Countries['Country_Name']; ?></option>
                                                        <?php endforeach; ?>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label for="fname" class="col-sm-4 control-label"><?php print CommonLanguage::getMessage('city');?></label>
                                                <div class="form-group col-sm-8">
                                                    <select class="full-width select-meduim" data-init-plugin="select2" name="Organization_City" id="Organization_City" required>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="tab-pane slide-left padding-20" id="tab3">
                                    <div class="row row-same-height">
                                        <div class="col-md-5 ">
                                            <div class="form-group">
                                                <label for="name" class="col-sm-4 control-label"><?php print CommonLanguage::getMessage('bank');?></label>
                                                <div class="input-group  col-sm-8">
                                                    <input id="Bank_Account_ID" name="Bank_Account_ID" class="form-control" disabled  style="color:#4c0870" />
                                                    <span class="input-group-addon complete" data-toggle="modal" data-target="#add_AccountBank"><i class="fa fa-plus-circle"></i></span>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="name" class="col-sm-4 control-label"><?php print CommonLanguage::getMessage('financial_year_end');?></label>
                                                <div class="col-sm-8 input-group">
                                                    <input id="Financial_Year_End" name="Financial_Year_End" class="form-control" value="<?php echo ($today); ?>" />
                                                    <span class="input-group-addon complete"><i class="fa fa-calendar"></i></span>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="name" class="col-sm-4 control-label"><?php print CommonLanguage::getMessage('capital');?></label>
                                                <div class="col-sm-8 input-group">
                                                    <input id="OrganizationSettingsValue3" disabled name="Financial_Capital" class="form-control Capital" placeholder="Financial Capital<?php print CommonLanguage::getMessage('organization_settings');?>" />
                                                    <span class="input-group-addon complete"> <?php print CommonLanguage::getMessage('LL');?></span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-7  border-line " id="Financial">
                                            <div class="form-group Financial">
                                                <span onclick="addinput()" class="fa fa-plus-circle" style="margin-top: 10px;color:#4c0870;float:right; margin-right: 50px;" ></span>
                                                <label for="name" class="col-sm-3 control-label"><?php print CommonLanguage::getMessage('share_holder');?></label>
                                                <div class="col-sm-4 ">
                                                    <input type="text" name="Shareholder_Name" id="Shareholder_Name"  class="holderName form-control " placeholder="<?php print CommonLanguage::getMessage('Name');?>" >

                                                </div>
                                                <div class="col-sm-4 input-group">
                                                    <input type="text" name="Shareholder_Amount" id="Shareholder_Amount"   class="Amount form-control " placeholder="<?php print CommonLanguage::getMessage('amount');?>">
                                                    <span class="input-group-addon complete"> <?php print CommonLanguage::getMessage('LL');?></span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="tab-pane slide-left padding-20" id="tab4">
                                    <div class="form-group Hierarchy ">
                                      
                                        <label for="name" class="col-sm-2 control-label"><?php print CommonLanguage::getMessage('Name');?></label>
                                        <div class="col-sm-3">
                                            <input type="text" class="Person form-control" id="Person_Name"  required name="Person_Name" placeholder="<?php print CommonLanguage::getMessage('Name');?>">
                                            <span class="star">*</span>
                                        </div>
                                          <label for="name" class="col-sm-2 control-label"><?php print CommonLanguage::getMessage('position');?></label>
                                        <div class="col-sm-3">
                                            <input type="text" class=" Position form-control" id="Position_Name" required name="Position_Name" placeholder="<?php print CommonLanguage::getMessage('position');?>">
                                            <span class="star">*</span>
                                        </div>
                                        <span onclick="addField()" class="fa fa-plus-circle" style="margin-top:10px;color:#4c0870" ></span>
                                    </div>
                                </div>
                                <div class="tab-pane slide-left padding-20" id="tab5">
                                    <div class="col-md-6">
                                        <div class="form-group  ">
                                            <label  class="col-sm-2 control-label"><i class="fa fa-facebook-square fa-2x" style="color:#4c0870"></i></label>
                                            <div class="col-sm-10">
                                                <input type="text" class="faceBook form-control" id="Organization_Face_Book"  name="Organization_Face_Book" placeholder="<?php print CommonLanguage::getMessage('facebook');?>">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label  class="col-sm-2 control-label"><i class="fa fa-twitter-square fa-2x" style="color:#4c0870"></i></label>
                                            <div class="col-sm-10">
                                                <input type="text" class="Twitter form-control" id="Organization_Twitter"  name="Organization_Twitter" placeholder="<?php print CommonLanguage::getMessage('twitter');?>">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label  class="col-sm-2 control-label"><i class="fa fa-linkedin-square fa-2x" style="color:#4c0870"></i></label>
                                            <div class="col-sm-10">
                                                <input type="text" class="Linkedin form-control" id="Organization_Linkedin"  name="Organization_Linkedin" placeholder="<?php print CommonLanguage::getMessage('linkedin');?>">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label  class="col-sm-2 control-label"><i class="fa fa-google-plus-square fa-2x" style="color:#ed9421"></i></label>
                                            <div class="col-sm-10">
                                                <input type="text" class="PlusGoogle form-control" id="Organization_Plus_Google"  name="Organization_Plus_Google" placeholder="<?php print CommonLanguage::getMessage('google');?>">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="padding-20 bg-white">
                                        <ul class="pager wizard">
                                            <li class="next">
                                                <button class="btn btn-complete btn-cons btn-animated from-left fa fa-truck pull-right" type="button">
                                                    <span><?php print CommonLanguage::getMessage('next');?></span>
                                                </button>
                                            </li>
                                            <li class="next finish hidden">
                                                <button class="btn btn-complete btn-cons btn-animated from-left fa fa-cog pull-right" id="SubmitOrg" type="submit">
                                                    <span><?php print CommonLanguage::getMessage('Save');?></span>
                                                </button>
                                            </li>
                                            <li class="previous first hidden">
                                                <button class="btn btn-default btn-cons btn-animated from-left fa fa-cog pull-right" type="button">
                                                    <span><?php print CommonLanguage::getMessage('first');?></span>
                                                </button>
                                            </li>
                                            <li class="previous">
                                                <button class="btn btn-default btn-cons pull-right" type="button">
                                                    <span><?php print CommonLanguage::getMessage('previous');?></span>
                                                </button>
                                            </li>
                                        </ul>
                                    </div>
                                </div>

                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php } ?>
<script>
    var Required_Fields = <?php echo json_encode(CommonLanguage::getMessage('Required_Fields'));?>,
        Failed_Submit = <?php echo json_encode(CommonLanguage::getMessage('Failed_Submit'));?>,
            shareholder = <?php echo json_encode(CommonLanguage::getMessage('share_holder'));?>,
                nameLang = <?php echo json_encode(CommonLanguage::getMessage('Name'));?>,
                    LL = <?php echo json_encode(CommonLanguage::getMessage('LL'));?>,
                        positionLang = <?php echo json_encode(CommonLanguage::getMessage('position'));?>,
                            amountLang = <?php echo json_encode(CommonLanguage::getMessage('amount'));?>,
                                Submitted_Successfully = <?php echo json_encode(CommonLanguage::getMessage('Submitted_Successfully'));?>;
                                $(function(){

                                    new Switchery($("#Set_Employee_Account").get(0),{color: $.Pages.getColor("complete")})
                                    $("body").addClass("NoSearch")
                                    $("#Financial_Year_End").datepicker({autoclose:true}).on("changeDate",function(e){
                                        $(this).keyup();
                                    })
                                    var Total=0;
                                    function UpdateTotal(){
                                        Total=0;
                                        $("#Financial").find('.Financial .Amount').each(function(){
                                            Total   += parseFloat($(this).val()) || 0;
                                        })
                                        $("#OrganizationSettingsValue3").val(Total);
                                    }
                                    $("#Financial").on("keyup blur",UpdateTotal);
                                    $("#Financial").on("click",".remove",function(){
                                        var me = $(this);
                                        setTimeout(function(){
                                            UpdateTotal()
                                        },100)
                                    })




                                    $("#SubmitOrg").on("click",function(){
                                        var Data={
                                            Organization_Name                   :$("#Organization_Name").val(),
                                            Organization_Legal_Name             :$("#Organization_Legal_Name").val(),
                                            Organization_Commercial_Registry    :$("#Organization_Commercial_Registry").val(),
                                            Organization_Email                  :$("#Organization_Email").val(),
                                            Organization_Type_ID                :$("#Organization_Type_ID").val(),
                                            Local_Currency                      :$("#CurrencyDropDown button input").val(),
                                            VAT_Type_ID                         :$("#VAT_Type_ID").val(),
                                            Organization_Legal_Entity_ID        :$("#Organization_Legal_Entity_ID").val(),
                                            Organization_Fax                    :$("#Organization_Fax").val(),
                                            Organization_Phone                  :$("#Organization_Phone").val(),
                                            Organization_Business_Line          :$("#Organization_Business_Line").val(),
                                            Organization_Street                 :$("#Organization_Street").val(),
                                            Financial_Year_End                  :$("#Financial_Year_End").val(),
                                            Organization_Country                :$("#Organization_Country").val(),
                                            Organization_City                   :$("#Organization_City").val(),
                                            Bank_Account_ID                     :$("#Bank_Account_ID").val(),
                                            Financial_Capital                   :$("#OrganizationSettingsValue3").val(),
                                            Organization_Face_Book              :$("#Organization_Face_Book").val(),
                                            Organization_Twitter                :$("#Organization_Twitter").val(),
                                            Organization_Linkedin               :$("#Organization_Linkedin").val(),
                                            Organization_Plus_Google            :$("#Organization_Plus_Google").val(),
                                            Set_Employee_Account                :$("#Set_Employee_Account").is(":checked") ? 1 : 0,
                                            /*Shareholder_Name                  :$("#Shareholder_Name").val(),
                Shareholder_Amount                  :$("#Shareholder_Amount").val(),
                Position_Name                       :$("#Position_Name").val(),
                Person_Name                         :$("#Person_Name").val()
                */
                                            Shareholder                         :[],
                                            Position                            :[]
                                        };
                                        $("#Financial > .Financial").each(function(e){
                                            var me = $(this);
                                            if($.trim(me.find(".holderName").val()) != ""){
                                                Data.Shareholder.push({
                                                    Shareholder_Name      :me.find(".holderName").val(),
                                                    Shareholder_Amount    :me.find(".Amount").val(),
                                                })
                                            }
                                        })
                                        $("#tab4 > .Hierarchy").each(function(e){
                                            var me = $(this);
                                            if($.trim(me.find(".Position").val()) != ""){
                                                Data.Position.push({
                                                    Position_Name     :me.find(".Position").val(),
                                                    Person_Name       :me.find(".Person").val()
                                                })
                                            }
                                        })
                                        $("#WizardValidationAlertDiv").attr("class","").html("")
                                        $("#WizardModalForm").validate()
                                        if(!$("#WizardModalForm").find("input").blur().end().valid()){
                                            $("#WizardValidationAlertDiv").attr("class","alert alert-danger").show().html(Required_Fields)
                                            return
                                        }
                                        $.ajax({
                                            url:"ACCAjax/addOrganizationAjax",
                                            method:"POST",
                                            data:Data,
                                            complete:function(v1,v2){
                                                if(v2 == 'success'){
                                                    $("#OrgIsBusy").remove()
                                                    $("#WizardValidationAlertDiv").attr("class","alert alert-success").show().html(Submitted_Successfully)
                                                    setTimeout(function(){
                                                        $("#WizardModal").modal('hide');
                                                        //  document.location.reload();
                                                    },1500)
                                                }else{
                                                    $("#WizardValidationAlertDiv").attr("class","alert alert-danger").show().html(Failed_Submit)
                                                }
                                                $("#OrgIsBusy").remove()
                                            }
                                        });
                                    });
                                });
    function addinput(){
        $("#Financial").append('    <div class="form-group Financial PLusAddedItem">'+
                               '    <span onclick="addinput()" class="fa fa-plus-circle" style="margin-top: 10px;color:#4c0870;float:right; margin-right: 50px;" ></span>'+
                               '   <span  class="fa fa-minus-circle remove" style="margin-top:10px;color:#ed9421;float:right; margin-right: -25px;" ></span>'+
                               '    <label for="name" class="col-sm-3 control-label">'+shareholder+'</label>'+
                               '    <div class="col-sm-4">'+
                               '    <input type="text" name="Shareholder_Name"  class="holderName form-control " placeholder="'+nameLang+'" >'+
                               //'    <span class="star">*</span>'+
                               '    </div>'+
                               '    <div class="col-sm-4 input-group ">'+
                               '    <input type="text" name="Shareholder_Amount"  class="Amount form-control " placeholder="'+amountLang+'" >'+
                               '     <span class="input-group-addon complete"> '+LL+'</span>'+
                               '    </div>'+
                               '    </div>'
                              )
    }
    function addField(){
        $("#tab4").append('    <div class="form-group  Hierarchy PLusAddedItem">'+
                          '    <label for="name" class="col-sm-2 control-label">'+positionLang+'</label>'+
                          '    <div class="col-sm-3">'+
                          '    <input type="text" name="Position_Name"  class="Position form-control" placeholder="'+positionLang+'" ><span class="star">*</span></div>'+
                          '    <label for="name" class="col-sm-2 control-label">'+nameLang+'</label>'+
                          '    <div class="col-sm-3">'+
                          '    <input type="text" name="Person_Name" class="Person form-control" placeholder="'+nameLang+'" ><span class="star">*</span></div>'+
                          '    <span onclick="addField()" class="fa fa-plus-circle" style="margin-top:10px;color:#4c0870" ></span>'+
                          '    <span  class="fa fa-minus-circle remove" style="margin-top:10px;color:#ed9421" ></span>'+
                          '    </div>'
                         )
    }
    $("body").on("click",".remove",function (e) {
        $(this).parent("div").remove();
    });
</script>
