<!-- Content Header (Page header) -->
<section class="content-header">
	<div class="container-fluid">
		<div class="row mb-2">
			<div class="col-sm-6">
				<h1 class="m-0">Currency Settings</h1>
			</div>

			<div class="col-sm-6">
				<ol class="breadcrumb float-sm-right">
					<li class="breadcrumb-item"><a href="dashboard">Dashboard</a></li>
					<li class="breadcrumb-item"><a href="settings">Settings</a></li>
					<li class="breadcrumb-item"><a href="settings/currency-list">Currency</a></li>
					<li class="breadcrumb-item active"><?php if ( count( $currency ) > 0 ): ?>Edit<?php else: ?>Add New<?php endif;?> Currency</li>
				</ol>
			</div>
		</div>
	</div>
</section>

<!-- Main content -->
<section class="content">
	<div class="container-fluid">
		<!-- Small boxes (Stat box) -->
		<div class="row">
			<div class="col-md-12">
				<form id="frmCurrency" action="settings/currency-save" method="post">
					<div class="card card-primary">
						<div class="card-header">
							<h3 class="card-title"><?php if ( count( $currency ) > 0 ): ?>Edit<?php else: ?>Add New<?php endif;?> Currency</h3>
						</div>

						<div class="card-body">
							<div class="row">
								<div class="col-md-6">
									<div class="form-group">
										<label for="fullname">Country Name</label>
										<input type="text" name="fullname" id="fullname" class="form-control" value="<?php if ( count( $currency ) > 0 ) {echo $currency['fullname'];}?>">
									</div>
									<div class="form-group">
										<label for="shortname">Short Form</label>
										<input type="text" name="shortname" id="shortname" class="form-control" value="<?php if ( count( $currency ) > 0 ) {echo $currency['shortname'];}?>">
									</div>
								</div>

								<div class="col-md-6">
									<div class="form-group">
										<label for="symbol">Symbol</label>
										<input type="text" name="symbol" id="symbol" class="form-control" value="<?php if ( count( $currency ) > 0 ) {echo $currency['symbol'];}?>">
									</div>
									<div class="form-group">
										<label for="status">Select Status</label>
										<select name="status" id="status" class="form-control select2" data-placeholder="Select Status">
											<option value=""></option>
											<option value="active" <?php if ( count( $currency ) > 0 && $currency['status'] == 'Active' ) {echo 'selected';}?>>Active</option>
											<option value="inactive" <?php if ( count( $currency ) > 0 && $currency['status'] == 'Inactive' ) {echo 'selected';}?>>Inactive</option>
										</select>
									</div>
								</div>
							</div>
						</div>

						<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>">
						<?php if ( count( $currency ) > 0 ): ?>
							<input type="hidden" name="id" value="<?php echo $currency['id']; ?>">
						<?php endif;?>

						<div class="card-footer">
							<input type="submit" class="btn bg-gradient-primary" value="Save Changes">
							<input type="reset" class="btn bg-gradient-danger" value="Cancel">
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</section>