<? global $vis_language; ?>
<section id="breadcrumb" class="row m-b m-l-none m-r-none">
   <div class="col-sm-6">
      <h3 class="m-b-xs text-black"><? echo $operation['view_title'];?></h3>
      <ul class="breadcrumb bg-empty no-border m-b-xxs no-padder">
         <li><a class="link" href="#/home/quick_view/<? echo $vis_language['TXTHOME']; ?>"><? echo $vis_language['TXTHOME']; ?></a></li>
         <li><a class="link" href="#/setting/setting_menu/<? echo $vis_language['TXTSETTINGS'];?>" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTSETTINGS'];?>',{'vis_module':'setting','vis_operation':'setting_menu'});"><? echo $vis_language['TXTSETTINGS']; ?></a></li>
         <li> <a href="#/setting/view_survey/<? echo $vis_language['TXTSURVEY']; ?>" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTSURVEY']; ?>',{'vis_module':'setting','vis_operation':'view_survey'});" class="link"><? echo $operation['view_title']; ?></a></li>
         <li class="active"> <? echo $vis_language['TXTUPDATESURVEY'];?></li>
      </ul>
      <div>
      </div>
   </div>
</section>
<section class="padder">
   <section class="panel panel-default">
      <header class="panel-heading sub_header"><? echo $vis_language['TXTUPDATESURVEY']; ?></header>
      <div class="panel-body">
         <form  class="form-horizontal" id="vis_surveygroup_form" name="vis_surveygroup_form" method="post">
            <input type="hidden" name="vis_group_id" value="<? echo $custom_group_details[0]['customgroup_id']?>" />
            <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTTITLE']; ?></label>
               <div class="col-sm-10">
                  <input class="form-control input-sm" type="text" name="vis_customgroup_name" id="vis_customgroup_name" value="<? echo htmlentities($custom_group_details[0]['customgroup_name'], ENT_COMPAT, 'UTF-8'); ?>" >
               </div>
            </div>
            <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTDISPLAYORDER']; ?></label>
               <div class="col-sm-10">
                  <input class="form-control input-sm" type="text" name="vis_displayorder" id="vis_displayorder" value="<? echo $custom_group_details[0]['display_order']; ?>" >
               </div>
            </div>
            <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTSURVEYURL']; ?></label>
               <div class="col-sm-10">
                  <input class="form-control input-sm" type="text" name="vis_url" id="vis_url" value="<? echo "{link}index.php?/survey/{useremail}/{salt}/".$custom_group_details[0]['customgroup_id']; ?>" readonly>
               </div>
            </div>
            <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTSTATUS']; ?></label>
               <div class="col-sm-1">
                  <label class="switch  <? if($custom_group_details[0]['is_enabled']==0) echo 'radio-no-uncheck'; ?>">
                  <input type="checkbox" name="vis_status"  id="vis_status" <? if($custom_group_details[0]['is_enabled']==1) echo 'checked="checked"'; ?>  >
                  <span ></span>
                  </label>
               </div>
            </div>
            <? if($language_details!=-1) { ?>
            <div class="form-group">
               <div class="col-sm-12"><h5><? echo $vis_language['MSGLANGTRANSFORSURVEYGROUP']; ?></h5></div>
            </div>
            <div class="line b-b line-lg pull-in"></div>
            <br/>
            <?
               for($i=0;$i<count($language_details);$i++) { ?>
            <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $language_details[$i]['language_name']; ?></label>
               <div class="col-sm-10">
                  <input class="form-control input-sm" type="text" name="vis_language_<? echo $language_details[$i]['language_id']; ?>" type="text" value="<? echo $customgroup_lang[$language_details[$i]['language_id']]; ?>" />
               </div>
            </div>
            <?
               }
               }  ?>
            <input type="hidden" name="vis_grouptype" id="vis_grouptype" value="4">
            <input type="hidden" name="is_survey" id="is_survey" value="1">
            <div class="line b-b line-lg pull-in"></div>
            <br/>
            <div class="form-group">
               <div class="col-sm-4 col-sm-offset-2">
                  <button type="button" class="btn btn-primary" onclick="$('#vis_workpanel_div').visExecution('submit_form',{'vis_module':'setting', 'vis_operation':'update_survey', 'vis_form':'vis_surveygroup_form'})"><? echo $vis_language['TXTUPDATE']; ?></button>
               </div>
            </div>
      </div>
      </form>
      </div>
   </section>
</section>
