policybot/application/views/admin/role/roleaction.php
2021-11-30 16:26:55 +05:30

68 lines
2.3 KiB
PHP

<?php
if($type==1)
{
if(isset($role) && $role->num_rows()>0) {
$rm=$role->row();
$role_id= $rm->id;
$role_name= $rm->name;
}?>
<div class="modal-header form-group">
<h4 class="col-md-12 modal-title" style="text-align:center">Edit Role</h4>
</div>
<?=form_open_multipart(base_url().'role/edit_role/'.$role_id,array('class'=>'form-horizontal','id'=>'form_add','enctype'=>"multipart/form-data"));?>
<div class="form-body">
<div class="row ">
<div class="col-md-12 form-group">
<div class="col-md-8" style="margin:0px auto;float:none;text-align:left">
<label for="simpleFormEmail" style="text-align:left!important"> Name</label></div>
<div class="col-md-8" style="margin:0px auto;float:none;text-align:center">
<input type="text" name="rolename" value="<?=$role_name;?>" autocomplete="off" class="form-control" data-validation="required" placeholder="Role Name">
</div>
</div>
</div>
</div>
<div class="modal-footer col-md-4" style="margin:0px auto;float:none;text-align:center">
<input type="submit" class="btn btn-primary roleupdate" value="Submit" name="roleupdate"/>
<button type="button" class="btn dark btn-outline" data-dismiss="modal">Close</button>
</div>
<?=form_close();?>
<?php
}
if($type==2)
{
if(isset($role) && $role->num_rows()>0) {
$rm=$role->row();
$role_id= $rm->id;
$role_name= $rm->name;
}?>
<div class="modal-header form-group">
<h4 class="col-md-12 modal-title" style="text-align:center">Delete Role</h4>
</div>
<?=form_open_multipart(base_url().'role/delete_role/'.$role_id,array('class'=>'form-horizontal','id'=>'form_add','enctype'=>"multipart/form-data"));?>
<div class="form-body">
<div class="row ">
<div class="col-md-12 form-group">
<div class="col-md-8" style="margin:0px auto;float:none;text-align:center">
<h4 style="color:red">Are you sure you want to delete this ?</h4>
</div>
</div>
</div>
</div>
<div class="modal-footer col-md-4" style="margin:0px auto;float:none;text-align:center">
<input type="submit" class="btn btn-primary roleupdate" value="Yes" name="roleupdate"/>
<button type="button" class="btn dark btn-outline" data-dismiss="modal">No</button>
</div>
<?=form_close();?>
<?php
}