<section class="content-header">
    <div class="container-fluid">
        <div class="row mb-2">
            <div class="col-sm-6">
                <h1>
                    
                </h1>
            </div>
            <div class="col-sm-6">
                <ol class="breadcrumb float-sm-right">
                    <li class="breadcrumb-item"><a href="<?php echo base_url();?>">Dashboard</a></li>
                    <li class="breadcrumb-item"><?php echo $parent;?></li>
                    <li class="breadcrumb-item"><a href="<?php echo base_url()."index.php/".$link;?>"><?php echo $titlebefore;?></a></li>
                    <li class="breadcrumb-item active"><?php echo $title;?></li>
                </ol>
            </div>
        </div>
    </div>
</section>
<!-- Main content -->
<section class="content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-12">
                <div class="card card-default">
                    <?php 
                        $setdisabled    = "";
                        $setid          = "";
                        $setnama        = "";
                        $setstatus      = 1;
                        if ($actionform=="prosesview"){
                            $setdisabled="disabled='disabled'";
                        }
                        if ($actionform!="prosesadd"){
                            $setid          = $pm->row('mp_id');
                            $setnama        = $pm->row('mp_nama');
                            $setstatus      = $pm->row('mp_status');
                        }
                    ?>
                    <form action="<?php echo(base_url()); ?>index.php/<?php echo $link;?>/<?php echo $actionform; ?>" method="post" autocomplete="off">
                        <div class="card-header">
                            <h3 class="card-title"><?php echo $title;?></h3>
                        </div>
                        <div class="card-body">
                            <?php if(validation_errors()){ ?>
                                <div id="alert" class="alert alert-danger alert-dismissable">
                                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                                    <i class="icon fa fa-ban"></i> Alert!
                                        <?php echo validation_errors() ?>
                                </div>
                                <script> 
                                    setTimeout(function() {
                                        $('#alert').hide('fast');
                                    }, 5000);
                                </script>
                            <?php } ?>
                            <div class="form-group row">
                                <label for="nama" class="col-sm-2 col-form-label">Nama</label>
                                <div class="col-sm-6">
                                    <input type="hidden" name="id" value="<?php echo $setid;?>"/>
                                    <input id="nama" name="nama" type="text" <?php echo $setdisabled;?> class="form-control" placeholder="Nama Pembayaran" value="<?php echo $setnama;?>" />
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label"></label>
                                <div class="col-sm-2">
                                    <input id="status" name="status" type="checkbox" value="1" <?php echo $setdisabled;?> <?php if($setstatus==1){echo "checked";}?> data-bootstrap-switch data-off-color="danger" data-on-color="success"/>
                                </div>
                            </div>
                        </div>
                        <div class="card-footer">
                            <?php if ($actionform!="prosesview"){ ?>
                                <button type="submit" class="btn btn-info">Simpan</button>
                            <?php } ?>
                            <a href="<?php echo base_url()."index.php/".$link;?>" class="btn btn-default float-right">Cancel</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</section>
