<?php
// CHECK THE PAGE IS NOT BEING LOADED DIRECTLY
if (!defined('THEME_VERSION')) {	header('HTTP/1.0 403 Forbidden'); exit; }


global $settings, $CORE; 

///////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////

 $settings = array(
  
  "title" => __("Display Settings","premiumpress"), 
  "desc" =>  __("Additional website settings.","premiumpress"),
  
 "back" => "overview"
  );
  _ppt_template('framework/admin/_form-wrap-top' ); 

///////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
 
?> 
 

<div class="card card-admin">
  <div class="card-body">


  
  <div class="container px-0 border-bottom mb-3">
      <div class="row py-2">
        <div class="col-md-8 pr-lg-5">
          <label><?php echo __("Where are you located?","premiumpress"); ?></label>
          <p class="text-muted"><?php echo __("Turn on/off to hide the display of the map location box.","premiumpress"); ?></p>
        </div>
        <div class="col-md-2">
          <div class="mt-4 formrow">
            <label class="radio off">
            <input type="radio" name="toggle" 
                        value="off" onchange="document.getElementById('show_box').value='0'">
            </label>
            <label class="radio on">
            <input type="radio" name="toggle"
                        value="on" onchange="document.getElementById('show_box').value='1'">
            </label>
            <div class="toggle <?php if(in_array(_ppt(array('location', 'show_box')), array("","1"))){  ?>on<?php } ?>">
              <div class="yes">ON</div>
              <div class="switch"></div>
              <div class="no">OFF</div>
            </div>
          </div>
          <input type="hidden" id="show_box" name="admin_values[location][show_box]" value="<?php if(in_array(_ppt(array('location', 'show_box')), array("","1"))){ echo 1; }else{ echo 0; } ?>">
        </div>
      </div>
    </div>


    <div class="container px-0 border-bottom mb-3">
      <div class="row py-2">
        <div class="col-md-8 pr-lg-5">
          <label><?php echo __("Required Field?","premiumpress"); ?></label>
          <p class="text-muted"><?php echo __("Force users to fill out their location.","premiumpress"); ?></p>
        </div>
        <div class="col-md-2">
          <div class="mt-4 formrow">
            <label class="radio off">
            <input type="radio" name="toggle" 
                        value="off" onchange="document.getElementById('required').value='0'">
            </label>
            <label class="radio on">
            <input type="radio" name="toggle"
                        value="on" onchange="document.getElementById('required').value='1'">
            </label>
            <div class="toggle <?php if(in_array(_ppt(array('location', 'required')), array("1"))){  ?>on<?php } ?>">
              <div class="yes">ON</div>
              <div class="switch"></div>
              <div class="no">OFF</div>
            </div>
          </div>
          <input type="hidden" id="required" name="admin_values[location][required]" value="<?php if(in_array(_ppt(array('location', 'required')), array("1"))){ echo 1; }else{ echo 0; } ?>">
        </div>
      </div>
    </div>


 
    <div class="container px-0 border-bottom mb-3">
      <div class="row py-2">
        <div class="col-md-8 pr-lg-5">
          <label><?php echo __("Enable Changes?","premiumpress"); ?></label>
          <p class="text-muted"><?php echo __("Allow users to change their location once the as has been created.","premiumpress"); ?></p>
        </div>
        <div class="col-md-2">
          <div class="mt-4 formrow">
            <label class="radio off">
            <input type="radio" name="toggle" 
                        value="off" onchange="document.getElementById('changes').value='0'">
            </label>
            <label class="radio on">
            <input type="radio" name="toggle"
                        value="on" onchange="document.getElementById('changes').value='1'">
            </label>
            <div class="toggle <?php if(in_array(_ppt(array('location', 'changes')), array("", "1"))){  ?>on<?php } ?>">
              <div class="yes">ON</div>
              <div class="switch"></div>
              <div class="no">OFF</div>
            </div>
          </div>
          <input type="hidden" id="changes" name="admin_values[location][changes]" value="<?php if(in_array(_ppt(array('location', 'changes')), array("","1"))){ echo 1; }else{ echo 0; } ?>">
        </div>
      </div>
    </div>


    <div class="container px-0 border-bottom mb-3">
      <div class="row py-2">
        <div class="col-md-8 pr-lg-5">
          <label><?php echo __("Full Address Field","premiumpress"); ?></label>
          <p class="text-muted"><?php echo __("Turn on/off to hide the full address field within the location box.","premiumpress"); ?></p>
        </div>
        <div class="col-md-2">
          <div class="mt-4 formrow">
            <label class="radio off">
            <input type="radio" name="toggle" 
                        value="off" onchange="document.getElementById('show_fulladdress').value='0'">
            </label>
            <label class="radio on">
            <input type="radio" name="toggle"
                        value="on" onchange="document.getElementById('show_fulladdress').value='1'">
            </label>
            <div class="toggle <?php if(in_array(_ppt(array('location', 'show_fulladdress')), array("","1"))){  ?>on<?php } ?>">
              <div class="yes">ON</div>
              <div class="switch"></div>
              <div class="no">OFF</div>
            </div>
          </div>
          <input type="hidden" id="show_fulladdress" name="admin_values[location][show_fulladdress]" value="<?php if(in_array(_ppt(array('location', 'show_fulladdress')), array("","1"))){ echo 1; }else{ echo 0; } ?>">
        </div>
      </div>
    </div>

    


  </div>



  <div class="p-4 bg-light text-center mt-4">
      <button type="submit" data-ppt-btn class="btn-primary"><?php echo __("Save Settings","premiumpress"); ?></button>
    </div>


</div>

 
<?php  _ppt_template('framework/admin/_form-wrap-bottom' ); ?> 