<!DOCTYPE html>
<html lang="en">
<head>
	<!-- header -->
		<?php
		helper('form');

	    $session = session();
	    $validation = \Config\Services::validation();


		 echo view('admin/common_header'); ?>
	<!-- /header -->

	<!-- Bootsrap form validation JS files -->
	<script type="text/javascript" src="<?php echo base_url('assets/js/formValidation.js');?>"></script>
	<script type="text/javascript" src="<?php echo base_url('assets/js/bootstrap.js');?>"></script>

	<!-- Theme JS files -->
	<script type="text/javascript" src="<?php echo base_url('assets/js/core/app.js');?>"></script>
	<!-- /theme JS files -->
	
	<!-- bootsrap switch checkbox JS files -->
    <script src="<?php echo base_url('assets/boots/js/bootstrap-switch.js');?>"></script>

    <!-- notify JS files -->
    <script type="text/javascript" src="<?php echo base_url('assets/js/plugins/notifications/jgrowl.min.js');?>"></script>

</head>

<body class="navbar-top-md-md">

	<!-- Fixed navbars wrapper -->
	<div class="navbar-fixed-top">

		<!-- Main navbar -->
		<?php echo view('admin/mainnav'); ?>
		<!-- /main navbar -->


		<!-- Second navbar -->
		<?php echo view('admin/secondnav'); ?>
		<!-- /second navbar -->

	</div>
	<!-- /fixed navbars wrapper -->


	<!-- Page header -->
		<div class="page-header">
			<div class="page-header-content">
				<div class="page-title">
					<h4><i id="icon-bck" class="icon-arrow-left52 position-left"></i> <span class="text-semibold"><?php echo lang('language_lang.register_field_page_title'); ?></span></h4>

					<!-- <ul class="breadcrumb breadcrumb-caret position-right">
						<?php foreach ($breadcrumbs as $breadcrumb) { ?>
						    <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
						<?php } ?>
					</ul> -->
					<ul class="breadcrumb breadcrumb-caret position-right">
						<?php foreach ($breadcrumbs as $breadcrumb) { if(isset($breadcrumb['href'])){?>
						    <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
						<?php } else { ?> <li><?php echo $breadcrumb['text']; ?></li><?php } } ?>
					</ul>
				</div>
				<?php echo view('admin/'.$module_name.'_header'); ?>
				<!-- <div class="heading-elements">
					<div class="heading-btn-group">
						<a href="#" class="btn btn-link btn-float has-text"><i class="icon-bars-alt text-primary"></i><span>Statistics</span></a>
						<a href="#" class="btn btn-link btn-float has-text"><i class="icon-calculator text-primary"></i> <span>Invoices</span></a>
						<a href="#" class="btn btn-link btn-float has-text"><i class="icon-calendar5 text-primary"></i> <span>Schedule</span></a>
					</div>
				</div> -->
			</div>
		</div>	
	<!-- /page header -->


	<!-- Page container -->
	<div class="page-container">

		<!-- Page content -->
		<div class="page-content">

			<!-- Main content -->
			<div class="content-wrapper">

				<!-- Horizontal form -->
				<div class="panel panel-flat">
					<div class="panel-heading">
						<h5 class="panel-title"><?php echo lang('language_lang.register_field_page_title'); ?></h5>
						<div class="heading-elements">
							<ul class="icons-list">
		                		<li><a data-action="collapse"></a></li>
		                		<li><a data-action="close"></a></li>
		                	</ul>
	                	</div>
                	</div>

					<div class="panel-body">
				  <form class="form-horizontal form-login" action="<?= site_url($action);?>" method="post">
							<div class="form-group ">
                                <label class="control-label col-lg-3 text-semibold"><?php echo lang('language_lang.plac_field_name'); ?></label>
                                <label class="control-label col-lg-3 text-semibold"><?php echo lang('language_lang.plac_field_enable'); ?></label>
                                <label class="control-label col-lg-3 text-semibold"><?php echo lang('language_lang.plac_field_mandatory'); ?></label>
							</div>

							<div class="form-group ">
                                <label class="control-label col-lg-3 text-semibold"><?php echo lang('language_lang.place_last_name'); ?></label>
                                <div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="enable_last_name" <?php if($enable_last_name==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
								<div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="required_last_name" <?php if($required_last_name==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
							</div>

							<div class="form-group ">
                                <label class="control-label col-lg-3 text-semibold"><?php echo lang('language_lang.place_user_address'); ?></label>
                                <div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="enable_user_address" <?php if($enable_user_address==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
								<div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="required_user_address" <?php if($required_user_address==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
							</div>

							<div class="form-group ">
                                <label class="control-label col-lg-3 text-semibold"><?php echo lang('language_lang.place_user_city'); ?></label>
                                <div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="enable_user_city" <?php if($enable_user_city==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
								<div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="required_user_city" <?php if($required_user_city==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
							</div>

							<div class="form-group ">
                                <label class="control-label col-lg-3 text-semibold"><?php echo lang('language_lang.place_user_country'); ?></label>
                                <div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="enable_user_country" <?php if($enable_user_country==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
								<div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="required_user_country" <?php if($required_user_country==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
							</div>

							<div class="form-group ">
                                <label class="control-label col-lg-3 text-semibold"><?php echo lang('language_lang.place_user_state'); ?></label>
                                <div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="enable_user_state" <?php if($enable_user_state==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
								<div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="required_user_state" <?php if($required_user_state==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
							</div>



							<div class="form-group ">
                                <label class="control-label col-lg-3 text-semibold"><?php echo lang('language_lang.place_user_zip'); ?></label>
                                <div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="enable_user_zip" <?php if($enable_user_zip==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
								<div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="required_user_zip" <?php if($required_user_zip==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
							</div>

							<div class="form-group ">
                                <label class="control-label col-lg-3 text-semibold"><?php echo lang('language_lang.place_user_phone'); ?></label>
                                <div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="enable_user_phone" <?php if($enable_user_phone==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
								<div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="required_user_phone" <?php if($required_user_phone==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
							</div>

							<div class="form-group ">
                                <label class="control-label col-lg-3 text-semibold"><?php echo lang('language_lang.place_security_question'); ?></label>
                                <div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="enable_security_question" <?php if($enable_security_question==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
								<div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="required_security_question" <?php if($required_security_question==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
							</div>

							<div class="form-group ">
                                <label class="control-label col-lg-3 text-semibold"><?php echo lang('language_lang.plac_trans_pin'); ?></label>
                                <div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="enable_trans_pin" <?php if($enable_trans_pin==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
								<div class="col-lg-3">
									<div class="checkbox checkbox-switch">
										<label>
											<input type="checkbox" class="switch" data-on-text="<?php echo lang('language_lang.On'); ?>" data-off-text="<?php echo lang('language_lang.Off'); ?>" data-on-color="primary" data-off-color="default" name="required_trans_pin" <?php if($required_trans_pin==='on'){ echo 'checked="checked"'; }   ?>>
										</label>
									</div>
								</div>
							</div>
							<input type="hidden" name="hidden" value="1"/>

							<div class="text-right col-lg-6">
								<button style=" padding-right: 14px;" type="submit" class="btn btn-primary"><?php echo lang('language_lang.button_update'); ?> <i class="icon-arrow-right14 position-right"></i></button>
							</div>

						</form>
					</div>
				</div>
				<!-- /horizotal form -->

			</div>
			<!-- /main content -->

		</div>
		<!-- /page content -->


		<!-- Footer -->
		<div class="footer text-muted">
			<?php echo site_footer();?>
		</div>
		<!-- /footer -->

	</div>
	<!-- /page container -->

	<script type="text/javascript">

	jQuery.noConflict();
	(function( $ ) {
	$(function() {

		$(document).ready(function() {

			$.jGrowl.defaults.closer = false;

			<?php if($session->getFlashData('error_message')) { ?>
				$.jGrowl("<?php echo $session->getFlashData('error_message');?>", {
		            header: '<?php echo lang("language_lang.error");?>',
		            theme: 'bg-danger'
		        });
            <?php } ?>
                    
            <?php if($session->getFlashData('success_message')) { ?>
                $.jGrowl("<?php echo $session->getFlashData('success_message');?>", {
		            header: '<?php echo lang("language_lang.success");?>',
		            theme: 'bg-success'
		        });
            <?php } ?>

		    $('.form-login').formValidation({
		    	framework: 'bootstrap',
		    	excluded: [':disabled'],
		        icon: {
		            // valid: 'glyphicon glyphicon-ok',
		            // invalid: 'glyphicon glyphicon-remove',
		            validating: 'glyphicon glyphicon-refresh'
		        },
		        fields: {
		            log_auth_limit: {
		                message: '<?php echo lang("language_lang.login_auth_validate"); ?>',
		                validators: {
		                    notEmpty: {
		                        message: '<?php echo lang("language_lang.login_auth_limit"); ?>'
		                    },
		                    digits: {
 		                        message: '<?php echo lang("language_lang.login_auth_consist"); ?>'
		                    }
		                    // ,
		                    // regexp: {
		                    //     regexp: /^[1-9][0-9]{0,1}$/,
		                    //     message: '<?php echo lang("language_lang.login_auth_limit_exceed"); ?>'
		                    // }
		                }
		            }
		            
		            
		        }
		    })
		});
	    $('#icon-bck').on('click',function() {
			window.history.back();
		});
	    
	    $(".switch").bootstrapSwitch();

	});
	})(jQuery);


	
	</script>

</body>
</html>
