javascript – Como alterar este script para se a pessoa clicar em um checkbox obrigar a marcar mais um

```
<script>
        //LIMITA A QUANTIDADE DE CLIQUES
        $(".limited1<?php echo $i; ?><?php echo $i4; ?>").click(function() {

          var bol = $(".limited1<?php echo $i; ?><?php echo $i4; ?>:checkbox:checked").length >= 2;     
          $(".limited1<?php echo $i; ?><?php echo $i4; ?>:checkbox").not(":checked").attr("disabled",bol);

        });
    </script>

magento2 – How to make checkbox Check/Uncheck onchange trigger event to subscribe/unsubscribe customer from newsletter magento 2 on customer/account?

Basically I have a checkbox on customer/account page adding via code below.
appdesignfrontendCompanyporto_base_childMagento_Customertemplatesaccountdashboardinfo.phtml

<div class="col-12 col-sm-12">
            <div class="flex-card myaccount-block proofing-block">
                <div class="col-lg-3 float-left">
                <img src="" alt="Automatic Proofing Approval Options" />
                </div>
                <div class="col-lg-6 float-left">
                    <strong class="box-title">
                        <span><?= $block->escapeHtml(__('Automatic Proofing Approval Options')) ?></span>
                    </strong>
                    <div class="box-content">
                        <p><?= $block->escapeHtml(__('
                        By default, once your file is preflighted OK, you will have 1 hour to approve or make changes to your file. If no action is taken within this hour, your order will automatically go into production.')) ?>
                        </p>
                        <a href="#" id="proof-learnmore">Learn More..</a>
                    </div>
                </div>
                <div class="col-lg-3 float-left">
                    <span class="yesno-label">Yes</span>
                    <div class="box-actions">
                            <label class="proof-switch">
                            <input type="checkbox">
                            <span class="slider round"></span></label>
                    </div>
                    <span class="yesno-label">No</span>
                </div>
            </div>
        </div>

How can I create a functionality so whenever user check/uncheck this checkbox it will call an observer/controller which will pass the value(customer_email) to magento backend and change the newsletter subscription status? I hope I am on the right track of understanding cause this is what I am planning to implement. I am still not sure whether I will need a block or not. Please anyone guide me through this it would be really helpful for me to continue my learning and understand magento 2. Thank you and cheers. Though I am trying my best to implement this and update here if something relevant
enter image description here

forms – Checkbox while applying Filters

We are creating custom forms. The user can choose any type of field that he wants to. It can be a checkbox, dropdown, text, paragraph, etc. Customers can fill these application forms and the admin can see a list of all these filled forms.
Now, there is an option to filter the applications. The customer can apply a value to any field and filter based on it.

The checkbox field cannot be grouped. It’s a standalone field.
While filtering, if the checkbox is enabled, it’ll list all the applications that have that particular checkbox enabled.

But, how should it behave when the checkbox is disabled? Should it display everything or should it filter based on the values that have the checkbox value marked as false?
There is no way to remove the fields that apply on the filter. All fields on the form (except text fields) are visible as filters.

Save data from a checkbox to a wpdb array

I have several fruit checkboxes but when saving to the wpdb database it only saves the last one that it checks, variable $check receives vardump string (6) “banana” string (5) “apple”

In the database only appears apple should be banana, apple in that same field an array. Should not only save it the last marked

 foreach( $checkboxes as $check ) {
    var_dump( $check); 
}

 global $wpdb; 
 $wpdb->insert('data',array( 
      'fruit' => $check
    ));

How can I make a conditional checkbox on Woocommerce checkout?

I need to place an “I agree to my data being sent to X payment processor…” checkbox (Mandatory, unchecked) on the checkout form of Woocommerce. Ideally in the same spot where one agrees to Terms & Conditions. I would need it to be conditional based on the payment method chosen; so Paypal would have an “I agree to data being sent to Paypal…” box where Stripe would have “I agree… sent to stripe…” box.

I am absolutely not 100% fluent in PHP or coding for that matter, so if you do know of a way, perhaps you could just explain it quite simply?

Thank you so much!

wp admin – Check with Jquery if second level checkbox from categories are checked

I have a two level list of Categories. First levels are multiple (more than 30). Also the associated child are a lot From the WP-admin, I would like to check whenever at least one of the second level (child) checkboxes are checked. I will run the jquery function after the #post has been submitted. That part is easy, but how to check if any of the childs have been checked is impossible for me to figure out. Banging my head already for days 🙂

android studio – Listview With Custom Adapter, Checkbox Items And Select All option

I have an application that populate data from sqlite and put in a listview

1 of the holder in listview layout is a checkbox.

I also have 1 checkbox in the forupload activity which named select all, that if all the items in the listview are checked, the select all checkbox will be set as checked. And if I check the select all checkbox, all the items in the listview will be checked

ForUploadActivity.xml

<CheckBox
            android:id="@+id/chckbox_selectall_forUpload"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="SELECT ALL"
            android:textStyle="bold"
            android:textAlignment="center"
            android:textSize="20sp"
            android:button="@null"
            android:drawableRight="?android:attr/listChoiceIndicatorMultiple"
            android:drawableEnd="?android:attr/listChoiceIndicatorMultiple"
            tools:ignore="HardcodedText" />

        <ListView
            android:id="@+id/listview_forUpload"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center" />

**ListviewLayout.xml**
<TextView
    android:id="@+id/holder_name_forUpload"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:textColor="@android:color/black"
    android:textStyle="bold" />

<TextView
    android:id="@+id/holder_address_forUpload"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:textColor="@android:color/black"
    android:textStyle="bold" />


**ForUploadActivity**

ListView New_forUpload_List;
private Button Upload_Selected_Items, Delete_All;
com.vicjames.irca.ListAdapters.ForUploadListAdapter forUploadListAdapter;
private ArrayList list_forUpload_id = new ArrayList<>();
private ArrayList list_forUpload_name = new ArrayList<>();
private ArrayList list_forUpload_address = new ArrayList<>();

CheckBox select_All;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_for_upload);

    New_forUpload_List= findViewById(R.id.listview_forUpload);
    select_All = findViewById(R.id.chckbox_selectall_forUpload);
    viewData_forUpload();
    New_forUpload_List.setOnItemClickListener(new AdapterView.OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {

        }
    });
    select_All.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
        @Override
        public void onCheckedChanged(CompoundButton compoundButton, boolean b) {

        }
    });

    
}

public void viewData_forUpload() {
    db = new DatabaseHelper(getApplicationContext());
    sqLiteDatabase = db.getReadableDatabase();
    Cursor cursor = sqLiteDatabase.rawQuery("SELECT ID, (Last_Name || ' ' || First_Name || ' ' || Middle_Name) as Name, (Barangay || ' ' || Town) as Address FROM FOR_UPLOAD", null);
    list_forUpload_id.clear();
    list_forUpload_name.clear();
    list_forUpload_address.clear();

    if (cursor.moveToFirst()) {
        do {
            list_forUpload_id.add(cursor.getString(cursor.getColumnIndex("ID")));
            list_forUpload_name.add(cursor.getString(cursor.getColumnIndex("Name")));
            list_forUpload_address.add(cursor.getString(cursor.getColumnIndex("Address")));
        }
        while (cursor.moveToNext());
    }
    forUploadListAdapter = new com.vicjames.irca.ListAdapters.ForUploadListAdapter(getApplicationContext(),
            this.list_forUpload_asc_rec,
            this.list_forUpload_name,
            this.list_forUpload_address);

    New_forUpload_List.setAdapter(forUploadListAdapter);
    cursor.close();
}

**ForUploadListAdapter**

public class ForUploadListAdapter extends BaseAdapter
{
private Context context;
private ArrayList list_upload_id;
private ArrayList list_upload_name;
private ArrayList list_upload_address;

public ForUploadListAdapter(Context context, ArrayList<String> list_upload_id, ArrayList<String> list_upload_name, ArrayList<String> list_upload_address) {
    this.context = context;
    this.list_upload_id = list_upload_id;
    this.list_upload_name = list_upload_name;
    this.list_upload_address = list_upload_address;
}

@Override
public int getCount() {
    return list_upload_id.size();
}

@Override
public Object getItem(int i) {
    return null;
}

@Override
public long getItemId(int i) {
    return 0;
}

@Override
public View getView(int i, View view, ViewGroup viewGroup) {
    ForUploadListAdapter.Holder holder;
    if (view == null)
    {
        @SuppressLint("WrongConstant") LayoutInflater layoutInflater =(LayoutInflater) this.context.getSystemService("layout_inflater");
        view = layoutInflater.inflate(R.layout.layout_for_upload_list, null, true);
        holder = new ForUploadListAdapter.Holder();
        holder.holder_fordownload_id = view.findViewById(R.id.holder_id_forUpload);
        holder.holder_fordownload_name = view.findViewById(R.id.holder_name_forUpload);
        holder.holder_fordownload_address = view.findViewById(R.id.holder_address_forUpload);
        view.setTag(holder);
    }
    else
    {
        holder = (ForUploadListAdapter.Holder)view.getTag();
    }
    holder.holder_fordownload_id.setText(list_upload_id.get(i));
    holder.holder_fordownload_name.setText(list_upload_name.get(i));
    holder.holder_fordownload_address.setText(list_upload_address.get(i));

    if (i % 2 == 1)
    {
        view.setBackgroundColor(Color.parseColor("#708090"));
    }
    else
    {
        view.setBackgroundColor(Color.parseColor("#00574B"));
    }

    return view;
}

public class Holder
{
    CheckBox holder_fordownload_id;
    TextView holder_fordownload_name, holder_fordownload_address;

    private Holder()
    {

    }
}

}


I tried (this)(1) but I can't make it work..

can anyone give me idea how to implement this function in my project..

Thank you in advance..


  (1): https://www.tutorialspoint.com/how-to-get-all-checked-items-in-a-listview-in-android

Angular Slick Grid + Checkbox to select all items inside groupof groups

Could you please help me in to select all entries of the group in Angular slick-grid

Thanks

I’m trying to do an import range with query with checkbox. However i keep encountering parse error :(

=QUERY(IMPORTRANGE("1pzzOzjtJ8GJOWnkBozdO0anKHnbeREvadEc4rzY4ezI",’Guest Speaker Tracking’!F4:O"),"select * where Col5=TRUE",1)

jquery – Como passar os dados do checkbox para o model?

Boa noite pessoal, sou meio cru em Backend. Porém to tentando desembolar algumas coisas aqui.
E estou tentando pegar os dados de uma View e passar para meu model.

  1. View
@{
    ViewBag.Title = "Administration - User";

    var currentLab = ViewBag.CurrentLab;
    var canEdit = ViewBag.CanEdit;
    string ID = ViewBag.ID;
}

<ol class="breadcrumb mb-0 p-2">
    <li class="breadcrumb-item"><i class="nav-icon fa fa-home"></i></li>
    <li class="breadcrumb-item">Administration</li>
    <li class="breadcrumb-item">User</li>
    <li class="breadcrumb-item active">@(string.IsNullOrEmpty(ID) ? "New" : ID)</li>
</ol>
<link rel="stylesheet" href="">
<div class="container-fluid p-2" ng-app="Module">
    <div ng-controller="Controller" data-ng-init="Show = false; init('@ID')">
        <div class="demo-section k-content HideDiv" id="DivContent">
            <form name="Form" method="POST" novalidate>
                <div class="card mb-0" style="height: 201px !important">
                    <div class="card-header p-2">
                        <div class="row">
                            <div class="col">
                                <button type="submit" class="btn btn-outline-dark" ng-click="Btn_Save()" ng-disabled="Form.$invalid==true || Disabled==true"><i class="fa fa-save"></i> Save</button>
                                <button type="button" class="btn btn-outline-dark" ng-click="Btn_Cancel()"><i class="fa fa-times"></i> Cancel</button>
                            </div>
                            <div class="col text-right pt-1" style="color: red;">
                            </div>
                        </div>
                    </div>
                    <div class="card-body p-3">
                        <div class="row">
                            <div class="col-6">
@*                                 <div class="form-group row m-0 pb-2" ng-if="DataContent.UserId > 0">
                                    <label class="col-3 col-form-label font-weight-bold">UserID</label>
                                    <div class="col-9 kformtop">
                                        <input type="text" readonly class="form-control" ng-model="DataContent.UserId" ng-disabled="Disabled" id="UserEditID" required>
                                    </div>
                                </div> *@
                                <div class="form-group row m-0 pb-2" ng-if="DataContent.UserId > 0">
                                    <label class="col-3 col-form-label font-weight-bold" style="top: 6px;">User Name</label>
                                    <div class="col-9 kformtop" style="left: -111px;">
                                        <input type="text" readonly class="form-control" ng-model="DataContent.UserName" ng-disabled="DisabledUserName" required>
                                    </div>
                                </div>
                                <div class="form-group row m-0 pb-2" ng-if="DataContent.UserId == 0">
                                    <label class="col-3 col-form-label font-weight-bold">User Name</label>
                                    <div class="col-9 kformtop inputWithIcon">
                                        <i class="fas fa-user"></i>
                                        <input type="text" class="form-control" placeholder="User Name" ng-model="DataContent.UserName" ng-disabled="DisabledUserName" required>
                                    </div>
                                </div>
                                <div class="form-group row m-0 pb-2">
                                    <label for="BreedName" class="col-3 col-form-label font-weight-bold"
                                    style="left: 788px;
                                           top: -53px;">
                                           Full Name</label>
                                    <div class="col-9 kformtop inputWithIcon inputIconBg" 
                                    style="padding-top: 1px !important;
                                            left: 670px;
                                            top: -58px;}">
                                        <input type="text" class="form-control" placeholder="Full Name" id="BreedName" ng-model="DataContent.FullName" ng-disabled="Disabled" required>
                                        <i class="fa fa-user fa-lg fa-fw" aria-hidden="true"></i>
                                    </div>
                                </div>
                            </div>
@*                             <div class="col-6 k-alteracaoform">
                                <div class="form-group row m-0 pb-2">
                                    <label for="Type" class="col-3 col-form-label font-weight-bold">Admin</label>
                                    <div class="col-9">
                                        <input type="checkbox" class="checkBoxStyle" id="box-1" ng-model="DataContent.AdminAltaUser" ng-disabled="Disabled">
                                        <label for="box-1">
                                        </label>
                                    </div>
                                </div> *@
@*                                 <div class="form-group row m-0 pb-2">
                                    <label for="Type" class="col-3 col-form-label font-weight-bold">Active</label>
                                    <div class="col-9">
                                        <input type="checkbox" class="checkBoxStyle" id="box-2" ng-model="DataContent.Active" ng-disabled="Disabled">
                                        <label for="box-2">
                                        </label>
                                    </div>
                                </div> *@
                                <div class="form-group row m-0 pb-2">
                                    <label for="Type" class="col-3 col-form-label font-weight-bold"
                                    style="
                                    top: 79px;
                                    left: -848px;
                                    padding-bottom: 26px !important;
                                    padding-right: 0px;
                                    margin-right: 95px !important;">Select Facility</label>
                                    <div class="col-9">
                                        <select class="form-control edicaoCampoCurrentFacility" ng-disabled="Disabled"
                                                ng-model="DataContent.CurrentLab" ng-options="opt.AltaLabId as opt.AltaLabName for opt in List_Labs" style="left: -743px !important; top: 14px !important;"></select>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                        <div class="card-body p-2">
                                <button class="k-button" id="expand">Expand All</button>
                                <button class="k-button" id="collapse">Collapse All</button>
                            <div id="grid"></div>
                        </div>
@*                     <div class="card-body p-2 border-top">
                        <div class="card-body p-2">
                            <kendo-grid options="gridOptions" id="grid"></kendo-grid>
                        </div>
                    </div> *@
                </div>
            </form>
        </div>
        <div class="text-center p-5 border ShowDiv" id="DivSpinner">
            <img src="~/Content/img/animated_spinner.gif" width="50" />
        </div>
    </div>
</div>

<script type="text/javascript">
    $(document).ready(function() {
                    $("#grid").kendoGrid({
                        height: 543,
                        filterable: false,
                        scrollable: {
                            endless: true
                        },
                        resizable: false,
                        dataBound: function() {
                        this.expandRow(this.tbody.find("tr.k-master-row").first());
                        },
                        columns: (
                            { field: "PageName", title:"Menu Items", width: 200 },
                            { field: "PageGroupName", groupHeaderTemplate: "#= value # &nbsp; <input type='checkbox' id='check-edit' class='checkbox AlignCheckGroup'><label class='checkbox' for='check-edit'></label>"},
                            { field: "Read",
                            template: "<input type='checkbox' class='checkbox' name='testeBrabo' />",
                            headerTemplate: kendo.template('# if (true) { # <input type="checkbox" id="check-all" class="cssCheckUserMagRead" /><label for="check-all" class="cssLabelUserMagRead">Read</label> # } else { # this will never be displayed # } #'), width: 120},
                            { field: "Edit",
                            template: "<input type='checkbox' class='checkbox' name='check-edit' />",
                            headerTemplate: kendo.template('# if (true) { # <input type="checkbox" id="check-edit" class="cssCheckUserMagEdit" /><label for="check-edit" class="cssLabelUserMagEdit">Edit</label> # } else { # this will never be displayed # } #'), width: 120},
                            { field: "Special Permissions", template: "<input type='checkbox' class='checkbox' />", filterable: { multi: true}, width: 130 }
                        )
                    });
                    debugger;
                    $(document).on('change', '.cssCheckUserMagRead', function () {
                        $("input(name=testeBrabo)").prop({
                            checked: this.checked,
                            disabled: this.checked
                        });
                    });
                    $(document).on('change', '.cssCheckUserMagEdit', function () {
                        $("input(name=check-edit)").prop({
                            checked: this.checked,
                            disabled: this.checked
                        });
                    });
                    GridBind();
                });
                function GridBind() {
                var grid = $("#grid").data("kendoGrid");
                grid.hideColumn("PageGroupName");
                grid.hideColumn("Special Permissions");

                var dataSource = new kendo.data.DataSource({
                    schema: {
                        model: {
                            fields: {
                                PageGroupID: { type: "number" },
                                PageGroupName: { type: "string" },
                                PageName: { type: "string" },
                                Read: {type: "boolean"},
                                Edit: {type: "boolean"},
                                Active: { type: "boolean" },
                                PageID: { type: "number" }
                            }
                        }
                    },
                    group: ({field: "PageGroupName"}),
                    aggregate: (
                    { field: "PageName", aggregate: "max" }
                    ),
                    transport: {
                        read: function (e) {
                            $.ajax({
                                url: '/Administration/UserManagement/Get_GroupList/',
                                dataType: "json",
                                cache: false,
                                type: "GET",
                                success: function (result) {
                                    e.success(result);
                                },
                                error: function (result) {
                                    e.error(result);
                                }
                            });
                        }
                    },
                    pageSize: 14
                });
                grid.setDataSource(dataSource);
                grid.dataSource.fetch();
            }
                // Função para mudar o botão de Expand all e Collapse All --- INICIO -----
                $('#expand').click(function(e){
                var grid = $("#grid").data("kendoGrid");
                $( ".k-grouping-row" ).each(function( index ) {
                    grid.expandRow(this);
                });
                })

                $('#collapse').click(function(e){
                var grid = $("#grid").data("kendoGrid");
                $( ".k-grouping-row" ).each(function( index ) {
                    grid.collapseRow(this);
                });
                })

               $( document ).ready(function() {
                    $( "#expand" ).hide(); //expand

                    $( "#collapse" ).click(function() { //collapse
                    $('div.panel-expand').addClass('in').css("height", "");
                    $( "#collapse" ).hide(); //collapse
                    $( "#expand" ).show(); //expand
                    });

                    $( "#expand" ).click(function() { //expand
                    $('div.panel-expand').removeClass('in'); //expand
                    $( "#collapse" ).show(); //collapse
                    $( "#expand" ).hide(); //expand
                    });

                    //$( "div.panel a" ).click(function() {
                        //$('div.panel-expand').each(function( index ) { //expand
                       // if($( this ).hasClass('in') ){
                       // $( "#collapse" ).show(); //collapse
                      //  $( "#expand" ).hide(); //expand
                      //  }
                      //  });
                   // });

                });
                
</script>

<script src="~/Content/js/AngularJS_Ctrls/Services.js"></script>
<script src="~/Content/js/AngularJS_Ctrls/app.js"></script>
<script src="~/Content/js/AngularJS_Ctrls/Administration/UserMng.js"></script>
<script src="https://kit.fontawesome.com/e03cdc4972.js" crossorigin="anonymous"></script>
  1. Model
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Site.Models {
    public class UserGroupManagement {
        public int PageID { get; set; }
        public int PageGroupID { get; set; }
        public string PageName { get; set; }
        public string PageGroupName { get; set; }
        public bool? Active { get; set; }
    }
}
  1. Controller
using Altatwo.Model;
using Application.Interfaces;
using System.Collections.Generic;
using System.IO;
using System.Web.Mvc;
using System.Linq;

namespace Site.Controllers.Administration {
    (Site.Utils.CheckPermission)
    public class UserManagementController : Controller {
        private readonly IUserAppService _userApp;
        private readonly IFacilityAppService _facility;
        private string CurrentUserName = Site.Utils.User.GetCurrentUser().UserName;

        public UserManagementController(IUserAppService userApp, IFacilityAppService facility) {
            _userApp = userApp;
            _facility = facility;
        }

        public ActionResult Index() {
            var user = _userApp.GetUserDefByName(CurrentUserName);

            ViewBag.CanEdit = user.CanEdit;
            ViewBag.Active = user.Active;

            return View(Utils.CheckPermission.ReturnViewAdministration("~/Views/Administration/UserManagement/Index.cshtml"), new Site.Models.ModuleViewModel { Module = "Administration", SubModule = "User Management" });
        }
        public ActionResult New() {
            int userId = _userApp.GetUserID(CurrentUserName);
            int currentLab = _userApp.GetUserCurrentLabID(userId);

            var user = _userApp.GetUser(null, CurrentUserName);

            ViewBag.CurrentLab = currentLab;
            ViewBag.CanEdit = user.CanEdit;
            ViewBag.ID = "";

            var model = new {
                SomeParam = "Some value"
            };
            return View(Utils.CheckPermission.ReturnViewAdministration("~/Views/Administration/UserManagement/Edit.cshtml"), new Site.Models.ModuleViewModel { Module = "Administration", SubModule = "User Management" });
        }
        public ActionResult Edit(string id) {
            int userId = _userApp.GetUserID(CurrentUserName);
            int currentLab = _userApp.GetUserCurrentLabID(userId);

            var user = _userApp.GetUser(null, CurrentUserName);

            ViewBag.CurrentLab = currentLab;
            ViewBag.CanEdit = user.CanEdit;
            ViewBag.ID = id;

            return View(Utils.CheckPermission.ReturnViewAdministration("~/Views/Administration/UserManagement/Edit.cshtml"), new Site.Models.ModuleViewModel { Module = "Administration", SubModule = "User Management" });
        }

        #region Get Data for List
        public JsonResult Get_List() {
            int userId = _userApp.GetUserID(CurrentUserName);
            return Json(_userApp.Get_List(userId), JsonRequestBehavior.AllowGet);
        }

        public JsonResult Get_GroupList() {
            return Json(_userApp.Get_GroupList(), JsonRequestBehavior.AllowGet);
        }
        #endregion

        #region Get Data for Record
        public JsonResult Get_New() {
            int userId = _userApp.GetUserID(CurrentUserName);
            User data = new User {
                Active = false,
                CanEdit = true
            };

            return Json(data, JsonRequestBehavior.AllowGet);
        }
        public JsonResult Get_Data(string id) {
            int userId = _userApp.GetUserID(CurrentUserName);
            var user = _userApp.GetUser(null, CurrentUserName);

            int iID = 0;
            User data = new User();

            if (int.TryParse(id, out iID)) {
                data = _userApp.GetUser(iID, null);
            }

            return Json(data, JsonRequestBehavior.AllowGet);
        }
        #endregion

        #region Associeate Labs
        public JsonResult Lab_List() {
            int userId = _userApp.GetUserID(CurrentUserName);
            return Json(_facility.Get_List(userId), JsonRequestBehavior.AllowGet);
        }
        public JsonResult AssociatedLab_List(string id) {
            int Iid = 0;
            List<AltaLabList> list = new List<AltaLabList>();

            if (int.TryParse(id, out Iid)) {
                list = _userApp.GetUserAssociatedLabs(Iid).Where(x => x.AltaLabId > 0).ToList();
            }

            return Json(list, JsonRequestBehavior.AllowGet);
        }
        #endregion

        (HttpPost)
        public JsonResult Save(User usr) {
            string _return = "0"; // CurrentUserName

            if (usr.UserId > 0) {
                // UPDATE
                _userApp.Update(usr);
                _return = "1";

            }
            else {
                // INSERT
                if (!_userApp.UserExists(usr.UserName)) {
                    usr.UserLanguage = "en-US";
                    _userApp.Insert(usr);
                    _return = "1";
                }
            }

            return Json(_return, JsonRequestBehavior.AllowGet);

        }

        public FileResult ExportToExcel() {
            int userId = _userApp.GetUserID(CurrentUserName);
            byte() outPdfBuffer = _userApp.ExportToExcel(_userApp.Get_List(userId));
            MemoryStream m = new MemoryStream(outPdfBuffer);

            return File(m, "application/vnd.ms-excel");
        }
    }
}
  1. Controller JS
app.controller('Controller', function ($scope, $http, $window, EditItem) {
    var url_GetNew = '/Administration/UserManagement/Get_New/';
    var url_GetData = '/Administration/UserManagement/Get_Data/';
    var url_Cancel = '/Administration/UserManagement';
    var url_Save = '/Administration/UserManagement/Save';
    var url_List = '/Administration/UserManagement?sbm=1';

    $scope.ID = '';
    $scope.DataContent = ();
    $scope.Disabled = true;
    $scope.List_AssociatedLabs = ();
    $scope.List_GroupListPermission = ();

    $scope.List_Labs = ();
    $scope.List_LabsFiltered = ();

    $scope.init = function (ID) {
        InitLoadData(ID);
    };  
    $scope.Btn_Cancel = function () {
        $window.location.href = url_Cancel;
    };
    $scope.Btn_Save = function () {
        $scope.DataContent.GroupListPermission = $scope.List_GroupListPermission;
        EditItem.Save(url_Save, $scope.DataContent).then(function (resp) {
            if (resp.data === '0') {
                ShowNotification('error', 'The code entered is already registered.');
            }
            else {
                $window.location.href = url_List;
            }
        });
    };

    function InitLoadData(ID) {
        $scope.ID = ID;
        EditItem.ShowSpinner();
        $scope.Disabled = false;
        EditItem.Init(ID, url_GetNew, url_GetData).then(function (resp) {
            $scope.DataContent = resp;
            EditItem.ShowContent();
            LoadlistGroupAssociated();            
        });
    }

    function LoadlistGroupAssociated(){
        $.ajax({
            url: '/Administration/UserManagement/Get_GroupList/',
            dataType: "json",
            cache: false,
            type: "GET",
            success: function (result) {
                var listaPermissoesGrid = ();

                result.forEach(e => {
                    var listaFiltrada = $scope.DataContent.GroupListPermission.filter((elem) => {
                        result (elem.groupManagement.PageID === e.PageID);
                    });
                    if ( listaFiltrada.length > 0 ) {
                        listaPermissoesGrid.push( listaFiltrada(0).groupManagement );
                    } else {
                        listaPermissoesGrid.push( e ); 
                    }
                });


                $scope.List_GroupListPermission = listaPermissoesGrid;
            },
            error: function (result) {
                //
            }
        });

    }

    function LabName(id) {
        var name = "";        
        for (var i = 0; i < $scope.List_Labs.length; i++) {
            if ($scope.List_Labs(i).AltaLabId === id) {
                name = $scope.List_Labs(i).AltaLabName;
            }
        }
        return name;
    }

    function Load_List_AssociatedLabs() {
        $http.get('/Administration/UserManagement/AssociatedLab_List/' + $scope.ID)
            .then(function (resp) {
                $scope.List_AssociatedLabs = resp.data;    
                Load_List_Labs();
            });
    }
    function Load_List_Labs() {
        $http.get('/Administration/UserManagement/Lab_List/')
            .then(function (resp) {
                $scope.List_Labs = resp.data;
                Filter_List_Labs();
            });
    }
    function Filter_List_Labs() {
        var list = ();
        var has = false;

        for (var i = 0; i < $scope.List_Labs.length; i++) {
            has = false;
            for (var j = 0; j < $scope.List_AssociatedLabs.length; j++) {
                if ($scope.List_Labs(i).AltaLabId === $scope.List_AssociatedLabs(j).AltaLabId) {
                    has = true;                    
                } 
            }
            if (!has) {
                list.push($scope.List_Labs(i));
            }
        }

        $scope.List_LabsFiltered = list;
        $scope.gridDataSource.read();
    }
    
});


Quero editar as permissões de um usuario
(Demonstrativo do sistema1

Quando coloco o breakpoint no metodo de salvar. Cai no meu user, e o GroupListPermission está vindo null (que e aonde que teria que estar meus dados dos checkbox )

Dados que chega quando clico em salvar