@extends('layouts.master')
@section('head')
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo asset('assets/css/custom.css'); ?>" />
<script type="text/javascript" src="<?php echo asset('assets/js/ng-form-plugin.js'); ?>"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js" ></script>
    <!-- PNotify -->
    <script type="text/javascript" src="{{ asset('assets/js/notify/pnotify.core.js')}}"></script>
    <script type="text/javascript" src="{{ asset('assets/js/notify/pnotify.buttons.js')}} "></script>
    <script type="text/javascript" src="{{ asset('assets/js/notify/pnotify.nonblock.js')}}"></script>
<script stype="text/javascript">
    var ngMambkongregasyonApp = angular.module('ngMambkongregasyonApp', [], function($interpolateProvider)
    {$interpolateProvider.startSymbol('<%'); $interpolateProvider.endSymbol('%>'); });
    ngMambkongregasyonApp.controller('ngMambkongregasyonAppcontroller', function($scope) {
    $scope.MambkongregasyonItem = {!! $data !!};
    $scope.usersubroles={!! App\Usersubroles::all()->toJson() !!};
    $('#Mambkongregasyon-form').Add({Type:'POST',Headers:{'X-CSRF-TOKEN':'<?php echo csrf_token();?>'}, ModuleName:'Mambkongregasyon', ModuleItemName:'MambkongregasyonItem', NgAppName:'ngMambkongregasyonApp'});
    $('#Mambkongregasyon-form').Edit({Type:'GET',Headers:{'X-CSRF-TOKEN':'<?php echo csrf_token();?>'}, ModuleName:'Mambkongregasyon', ModuleItemName:'MambkongregasyonItem', NgAppName:'ngMambkongregasyonApp'});
    $('#Mambkongregasyon-form').Delete({Type:'DELETE',Headers:{'X-CSRF-TOKEN':'<?php echo csrf_token();?>'}, ModuleName:'Mambkongregasyon', ModuleItemName:'MambkongregasyonItem', NgAppName:'ngMambkongregasyonApp'});
    $('#Mambkongregasyon-form').Submit({Type:'POST',Headers:{'X-CSRF-TOKEN':'<?php echo csrf_token();?>'}, ModuleName:'Mambkongregasyon', ModuleItemName:'MambkongregasyonItem', NgAppName:'ngMambkongregasyonApp'});
    });
</script>
@stop
@section('content')
<div class="">
    <div class="page-title">
        <div class="title_left">
            <h3>Edit Mambkongregasyon</h3>
        </div>
    </div>
    <div class="clearfix"></div>
    <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="x_panel">
                <div class="x_title">
                    <div class="row">
                       <div class="col-md-8 col-sm-8 col-xs-7"><h2>Mambkongregasyon</h2></div>
                    </div>
                    <div class="clearfix"></div>
                </div>
                <div class="x_content">
                    <form  ng-app="ngMambkongregasyonApp" ng-controller="ngMambkongregasyonAppcontroller" id="Mambkongregasyon-form" class="form-horizontal form-label-left" method="post" action='{!! route("Mambkongregasyoncreateorupdate") !!}' autocomplete="off">
                        <input type="hidden" name="_token" value="{{ csrf_token()}}" />
                        <div class="form-group"><label class="control-label col-md-3 col-sm-3 col-xs-12" for="firstname"> First Name <span class="required">*</span></label><div class="col-md-6 col-sm-6 col-xs-12"><input ng-model="MambkongregasyonItem.firstname" type="text" id="firstname" name="firstname" required="required" class="form-control col-md-7 col-xs-12" ><label ng-repeat="error in moduleerrors.errors.firstname" ng-bind="error" class="error_label"   ></div></div><div class="form-group"><label class="control-label col-md-3 col-sm-3 col-xs-12" for="lastname"> LastName <span class="required">*</span></label><div class="col-md-6 col-sm-6 col-xs-12"><input ng-model="MambkongregasyonItem.lastname" type="text" id="lastname" name="lastname" required="required" class="form-control col-md-7 col-xs-12" ><label ng-repeat="error in moduleerrors.errors.lastname" ng-bind="error" class="error_label"   ></div></div><div class="form-group"><label class="control-label col-md-3 col-sm-3 col-xs-12" for="address1"> Address1 <span class="required">*</span></label><div class="col-md-6 col-sm-6 col-xs-12"><input ng-model="MambkongregasyonItem.address1" type="text" id="address1" name="address1" required="required" class="form-control col-md-7 col-xs-12" ><label ng-repeat="error in moduleerrors.errors.address1" ng-bind="error" class="error_label"   ></div></div><div class="form-group"><label class="control-label col-md-3 col-sm-3 col-xs-12" for="address2"> address2 <span class="required">*</span></label><div class="col-md-6 col-sm-6 col-xs-12"><input ng-model="MambkongregasyonItem.address2" type="text" id="address2" name="address2" required="required" class="form-control col-md-7 col-xs-12" ><label ng-repeat="error in moduleerrors.errors.address2" ng-bind="error" class="error_label"   ></div></div><div class="form-group"><label class="control-label col-md-3 col-sm-3 col-xs-12" for="city"> City <span class="required">*</span></label><div class="col-md-6 col-sm-6 col-xs-12"><input ng-model="MambkongregasyonItem.city" type="text" id="city" name="city" required="required" class="form-control col-md-7 col-xs-12" ><label ng-repeat="error in moduleerrors.errors.city" ng-bind="error" class="error_label"   ></div></div><div class="form-group"><label class="control-label col-md-3 col-sm-3 col-xs-12" for="state"> State <span class="required">*</span></label><div class="col-md-6 col-sm-6 col-xs-12"><input ng-model="MambkongregasyonItem.state" type="text" id="state" name="state" required="required" class="form-control col-md-7 col-xs-12" ><label ng-repeat="error in moduleerrors.errors.state" ng-bind="error" class="error_label"   ></div></div><div class="form-group"><label class="control-label col-md-3 col-sm-3 col-xs-12" for="zip"> Zip <span class="required">*</span></label><div class="col-md-6 col-sm-6 col-xs-12"><input ng-model="MambkongregasyonItem.zip" type="text" id="zip" name="zip" required="required" class="form-control col-md-7 col-xs-12" ><label ng-repeat="error in moduleerrors.errors.zip" ng-bind="error" class="error_label"   ></div></div><div class="form-group"><label class="control-label col-md-3 col-sm-3 col-xs-12" for="role"> Role <span class="required">*</span></label><div class="col-md-6 col-sm-6 col-xs-12"><select  class="form-control col-md-7 col-xs-12" id="role" name="role"><option ng-selected="MambkongregasyonItem.role==usersubrolesitem.id" ng-repeat=" usersubrolesitem in usersubroles" class="form-control col-md-7 col-xs-12" value="<% usersubrolesitem.id %>" ><% usersubrolesitem.subrole %></option></select><label ng-repeat="error in moduleerrors.errors.role" ng-bind="error" class="error_label"   ></div></div>
                        <input ng-model='MambkongregasyonItem.id' type="text" id="id" name="id" style="display: none" />
                        <div class="ln_solid"></div>
                        <div class="form-group">
                            <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                                <button type="reset" class="btn btn-primary cancel">Cancel</button>
                                <button type="submit" class="btn btn-success">Submit</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@stop

@section('footer')
<script type="text/javascript">
    $(document).ready(function() {
        var ajaxAction=function(url,action){ 
            $.ajax({url:url,type:action,data:{'_token':"{{ csrf_token()}}" ,'selected_rows':SelectedCheckboxes() },success:function(){ ListTable.ajax.reload(); }}); 
        }
        $.ajaxSetup({
            headers: { 'X-CSRF-TOKEN':'{{ csrf_token() }}','X-Requested-With': 'XMLHttpRequest'}
        });
    });
</script>
@stop