<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <!-- the next meta info is used for some compatibility issue in IE11 -->
    <META http-equiv="X-UA-Compatible" content="IE=9"/>
    <meta sedName="[[name]]" sedPackage="[[packageName]]" sedGVer="[[major]]" sedVer="[[minor]]" sedPatch="[[patch]]"/>
    <title>[[sedTitle]]</title>
	<link href="_forms/jquery/css/bootstrap.min.css" rel="stylesheet"/>
	<link href="_forms/jquery/css/datepicker3.css" rel="stylesheet"/>
    <script type="text/javascript" src="_forms/jquery/js/lib/jquery-1.10.2.js"></script>
    <script type="text/javascript" src="_forms/jquery/js/lib/bootstrap.js"></script>
    <script type="text/javascript" src="_forms/jquery/js/lib/bootstrap-datepicker.js"></script>
    <script type="text/javascript" src="_forms/jquery/js/lib/json2.js"></script>
   	<script type="text/javascript" src="_forms/jquery/js/lib/json2Date.js"></script>
    <script type="text/javascript" src="_forms/jquery/js/src/sed.js"></script>
</head>
<body>
<div id="fullcontent" class="container-fluid" met_sed_root="[[name]]" sedName="[[name]]" sedPackage="[[packageName]]" sedGVer="[[major]]" sedVer="[[minor]]">
	<div class="page-header">
	  <h3><small> [[sedNumber]]-[[sedTitle]]</small></h3>
	</div>
    <div id="sectionsReferences">
       <ul class="SECTION_REF_AREA nav nav-pills nav-justified">
		  <li met_repeat="attributes" role="presentation">
			<a role="tab" data-toggle="tab" href="#[[name]]">[[label]]</a>
		  </li>
		</ul>
    </div>
	<form>
		<div id="content" class="tab-content">
            <div met_repeat="recursive.attributes">
                <!-- SECTION OUTER PREFIX FOR "CHOICE OF ALTERNATIVE EXTENSIONS" -->
                <div met_if = 'isChoice && !isEndEvent && choiceIndex==0' met_choice = "[[parent.fullName]]">
                    <hr/><input met_repeat="choices" type="radio" met_choice_option="[[fullName]]" met_choice_option_input="[[fullName]]" met_label>
                        [[choiceLabel]]
                    <br/></input><hr/>
                </div>
                <!-- SECTION START -->
                <div id="[[name]]" class="tab-pane" met_if='isSection && !isEndEvent' met_section_frame="[[fullName]]" met_mandatory="[[isMandatory]]" met_start_tag>
					<!-- SECTION PREFIX -->
					<div class="bg-primary" met_if = "level == 1" met_section_prefix="[[fullName]]">
						<h2 style="padding:5px">
							<b met_label>[[headingNumber]] [[label]]</b><i met_if="isMandatory">*</i>
						</h2>
					</div>
					<div class="bg-info"  met_if = "level == 2 && !isChoice" met_section_prefix="[[fullName]]">
						<h3 style="padding:5px">
							<b met_label>[[headingNumber]] [[label]]</b><i met_if="isMandatory">*</i>
						</h3>
					</div>
					<div class="bg-info" met_if = "level == 3 && !isChoice" met_section_prefix="[[fullName]]">
						<h4 style="padding:5px">
							<b met_label>[[headingNumber]] [[label]]</b><i met_if="isMandatory">*</i>
						</h4>
					</div>
					<div class="bg-info"  met_if = "level > 3 && !isChoice" met_section_prefix="[[fullName]]">
						<h5 style="padding:5px">
							<b met_label>[[headingNumber]] [[label]]</b><i met_if="isMandatory">*</i>
						</h5>
					</div>
				</div>
                <!-- SECTION CONTENT hideable or cloneable/removable in case of repetitions -->
                <div met_if='isSection && !isEndEvent' met_section="[[fullName]]" met_section_index="0"  met_start_tag />
				
                <div class="container-fluid row" met_if = 'isField' met_field_frame="[[fullName]]" style="margin-bottom:10px">
					<div class="form-group" met_field="[[fullName]]">
						<label class="control-label col-xs-3" for="[[fullName]]" met_label>[[headingNumber]] [[label]]</label>
						<div class="col-xs-9" met_switch="htmlType">
							<input 	met_input class="form-control" met_case="default" sed_visible="true" type="text"  name="[[fullName]]" id="[[fullName]]"  placeholder="Enter [[label]]" value=""  met_mandatory="[[isMandatory]]" />
							<input 	met_input class="form-control datepicker" met_case="date" sed_visible="true" name="[[fullName]]" id="[[fullName]]" met_mandatory="[[isMandatory]]" />
							<input 	met_input class="checkbox" met_case="boolean" sed_visible="true" type="checkbox" name="[[fullName]]" id="[[fullName]]" met_mandatory="[[isMandatory]]">[[booleanLabel]]</input>
							<select met_input class="form-control" met_case="enum" sed_visible="true" type="enum" name="[[fullName]]"  id="[[fullName]]" met_mandatory="[[isMandatory]]">
								<option value=""></option>
								<option met_repeat="enumCodes" value="[[code]]">[[label]]</option>
							</select>
							<script met_if="isMandatory">
								if($('[id="[[fullName]]"]').attr('met_mandatory') === "true") {
									$('[id="[[fullName]]"]').parents('.form-group').find('label').append('*');
								}
							</script>
						</div>
					</div>
				</div>
                <!-- SECTION SUFFIX - included in the content it will be hidden or duplicated -->
                <div class="container-fluid row"  style="margin-bottom:10px" met_if = 'isEndEvent' met_section_suffix="[[fullName]]">
                    <hr met_if = 'isChoice' />
                    <div class="form-group"  met_if = "isRepetition && level > 1" met_repetition_buttons = "[[fullName]]">
					<hr/>
							<div class="col-xs-3">
								<label class="control-label">@ [[headingNumber]].[[label]] </label>
							</div>
                            <div class="col-xs-9">
                                <button class="pull-right" data-section-count="1" met_remove_section="[[fullName]]">Remove</button>
								<button class="pull-right" style="margin-right:10px" data-section-count="1" met_add_section="[[fullName]]">Add</button>
                            </div>
                       <hr/>
                    </div>
                    <div class="form-group" met_if = "isRepetition && level == 1" met_repetition_buttons = "[[fullName]]">
                        <hr/>
                            <div class="col-xs-3">
								<label class="control-label">@ [[headingNumber]].[[label]] </label>
							</div>
                            <div class="col-xs-9">
                                <button class="pull-right" data-section-count="1" met_remove_section="[[fullName]]">Remove</button>
								<button class="pull-right" style="margin-right:10px" data-section-count="1" met_add_section="[[fullName]]">Add</button>
                            </div>
                        <hr/>
                    </div>

                </div>
                <!-- SECTION CONTENT END -->
                <div met_if='isEndEvent' met_end_tag/>
                <!-- SECTION END -->
                <div met_if='isEndEvent' met_end_tag/>

            </div>
        
		</div>
	</form>
</div>
</body>
</html>