<?php
defined('BASEPATH') OR exit('No direct script access allowed');

$errorMessage = $this->session->flashdata('error');

?>
<div class="ui container" style="padding-top:5%">
<?php if (validation_errors() || $errorMessage) { ?>
	<div class="ui negative message"><i class="close icon"></i><p><?php echo $errorMessage ? $errorMessage : validation_errors(); ?></p></div>
<?php } ?>
	<div class="ui grid center aligned">
		<div class="row">
			<div class="sixteen wide tablet nine wide computer column">
				<div class="ui left aligned segment">
					<?php
						// <form action="<?php echo site_url('signup'); ? > " method="post" id="signup-form" class="ui form">
					?>
					<?php echo form_open('register', 'class="ui form" id="register-form"'); ?>
						<h3 class="ui header center aligned">Download and Register Billing Software</h3>
						<div class="required field">
							<label>Email</label>
							<div class="ui fluid icon input">
								<input name="email" id="email" type="email" value="<?php echo set_value('email'); ?>" minlength="6" required autocomplete="off" />
								<i class="icon mail outline"></i>
							</div>
						</div>
						<div class="required field">
							<label>Password</label>
							<div class="ui fluid icon input">
								<input name="password" id="password" type="password" minlength="6" required autocomplete="off" />
								<i class="icon key"></i>
							</div>
						</div>
						<div class="required field">
							<label>Confirm Password</label>
							<div class="ui fluid icon input">
								<input name="passconf" id="passconf" type="password" minlength="6" required autocomplete="off" />
								<i class="icon key"></i>
							</div>
						</div><?php
/*
						<div class="required field">
							<label>Company Name</label>
							<div class="ui fluid input">
								<input name="company_name" type="text" required autocomplete="off" />
							</div>
						</div>
*/ ?>
						<div class="ui two fields">
							<div class="required field">
								<label>Enter the word diplay on image</label>
								<div class="ui fluid input">
									<input name="captcha" type="text" placeholder="Captcha" required autocomplete="off" />
								</div>
							</div>
							<div class="field">
								<label>&nbsp;</label>
								<?php echo $captcha; ?>
							</div>
						</div>
						<div class="field">
							<input type="hidden" name="onpremises" value="1" />
							<?php
								if (!empty($_GET["ob_source"]))
								{
									echo '<input type="hidden" name="ob_source" value="' . $_GET["ob_source"] . '" />';
								}

								if (!empty($_GET["ob_source_id"]))
								{
									echo '<input type="hidden" name="ob_source_id" value="' . $_GET["ob_source_id"] . '" />';
								}
							?>
							<button type="submit" name="submit" class="ui teal right labeled icon button fluid">Register</button>
						</div>
						<div class="field">
							<a href="<?php echo site_url('login'); ?>"><i class="arrow left icon"></i>Login</a>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<style>
@media only screen and (max-width: 767px) {
	body {
		zoom: 1 !important;
	}
}
</style>
