Location: PHPKode > projects > MembersGear > membersgear/templates/admin_location_m.tpl
{$ADMIN_HEADER}
<div id="content" class="setdiv">
    <div id="full-contentdiv">
        <div class="righttop">
            <h2 align="center">
                {if $IsEdit neq ''}
                    Edit {$Location}
                    {assign var="action" value="update"}
                {else}
                    Add New {$Location}
                    {assign var="action" value="insert"}
                {/if}
                
            </h2>
         </div>
         <div class="whole-page clear">
           <form name="frmLocation" id="frmLocation" {if $Location eq 'Country'}action="admin_country_m.php?action={$action}"{elseif $Location eq 'State'}action="admin_country_state_m.php?action={$action}"{/if} method="post">  
              <div class="formformat">
              <center>
              <table border="0" cellpadding="0" cellspacing="0" style="width:500px">
                    <input type="hidden" id="hdnID" name="hdnID" value="{$data[0].id}">
                    <input type="hidden" id="hdnParentID" name="hdnParentID" value="{$data[0].parentid}">
                    <input type="hidden" id="hdnLocationType" name="hdnLocationType" {if $Location eq 'Country'}value="1"{elseif $Location eq 'State'}value="2"{/if}>
                    
                       <tr>
                            <td class="right-side-text"><label>
                                Name <label class="star">*</label></label>
                            </label>
                            </td>
                            <td class="left-side-text">
                                <input type="text" class="txtcss" id="txtName" name="txtName" maxlength="45" value="{$data[0].name}" size="25">
                            </td>
                    </tr>
                    
                    <tr>
                            <td class="right-side-text"><label>
                                Description <label class="star">*</label></label>
                            </label>                            
                            </td>
                            <td class="left-side-text">
                                <textarea id="txtDescription" class="txtareacss" name="txtDescription" rows="2" cols="35">{$data[0].description}</textarea>
                            </td>
                    </tr>
                     
                     <tr>
                            <td class="right-side-text"><label>
                                Status <label class="star">*</label></label> 
                            </label>
                            </td>
                            <td class="left-side-text">
                                <select size="1" class="selectcss" id="ddlStatus" name="ddlStatus">
                                           <option value="" selected>Select</option>
                                           <option value="1" {if $data[0].status eq '1'}selected=""{/if}>Active</option>
                                           <option value="0" {if $data[0].status eq '0'}selected=""{/if}>InActive</option>
                                </select>
                            </td>
                    </tr>
                       
                    <tr>
                         <td/>
                         <td class="buttontd">
                                <input type="submit" class="btncss" name="submit" {if $IsEdit eq 'yes'}value="Save"{else}value="Submit"{/if}>&nbsp;&nbsp;
                                {*<input type="button" class="btncss" name="btnBack" value="Cancel" {if $Location eq 'Country'}onclick="javascript:location.href='admin_country_v.php?{$QueryString}';"{elseif $Location eq 'State'}onclick="javascript:location.href='admin_country_state_v.php?id={$data[0].parentid}&{$QueryString}';"{/if}>*}
                                <input type="button" class="btncss" name="btnBack" value="Cancel" onclick="javascript:history. go(-1)">
                         </td>
                         
                    </tr>
              
              </table>
              </center>
              
           </div>
           </form>
          {if $Location eq 'Country'} 
               <script language="JavaScript" type="text/javascript">
                    //You should create the validator only after the definition of the HTML form
                      var frmvalidator  = new Validator("frmLocation");

                      frmvalidator.EnableMsgsTogether();
                      //frmvalidator.EnableOnPageErrorDisplaySingleBox();
                       
                      frmvalidator.addValidation("txtName","req","Please enter Country name.");
                      frmvalidator.addValidation("txtName","maxlen=60",    "Maximum length for Country name is 60 character.");
                      frmvalidator.addValidation("txtName","alnum_s","Enter alphabetic characters only in Country name.");
                      
                      frmvalidator.addValidation("txtDescription","req","Please enter Country description.");
                      frmvalidator.addValidation("txtDescription","maxlen=150","Max length for theme description is 150 character.");
                      
                      frmvalidator.addValidation("ddlStatus","dontselect=''","Please select Country status.");
                      
               </script>
          {elseif $Location eq 'State'}
               <script language="JavaScript" type="text/javascript">
                    //You should create the validator only after the definition of the HTML form
                      var frmvalidator  = new Validator("frmLocation");

                      frmvalidator.EnableMsgsTogether();
                      //frmvalidator.EnableOnPageErrorDisplaySingleBox();
                       
                      frmvalidator.addValidation("txtName","req","Please enter State name.");
                      frmvalidator.addValidation("txtName","maxlen=60",    "Maximum length for State name is 60 character.");
                      frmvalidator.addValidation("txtName","alnum_s","Enter alphabetic characters only in State name.");
                      
                      frmvalidator.addValidation("txtDescription","req","Please enter State description.");
                      frmvalidator.addValidation("txtDescription","maxlen=150","Max length for theme description is 150 character.");
                      
                      frmvalidator.addValidation("ddlStatus","dontselect=''","Please select State status.");
                      
               </script>
          {/if}
          
        
    </div>
</div>
</div>

{$ADMIN_FOOTER}
Return current item: MembersGear