Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/confirm modal #770

Merged
merged 7 commits into from
Jul 10, 2019
Merged

Feature/confirm modal #770

merged 7 commits into from
Jul 10, 2019

Conversation

ibelar
Copy link
Contributor

@ibelar ibelar commented Jul 5, 2019

Implementation of confirm dialog using Fomantic UI modal (see ticket fix #763 ).

Simple use:

$view->on('click', $actions, ['confirm' => 'Are you sure?']);

Screen Shot 2019-07-05 at 3 02 02 PM

Screen Shot 2019-07-05 at 3 01 19 PM

Note: Setting up atkAjaxec manually using confirm will still use the old alert dialog.

Possible workaround:

// if your previous code look like below
$table->on('click', 'a.delete')->atkAjaxec(['uri'=>$url, 'confirm'=>'Sure???']);

// change to this one, for using a modal confirmation
$table->on('click', 'a.delete', null, ['confirm'=>'Sure???''])->atkAjaxec(['uri'=>$url]);

Note:

atkjs-ui need rebuild

@PhilippGrashoff
Copy link
Collaborator

PhilippGrashoff commented Jul 7, 2019

love this :) #437

@pkly
Copy link
Contributor

pkly commented Jul 8, 2019

I already wrote an element similar to this for myself, but this is rather nice, since it's JS-based rather than a full html element.
Does this also affect atk4/data elements as well? Like CRUD and such, since those have rather ugly regular stock confirm pop-ups...

@ibelar
Copy link
Contributor Author

ibelar commented Jul 8, 2019

@pkly Grid - CRUD delete column will also use this new modal for confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Button should have confirm ability
4 participants