 <div class="content-wrapper">
    <div class="container-fluid">
		
		<div class="row">
			<div class="col-lg-12">
			   <form action="#" method="post" method="post" enctype="multipart/form-data">
			   <input type="hidden" name="id" value="<?= @$id; ?>">
			   <div class="card">
			     <div class="card-body">
				   <div class="card-title"><?= $pagetitle; ?></div>
				   <?php echo ($this->session->flashdata('form_error'));?>
				   <?php echo ($this->session->flashdata('image_error'));?>
				   <hr>


					<div class="form-group row">
					  <label for="input-21" class="col-sm-2 col-form-label">Merchant Group*</label>
					  <div class="col-sm-10">
						<select name="groupId" class="form-control">
                        	<option value="0">Select Merchant Group</option>
                        	<?php foreach($group as $gr){?>
                            	<?php if($gr->merchantgroupId == @$groupId){ ?>
                                	<option value="<?= $gr->merchantgroupId; ?>" selected><?= $gr->title; ?></option>
                                <?php } else { ?>
                                 	<option value="<?= $gr->merchantgroupId; ?>"><?= $gr->title; ?></option>
                                <?php } ?>
                            <?php }?>
                        </select>
					  </div>
					</div>
                    
                    
					<div class="form-group row">
					  <label for="input-21" class="col-sm-2 col-form-label">Account Id*</label>
					  <div class="col-sm-10">
						<input type="text" class="form-control" name="accountId" id="input-21" placeholder="Enter BUYbot Account Id" <?php if(@$accountId !=''){echo "value='".@$accountId."'";}?>>
					  </div>
					</div>
					
					 <div class="form-group row">
					  <label for="input-21" class="col-sm-2 col-form-label">Username*</label>
					  <div class="col-sm-10">
						<input type="text" class="form-control" name="username" id="input-21" placeholder="Enter BUYbot Merchant Username" <?php if(@$username !=''){echo "value='".@$username."'";}?>>
					  </div>
					</div>
					
					 <div class="form-group row">
					  <label for="input-21" class="col-sm-2 col-form-label">Password*</label>
					  <div class="col-sm-10">
						<input type="text" class="form-control" name="password" id="input-21" placeholder="Enter BUYbot Merchant Password" <?php if(@$password !=''){echo "value='".@$password."'";}?>>
					  </div>
					</div>
                    
                    <div class="form-group row">
					  <label for="input-21" class="col-sm-2 col-form-label">Store Name*</label>
					  <div class="col-sm-10">
						<input type="text" class="form-control" name="storename" id="input-21" placeholder="Enter Store Name" <?php if(@$storename !=''){echo "value='".@$storename."'";}?>>
					  </div>
					</div>
                    
                    <div class="form-group row">
					  <label for="input-21" class="col-sm-2 col-form-label">Contact Person*</label>
					  <div class="col-sm-10">
						<input type="text" class="form-control" name="name" id="input-21" placeholder="Enter Person Name" <?php if(@$name !=''){echo "value='".@$name."'";}?>>
					  </div>
					</div>
                    <div class="form-group row">
					  <label for="input-21" class="col-sm-2 col-form-label">Email*</label>
					  <div class="col-sm-10">
						<input type="text" class="form-control" name="email" id="input-21" placeholder="Enter Email" <?php if(@$email !=''){echo "value='".@$email."'";}?>>
					  </div>
					</div>
                    <div class="form-group row">
					  <label for="input-21" class="col-sm-2 col-form-label">Contact*</label>
					  <div class="col-sm-10">
						<input type="text" class="form-control" name="contact" id="input-21" placeholder="Enter Contact" <?php if(@$contact !=''){echo "value='".@$contact."'";}?>>
					  </div>
					</div>
                    <div class="form-group row">
					  <label for="input-21" class="col-sm-2 col-form-label">Whatsapp*</label>
					  <div class="col-sm-10">
						<input type="text" class="form-control" name="whatsappno" id="input-21" placeholder="Enter Business Whatsapp " <?php if(@$whatsappno !=''){echo "value='".@$whatsappno."'";}?>>
					  </div>
					</div>
                    
				
					<div class="form-group row">
					  <label for="input-22" class="col-sm-2 col-form-label">Description</label>
					  <div class="col-sm-10">
						<textarea name="description" class="ckeditor"><?php if(@$description){echo @$description;}?></textarea>
					  </div>
					</div>
					  <div class="form-group row">
						<label for="input-23" class="col-sm-2 col-form-label">Logo</label>
						<div class="col-sm-10">
						<input name="icon" type="file" class="form-control" id="input-23" placeholder="Select Icon" >
						<input name="iconold" type="hidden" value="<?= @$icon; ?>" >
						<?php if(@$icon){echo "<img src='".base_url('uploads/merchants/'.@$icon)."' width='150'>";}?>
						</div>
					  </div>
					
					<div class="form-group row">
					  <label for="input-24" class="col-sm-2 col-form-label">Status</label>
					  <div class="col-sm-10">
						<input type="checkbox" name="status" class="" id="activestatus" value="1" <?php if(@$status==1){echo "checked";}?>> <label for="activestatus"> Active</label>
					  </div>
					</div>
					 
					 <div class="form-group row">
					  <label for="input-21" class="col-sm-2 col-form-label">Auth Link*</label>
					  <div class="col-sm-10">
						<input type="text" class="form-control" disabled id="input-21" value="<?= @$authlink; ?>">
					  </div>
					</div>
					
					 <div class="form-group row">
					  <label for="input-21" class="col-sm-2 col-form-label">API Key (RML)</label>
					  <div class="col-sm-10">
						<input type="text" name="headerkeyRML" class="form-control" id="input-21" value="<?= @$headerkeyRML; ?>">
					  </div>
					</div>
					
					 <div class="form-group row">
					  <label for="input-21" class="col-sm-2 col-form-label">API Key (INFOBIP)</label>
					  <div class="col-sm-10">
						<input type="text" name="headerkeyINFOBIP" class="form-control" id="input-21" value="<?= @$headerkeyINFOBIP; ?>">
					  </div>
					</div>
					
					 <div class="form-group row">
					  <label for="input-21" class="col-sm-2 col-form-label">Scenario Key (INFOBIP)</label>
					  <div class="col-sm-10">
						<input type="text" name="scenariokeyINFOBIP" class="form-control" id="input-21" value="<?= @$scenariokeyINFOBIP; ?>">
					  </div>
					</div>
					
					  <div class="form-group row">
					  <label for="input-21" class="col-sm-2 col-form-label">Daily Whatsapp Limit</label>
					  <div class="col-sm-10">
						<input type="text" name="dailylimit" class="form-control" id="input-21" value="<?= @$dailylimit; ?>">
					  </div>
					</div>
					
					
					
					 <div class="form-group row">
					  <label class="col-sm-2 col-form-label"></label>
					  <div class="col-sm-10">
						<button type="submit" name="submit" class="btn btn-primary px-5"><i class="icon-lock"></i> Update</button>
					  </div>
					</div>
				 </div>
			 </div>
			</form>
		</div>
	</div><!--End Row-->
	
	