I need advice to user that is going to delete a record
so i change button delete action
and create a new action "borrar" with following php code
the issue is how can i call again to default "delete" action and pass "submit_selectors" parameters?
so i change button delete action
$this->view->Toolbar->addButton("toolbar-button-remove","http://seden.es/es/component/chronoconnectivity5/?cont=lists&ccname=gestion_papers_list&act=borrar", "BORRAR", "http://congresoseden14.es/libraries/cegcore/assets/images/toolbar/remove.png", "submit_selectors");
and create a new action "borrar" with following php code
<?php
print "<script type=\"text/javascript\">";
print "alert('Are you sure?')";
print "</script>";
?>
the issue is how can i call again to default "delete" action and pass "submit_selectors" parameters?
Hello teldrive,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
What is the Custom Code action?
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
What is the Custom Code action?
P.S: I'm just an automated service😉
Thanks Calculus but in this case is a little more tricky, because is a CC issue,
the question is if I use a custom-delete-CC-function("borrar") that advice to user before delete records, so far is working only the advice, implemented with php+script, the issue is how can i call to default-delete-CC action and if submit_selectors are passed easily between actions
the question is if I use a custom-delete-CC-function("borrar") that advice to user before delete records, so far is working only the advice, implemented with php+script, the issue is how can i call to default-delete-CC action and if submit_selectors are passed easily between actions
Hi Teldrive,
Just replace "submit_selectors" by "your_function_name" and add the function to the page.
Regards,
Max
Just replace "submit_selectors" by "your_function_name" and add the function to the page.
Regards,
Max
Hi Max thank by reply
let me tell you what i have tried so far without results, i started with a simple message
another doubt arise is it posible to call "submit_selectors" from my custom function?
let me tell you what i have tried so far without results, i started with a simple message
function borrar_function()
{
print "<script type=\"text/javascript\">";
print "alert('Are you sure?')";
print "</script>";
}
$this->view->Toolbar->addButton("toolbar-button-remove","http://midomain/component/chronoconnectivity5/?cont=lists&ccname=gestion_papers_list&act=delete", "BORRAR", "http://midomain/libraries/cegcore/assets/images/toolbar/remove.png", "borrar_function()");
i tried also with borrar_function and borrar_function(); but it doesn't work
another doubt arise is it posible to call "submit_selectors" from my custom function?
function borrar_function()
{
print "<script type=\"text/javascript\">";
print "alert('Are you sure?')";
print "</script>";
submit_selectors();
}
Please try to use the "confirm" function instead of "alert":
function borrar_function()
{
var r=confirm("Are you sure ?");
if(r == true){
$("#admin_form").submit();
}
}
Hi Max , there are some advances,😉 after some testing i discovered that borrar_function has to be a JavaScript function so i set escape code in order to get correct performing, Now popup window appear, but after accept nothing goes, the issue remaining is the funcion to delete submit_selectors => $("#admin_form").submit(); i am not sure if is it php(I tried con escape php codes , also with http://midomain/component/chronoconnectivity5/?cont=lists&ccname=gestion_papers_list&act=delete but failed) or do I missing something
<script type="text/javascript">
function borrar_function()
{
var r=confirm("Are you sure ?");
if(r == true){
$("#admin_form").submit();
}
}
</script>
<?php
$this->view->Toolbar->addButton("toolbar-button-remove","http://midomain/component/chronoconnectivity5/?cont=lists&ccname=gestion_papers_list&act=delete", "BORRAR", "http://midomain/libraries/cegcore/assets/images/toolbar/remove.png", "borrar_function");
Hi Teldrive,
Yes, its JavaScript, I think that your implementation now is correct, what's the current problem ?
Regards,
Max
Yes, its JavaScript, I think that your implementation now is correct, what's the current problem ?
Regards,
Max
Hi Max, the remaining issue is when "accept" is pressed
seems to do nothing, what I need to do is to delete the records of "submited_selectors"
$("#admin_form").submit();
seems to do nothing, what I need to do is to delete the records of "submited_selectors"
Please try
That line of code should submit the form, does the form submit (or the page refreshes) or not ?
Regards,
Max
jQuery("#admin_form").submit();
?
That line of code should submit the form, does the form submit (or the page refreshes) or not ?
Regards,
Max
:D Thanks Max
it works perfect
it works perfect
<script type="text/javascript">
function borrar_function()
{
var r=confirm("Are you sure ?");
if(r == true){
jQuery("#admin_form").submit();
}
}
</script>
<?php
$this->view->Toolbar->addButton("toolbar-button-remove","http://midomain/component/chronoconnectivity5/?cont=lists&ccname=gestion_papers_list&act=delete", "BORRAR", "http://midomain/libraries/cegcore/assets/images/toolbar/remove.png", "borrar_function");
Hi Max
One question about this topic, is it possible to do the same override on this placeholder? How can i do?
_DELETE_: for a delete link
One question about this topic, is it possible to do the same override on this placeholder? How can i do?
_DELETE_: for a delete link
Hi Teldrive,
No, not possible, if you want to run a custom function then you must use the PHP version, you can replace "addButton" by "renderButton" in order to display the button directly.
Regards,
Max
No, not possible, if you want to run a custom function then you must use the PHP version, you can replace "addButton" by "renderButton" in order to display the button directly.
Regards,
Max
This topic is locked and no more replies can be posted.