Base solution for your next web application

Activities of "dev1_premierpoint"

I thought there might be another file I needed to edit. There doesn't seem to be anything here for the new modal.


using System; using System.Threading.Tasks; using Abp.AspNetCore.Mvc.Authorization; using Microsoft.AspNetCore.Mvc; using Pol.Web.Areas.App.Models.SyncPoints; using Pol.Web.Controllers; using Pol.Authorization; using Pol.TermSync; using Pol.TermSync.Dtos; using Abp.Application.Services.Dto; using Abp.Extensions;

namespace Pol.Web.Areas.App.Controllers { [Area("App")] [AbpMvcAuthorize(AppPermissions.Pages_SyncPoints)] public class SyncPointsController : PolControllerBase { private readonly ISyncPointsAppService _syncPointsAppService;

    public SyncPointsController(ISyncPointsAppService syncPointsAppService)
    {
        _syncPointsAppService = syncPointsAppService;
    }

    public ActionResult Index()
    {
        var model = new SyncPointsViewModel
		{
			FilterText = ""
		};

        return View(model);
    } 
   

		 [AbpMvcAuthorize(AppPermissions.Pages_SyncPoints_Create, AppPermissions.Pages_SyncPoints_Edit)]
		public async Task<PartialViewResult> CreateOrEditModal(string id)
		{
			GetSyncPointForEditOutput getSyncPointForEditOutput;

			if (!id.IsNullOrWhiteSpace()){
				getSyncPointForEditOutput = await _syncPointsAppService.GetSyncPointForEdit(new EntityDto<string> { Id = (string) id });
			}
			else {
				getSyncPointForEditOutput = new GetSyncPointForEditOutput{
					SyncPoint = new CreateOrEditSyncPointDto()
				};
			getSyncPointForEditOutput.SyncPoint.lastRun = DateTime.Now;
			}

			var viewModel = new CreateOrEditSyncPointModalViewModel()
			{
				SyncPoint = getSyncPointForEditOutput.SyncPoint,                
			};

			return PartialView("_CreateOrEditModal", viewModel);
		}
		

    public async Task<PartialViewResult> ViewSyncPointModal(string id)
    {
		var getSyncPointForViewDto = await _syncPointsAppService.GetSyncPointForView(id);

        var model = new SyncPointViewModel()
        {
            SyncPoint = getSyncPointForViewDto.SyncPoint
        };

        return PartialView("_ViewSyncPointModal", model);
    }


}

}


I guess that I need a new task here for the new modal?

Product version: ASP.NET Zero v9.1 Product type: MVC & jQuery Product framework type: .NET Core

I am trying to pass information into a modal (a UUID in order to lookup an object once I have the modal open and an integer that is actually a language code), and I'm not sure if there is an interaction with the modalManager that is used to create these modals that is preventing more standard methods of passing information from working or if I have some other problem.

I've tried having hidden fields on the page that I populate by trying to set the value of those fields in the on click method. example: $('#btnCreateNewLabel').on('click', async function () { $(".modal-body #syncPointId").val(syncPointID); .... With #syncPointId being one of the fields on the modal in this example. This method never seems to pass anything into the modal.

I've tried something similar with the on 'show.bs.modal' event example: $('#CreateOrEditLabelModal').on('show.bs.modal', function (e) { $(e.currentTarget).find('input[name="syncPointId"]').val(syncPointID)

I guess I am wondering if there is a method that works better with the ModalManager that I am unaware of or if there is an issue with my setup.

Something that may be important to note is that the page is already currently in a modal when I am trying to pass this information into another smaller modal.

Appreciate the help. It was challenging to find information online about this one. Quite of few examples of more standard modal usage, but no examples that worked with the boilerplate you've got going on here.

Showing 61 to 63 of 63 entries