<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE panel SYSTEM "http://www.sigames.com/dtds/sios/panel.dtd">

<!-- add manager panel -->
<panel>

  <boolean id="save_current_state" value="true" />

  <!-- When the panel is shown, tell the edit box for the first name to request keyboard focus -->
  <record id="shown_event">
    <flags id="event_id" value="REQF" />
    <flags id="event_target" value="frst" />
  </record>

  <!-- layout  -->
  <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true" inset="0"/>
  <layout class="stick_to_sides_attachment" alignment="vertical" layout_children="true" inset="0" />

  <container id="cymp">
    <layout class="arrange_vertical_attachment" alignment="bottom,extend" offset="0"/>

    <!-- manager profile creation -->
    <container>
      <layout class="arrange_vertical_attachment" alignment="top,extend" gap="5" offset="0"/>
      <layout class="centre_in_parent_attachment" alignment="horizontal" layout_children="true"/>
      <layout class="stick_to_sides_attachment" alignment="horizontal" inset="0"/>

      <!-- titled box -->
      <container class="titled_box" title="Create Your Manager Profile[COMMENT: section title for screen for adding a new user to the game]" width="750">

        <!-- menu bar area -->
        <container id="stba" embed_in_frame="true">
          <layout class="arrange_horizontal_attachment" alignment="right" embed_in_frame="true" gap="0" offset="4"/>
          <layout class="stick_to_sides_attachment" alignment="top" inset="0" layout_children="true" embed_in_frame="true"/>
          <layout class="stick_to_sides_attachment" alignment="top,right" embed_in_frame="true" inset="4"/>
          <layout class="fit_children_attachment" alignment="vertical" embed_in_frame="true"/>
          <layout class="fit_children_attachment" alignment="horizontal,fill" embed_in_frame="true"/>

          <!-- the profile menu -->
          <widget class="embedded_popup_button" id="prof" text="Use Existing Profile[COMMENT; add manager profile; option to use a profile which already exists]" auto_size="all" fixed="true" embed_in_frame="true"/>
        </container>

        <!-- layouts -->
        <layout class="fit_children_attachment" alignment="vertical, fill" offset="0"/>
        <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true" inset="0"/>
        <layout class="arrange_vertical_attachment" alignment="top" offset="0"/>

        <!-- box containing personal details form -->
        <container class="subsection_box" title="Personal Details[COMMENT: add manager screen; panel title]">

          <!-- layouts -->
          <layout class="fit_children_attachment" alignment="vertical, fill" offset="0"/>
          <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true" inset="0"/>
          <layout class="arrange_vertical_attachment" alignment="top" offset="0"/>

          <!-- buttons area -->
          <container id="btna" embed_in_frame="true">

            <layout class="arrange_horizontal_attachment" alignment="right" embed_in_frame="true" gap="0" offset="6"/>
            <layout class="stick_to_sides_attachment" alignment="top" inset="0" layout_children="true" embed_in_frame="true"/>
            <layout class="stick_to_sides_attachment" alignment="top,right" embed_in_frame="true" inset="4"/>

            <layout class="fit_children_attachment" alignment="vertical" embed_in_frame="true"/>
            <layout class="fit_children_attachment" alignment="horizontal,fill" embed_in_frame="true"/>

            <!--text informing the user what the asterisk means-->
            <widget class="label" embed_in_frame="true" auto_size="horizontal" text="All items with a * must be filled in[COMMENT:indicator to the user that the coloured asterisk indicates that the user must fill in this field]" size="8" colour="add manager must fill" />


          </container>

          <!-- manager picture container -->
          <container>
            <layout class="fit_children_attachment" alignment="vertical, fill" offset="0"/>
            <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true" inset="0"/>
            <layout class="arrange_vertical_attachment" alignment="top" offset="0"/>

            <widget class="picture" id="mngp" file="pictures/person/none/portrait" scale_picture="true" keep_aspect_ratio="true" height="80" width="80" image_alignment="centre">
              <layout class="stick_to_sides_attachment" alignment="bottom" inset="0"/>
              <layout class="centre_in_parent_attachment" alignment="all"/>
            </widget>
          </container>

          <!-- details table -->
          <widget class="table" layout="-4,12,-1,-1,-1,-1,-1,-1, 200" auto_size="vertical" row_height="36">
            <flags id="mode" value="fill_rows, stripe_rows"/>
            <boolean id="auto_size_rows" value="false"/>

            <list id="column_display_properties">
              <record indx="0" left="15" sort_disabled="true" alignment="centre_y"/>
              <record indx="1" left="2" sort_disabled="true" alignment="centre_y"/>
              <record indx="2" left="5" sort_disabled="true" alignment="centre_y"/>
              <record indx="3" left="10" sort_disabled="true" alignment="centre_y"/>
              <record indx="4" left="5" sort_disabled="true" alignment="centre_y"/>
              <record indx="5" left="5" sort_disabled="true" alignment="centre_y"/>
              <record indx="6" left="5" sort_disabled="true" alignment="centre_y"/>
              <record indx="7" left="20" sort_disabled="true" alignment="centre_y"/>
              <record indx="8" left="15" sort_disabled="true"/>
            </list>

            <!-- Name -->
            <widget class="label" text="Name[COMMENT: add manager panel; name label]" alignment="right, centre_y" col="0" row="0" style="semi_bold"/>

            <widget class="edit_box" id="frst" col="2" row="0" edit_event="frst" alignment="left, centre_y" size="9" column_span="3">
              <layout class="max_length_attachment" length="25"/>
              <record id="changed_event">
                <flags id="event_id" value="ChNa"/>
              </record>
            </widget>

            <widget class="edit_box" id="last" col="5" row="0" edit_event="last" alignment="left, centre_y" size="9" column_span="3">
              <layout class="max_length_attachment" length="25"/>
              <boolean id="select_on_focus" value="true"/>
              <record id="changed_event">
                <flags id="event_id" value="ChNa"/>
              </record>
            </widget>
            <widget class="label" text="*" hint="All items with a * must be filled in[COMMENT:indicator to the user that the coloured asterisk indicates that the user must fill in this field]"  col="1" row="0" alignment="left,centre_y" size="10" colour="add manager must fill"/>


            <!-- gender -->
            <widget class="label" text="Gender[COMMENT: add_manager_panel; select gender; define manager's sex]" col="0" row="1" alignment="right, centre_y" style="semi_bold"/>
            <widget class="radio_button" id="genm" group="0" col="2" row="1" column_span="2" selected="true" text="Male[COMMENT: add_manager_panel; choosing your manager's gender when starting a new game]" alignment="left,centre_y">
              <record id="click_event">
                <flags id="event_id" value="chge"/>
                <flags id="mgen" value="false"/>
              </record>
            </widget>
            <widget class="radio_button" id="genf" group="0" col="4" row="1" column_span="2" selected="false" text="Female[COMMENT: add_manager_panel; choosing your manager's gender when starting a new game]" alignment="left,centre_y">
              <record id="click_event">
                <flags id="event_id" value="chge"/>
                <flags id="mgen" value="true"/>
              </record>
            </widget>
            <widget class="label" text="*" hint="All items with a * must be filled in[COMMENT:indicator to the user that the coloured asterisk indicates that the user must fill in this field]"  col="1" row="1" alignment="left,centre_y" size="10" colour="add manager must fill"/>

            <!-- DOB -->
            <widget class="label" text="Date Of Birth" col="0" row="2" alignment="right, centre_y" style="semi_bold"/>
            <widget class="popup_button" id="dobd" sele="sdbd" text="88" mode="0x00180000" col="2" row="2" auto_size="vertical">
              <layout class="autosize_attachment"/>
            </widget>
            <widget class="popup_button" id="dobm" sele="sdbm" width="120" mode="0x00180000" col="3" row="2" column_span="3" auto_size="vertical">
              <list id="items">
                <record name="January" id="0"/>
                <record name="February" id="1"/>
                <record name="March" id="2"/>
                <record name="April" id="3"/>
                <record name="May" id="4"/>
                <record name="June" id="5"/>
                <record name="July" id="6"/>
                <record name="August" id="7"/>
                <record name="September" id="8"/>
                <record name="October" id="9"/>
                <record name="November" id="10"/>
                <record name="December" id="11"/>
              </list>
            </widget>
            <widget class="popup_button" id="doby" sele="sdby" text="8888" mode="0x00180000" col="6" row="2" auto_size="vertical">
              <layout class="autosize_attachment"/>
            </widget>
            <widget class="action_button" id="date" click_event="cdob" width="25" alignment="right, centre_y" col="7" row="2" appearance="button/custom/calendar/button"/>
            <widget class="label" text="*" hint="All items with a * must be filled in[COMMENT:indicator to the user that the coloured asterisk indicates that the user must fill in this field]"  col="1" row="2" alignment="left,centre_y" size="10" colour="add manager must fill"/>

            <!-- nationalities -->
            <widget class="label" text="Nationality" col="0" row="3" alignment="right, centre_y" style="semi_bold"/>
            <widget class="popup_button" id="natn" sele="natn" col="2" row="3" column_span="6" auto_size="vertical"/>
            <!-- <widget class="action_button" text="Add" col="5" row="3" alignment="centre_x, centre_y" column_span="2"/> Needs hooking up -->
            <widget class="label" text="*" hint="All items with a * must be filled in[COMMENT:indicator to the user that the coloured asterisk indicates that the user must fill in this field]" col="1" row="3" alignment="left,centre_y" size="10" colour="add manager must fill"/>

            <!-- favorite team -->
            <widget class="label" text="Favourite Team" col="0" row="4" alignment="right, centre_y" style="semi_bold" alpha="215"/>
            <widget class="popup_button" id="favo" text="Select a Team[COMMENT: add manager panel; option for the user to select a team from a list]" col="2" row="4" column_span="6" auto_size="vertical"/>
            <widget class="text" text="Pick the team you support[COMMENT: add manager panel; user picks the team they support]" col="8" row="4" alignment="left,centre_y" size="7"/>

            <!-- pick manager picure -->
            <widget class="label" text="Manager Picture[COMMENT: add_manager_panel; select manager picture]" col="0" row="5" alignment="right, centre_y" style="semi_bold"/>
            <widget class="icon_button" id="slpc" alignment="left, centre_y" text="Select Picture[COMMENT: Add Manager Wizard - Button that lets the manager select a picture of himself for his ingame manager profile.]" icon="icons/actions/select picture" fixed="true" col="2" row="5" column_span="4" auto_size="vertical">
              <event id="click_event" event_id="sepi" event_target="sepi"/>
              </widget>
            <widget class="action_button" id="clpc" alignment="centre_x, centre_y" text="Remove[COMMENT: Add Manager Wizard - Button that lets the manager select a picture of himself for his ingame manager profile.]" fixed="true" col="6" row="5" column_span="2" disabled="true" auto_size="vertical">
              <event id="click_event" event_id="clpc" event_target="clpc"/>

              <attachment class="event_relay_attachment" event_id="clpc">
                <record id="action_event">
                  <flags id="event_id" value="disable"/>
                  <flags id="event_target" value="clpc"/>
                </record>
              </attachment>
            </widget>
            <widget class="text" text="Select a picture to be used on your profile[COMMENT: add manager panel, option asking the user to select a picture for their profile]" col="8" row="5" alignment="left,centre_y" size="7"/>

            <!-- secondary nationality -->
            <widget class="label" text="Secondary Nationality" col="0" row="6" alignment="right, centre_y" style="semi_bold"/>
            <widget class="popup_button" id="2nat" sele="2nat" col="2" row="6" column_span="6" auto_size="vertical"/>
            <widget class="text" text="You may select a second nationality[COMMENT: add manager panel; text to indicate to the user that they are able to select a second nationality]" col="8" row="6" alignment="left,centre_y" size="7"/>

            <!-- password -->
            <widget class="label" text="Password" col="0" row="7" alignment="right,centre_y" style="semi_bold"/>
            <widget class="edit_box" id="pass" col="2" row="7" hide_text="true" edit_event="pass" column_span="2"/>
            <widget class="label" text="Verify[COMMENT: add manager panel; label to re-type your password in order to verify it]" col="4" row="7" alignment="right,centre_y" style="semi_bold" column_span="1"/>
            <widget class="edit_box" id="veri" col="6" row="7" hide_text="true" edit_event="veri" column_span="2"/>
            <widget class="text" text="Set a password to protect your save game[COMMENT: add manager panel, option asking the user to set a password for their saved game]" col="8" row="7" alignment="left,centre_y" size="7"/>

            <!-- past experience -->
            <widget class="label" text="Past Experience[COMMENT: add_manager_panel; select starting reputation; define past football experience]" col="0" row="8" alignment="right, centre_y" style="semi_bold"/>
            <widget class="popup_button" id="srep" sele="srep" col="2" row="8" column_span="6" auto_size="vertical"/>
            <widget class="text" text="Your past experience affects your in-game reputation[COMMENT: add manager panel; text to inform the user of the purpose of the past experience feature]" col="8" row="8" alignment="left,centre_y" size="7"/>

            <!-- name order (e.g. address me as Lee Dong-Gook or Dong-Gook Lee)-->
            <widget class="check_box" id="abfn" col="2" row="9" column_span="6" alignment="left,centre_y" size="7"/>
            <widget class="label" id="admL" col="0" row="9" alignment="right, centre_y" style="semi_bold"/>
            <widget class="popup_button" id="adma" sele="adma" col="2" row="9" column_span="6" auto_size="vertical"/>
            <widget class="text" id="admH" col="8" row="9" alignment="left,centre_y" size="7"/>

            <!-- Log In Twitter -->
            <widget class="label" text="Social Networks" col="0" row="10" alignment="right,centre_y" style="semi_bold"/>
            <widget class="action_button" id="twit" alignment="centre_x, centre_y" text="Twitter Login[COMMENT: Add Manager Wizard - Button that lets the manager log in to Twitter.]" fixed="true" col="2" row="10" column_span="3" auto_size="vertical">
              <event id="click_event" event_id="twit" event_target="twit"/>
            </widget>

            <!-- Log In YouTube -->
            <widget class="action_button" id="yout" alignment="centre_x, centre_y" text="YouTube Login[COMMENT: Add Manager Wizard - Button that lets the manager log in to YouTube.]" fixed="true" col="5" row="10" column_span="3" auto_size="vertical">
              <event id="click_event" event_id="yout" event_target="yout"/>
            </widget>

           <widget class="text" text="Log into your social networking accounts[COMMENT: add manager panel, option asking the user to log into Twitter and YouTube]" col="8" row="10" alignment="left,centre_y" size="7"/>          
          </widget>
        </container>
      </container>
    </container>

    <!-- next step button -->
    <container width="750" class="plain_box">
      <layout class="fit_children_attachment" alignment="vertical"/>
      <layout class="arrange_horizontal_attachment" alignment="right" offset="0" gap="5"/>
      <layout class="centre_in_parent_attachment" alignment="horizontal"/>

      <!-- cancel -->
      <widget kind="action_button" id="canc" text="Cancel" auto_size="all">
        <layout class="stick_to_sides_attachment" alignment="top"/>
        <record id="click_event">
          <flags id="event_id" value="canc" />
          <flags id="event_target" value="Gadm"/>
        </record>
      </widget>

      <widget class="icon_button_blue" id="nxst" text="Next - Select Team To Manage [COMMENT - add manager panel - drop-down menu containing the leagues from which you can select a team]" appearance="button/custom/forward/forward" icon="icons/actions/confirm" auto_size="all" click_event="nxst">
        <layout class="stick_to_sides_attachment" alignment="top"/>

        <!-- show team selections panel exclusively -->
        <attachment class="event_relay_attachment" event_id="nxst">
          <record id="action_event">
            <flags id="event_id" value="shwx"/>
            <flags id="event_target" value="sltm"/>
          </record>
        </attachment>

      </widget>
    </container>
  </container>

  <container id="sltm" hidden="true">
    <layout class="arrange_vertical_attachment" alignment="bottom,extend" offset="0"/>

    <!-- team selection -->
    <container>
      <layout class="arrange_vertical_attachment" alignment="top,extend" gap="5" offset="0"/>
      <layout class="centre_in_parent_attachment" alignment="horizontal" layout_children="true"/>
      <layout class="stick_to_sides_attachment" alignment="horizontal" inset="0"/>

      <!-- titled box containing teams -->
      <container class="titled_box" id="stcn" title="Select Team To Manage[COMMENT: add manager screen; panel title]" width="750">

        <!-- menu bar area -->
        <container id="stba" embed_in_frame="true">
          <layout class="arrange_horizontal_attachment" alignment="right" embed_in_frame="true" gap="0" offset="0"/>
          <layout class="stick_to_sides_attachment" alignment="top" inset="3" layout_children="true" embed_in_frame="true"/>
          <layout class="stick_to_sides_attachment" alignment="top" embed_in_frame="true" inset="4"/>
          <layout class="stick_to_sides_attachment" alignment="right" embed_in_frame="true" inset="10"/>
          <layout class="fit_children_attachment" alignment="vertical" embed_in_frame="true"/>
          <layout class="fit_children_attachment" alignment="horizontal,fill" embed_in_frame="true"/>

          <!-- start unemployed checkbox -->
          <widget class="check_box" id="unem" text="Start Unemployed[COMMENT - add manager panel - start unemployed string]" click_event="unem" auto_size="all" embed_in_frame="true"/>
        </container>

        <!-- group box containing 3 panels arranged vertically -->
        <container class="group_box">
          <layout class="arrange_vertical_attachment" alignment="top" layout="90,-1" offset="0" gap="5"/>
          <layout class="stick_to_sides_attachment" alignment="horizontal" layout_children="true" inset="0" />
          <layout class="stick_to_sides_attachment" alignment="all" inset="0" />

          <!-- box for selecting league or random team -->
          <container class="subsection_box" title="Pick a League[COMMENT: add manager profile; label for picking the league the user wants to manage in]">
            <layout class="stick_to_sides_attachment" alignment="vertical" layout_children="true" inset="0"/>
            <layout class="arrange_horizontal_attachment" alignment="left" offset="0"/>

            <!-- select league button -->
            <widget class="popup_button" id="tmvw" text="Select The League You Want To Play In[COMMENT - add manager panel - drop-down menu containing the leagues from which you can select a team]" select_event="chtv" auto_tick_exclusive="true" auto_size="vertical" width="300" fixed="false">
              <layout class="stick_to_sides_attachment" alignment="top" inset="2" />
            </widget>

            <!-- random button -->
            <widget class="action_button" id="rand" text="Pick a League and Club for Me[COMMENT - add manager panel - computer chooses random team string]" click_event="rant" auto_size="all">
              <layout class="stick_to_sides_attachment" alignment="top" inset="3" />
              <layout class="stick_to_sides_attachment" alignment="right" inset="0" />
            </widget>
          </container>

          <!-- box for selecting team -->
          <container class="subsection_box" title="Pick a Team[COMMENT: add manager profile; label for picking the team the user wants to manage]">
            <layout class="stick_to_sides_attachment" alignment="vertical, fill" layout_children="true" inset="0" />
            <layout class="arrange_vertical_attachment" alignment="top" offset="0"/>
            <layout class="arrange_horizontal_attachment" alignment="left" layout="-1,-2" offset="0" gap="10"/>


            <!-- select team table -->
            <widget class="table" id="tems" layout="-1" select_event="sltm" save_current_state="true" dont_restore_selection="true">
              <boolean id="auto_size_rows" value="true"/>
              <flags id="heading_class" value="column_heading_alternative"/>
              <flags id="row_spacing" value="0"/>
              <flags id="mode" value="fill_rows, stripe_rows,show_bullets,select_rows"/>

              <list id="column_display_properties">
                <record indx="0" sort_disabled="true" />
              </list>
            </widget>

            <!-- team information panel (use a cutdown xml file for this) -->
            <widget class="team_information_panel" id="tmif" file="add manager team information"/>
          </container>

        </container>
      </container>
    </container>

    <!-- bottom area for buttons -->
    <container width="750" class="plain_box">
      <layout class="fit_children_attachment" alignment="vertical"/>
      <layout class="centre_in_parent_attachment" alignment="horizontal" offset="0" />

      <container>
        <layout class="fit_children_attachment" alignment="vertical"/>
        <layout class="arrange_horizontal_platform_attachment" alignment="right" offset="0" gap="5"/>
        <layout class="stick_to_sides_attachment" alignment="top, right" inset="0"/>
        <layout class="fit_children_attachment" alignment="horizontal,fill" offset="0" gap="5"/>

        <!-- confirm -->
        <widget kind="icon_button_blue" id="addm" text="Confirm" auto_size="all" icon="icons/actions/confirm">
          <layout class="stick_to_sides_attachment" alignment="top"/>
          <record id="click_event">
            <flags id="event_id" value="addm" />
            <flags id="event_target" value="Gadm"/>
          </record>
        </widget>

        <!-- cancel -->
        <widget kind="action_button" id="canc" text="Cancel" auto_size="all">
          <layout class="stick_to_sides_attachment" alignment="top"/>
          <record id="click_event">
            <flags id="event_id" value="canc" />
            <flags id="event_target" value="Gadm"/>
          </record>
        </widget>
      </container>

      <!-- previous step button -->
      <widget class="icon_button_blue" id="nxst" text="Back - Personal Details[COMMENT - add manager panel - button to return to manager profile creation panel]" appearance="button/custom/back/back" auto_size="all" click_event="prst">
        <layout class="stick_to_sides_attachment" alignment="top"/>
        <layout class="stick_to_sides_attachment" alignment="left"/>

        <!-- show manager profile creation panel -->
        <attachment class="event_relay_attachment" event_id="prst">
          <record id="action_event">
            <flags id="event_id" value="show"/>
            <flags id="event_target" value="cymp"/>
          </record>
        </attachment>

        <!-- hide team selection panel -->
        <attachment class="event_relay_attachment" event_id="prst">
          <record id="action_event">
            <flags id="event_id" value="hide"/>
            <flags id="event_target" value="sltm"/>
          </record>
        </attachment>
      </widget>

    </container>

  </container>

</panel>
