- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 03:10 AM
Hello.
I have a UIaction button "accept contract", when this is clicked and the value u_singed_contract becomes TRUE.
I want to hide the UIaction button. I tried to do it with a ui policy that said "when u_signed_contract = true" "accept contract visible = FALSE".
This did not work, any tips?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 05:26 AM
var conditions_hidestudbutton = Class.create();
conditions_hidestudbutton.prototype = Object.extendsObject(AbstractAjaxProcessor, {
function isContractSigned(current) {
return current.u_contract_signed_student; // if this is true, it will return true and you will be able to see the UI action else not
},
type: 'conditions_hidestudbutton'
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 03:32 AM
new contracthide().method_name_from_script_include();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 03:44 AM
will i need both a new script include and client script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 03:59 AM
No, you will not need both.
You can do all the checks in your script include and return either true or false. Based on that the visibility of the UI action will be controlled. If its true the UI action will be visible else not.
If its in condition you can just add
&& current.u_signed_contract = true
If in script include
new contracthide().method_name_from_script_include(current);
Because now you have passed current in the parameter, you can access current.u_signed_contract there
Then do the check and return true or false accordingly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 04:38 AM
Been sitting trying to do this but i just dont think i understood it.
Got a scriptinclude now,with:
var conditions_hidestudbutton = Class.create();
conditions_hidestudbutton.prototype = {
initialize: function() {
(current.u_contract_signed_student == true)
},
type: 'conditions_hidestudbutton'
};
Think this will work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 05:26 AM
var conditions_hidestudbutton = Class.create();
conditions_hidestudbutton.prototype = Object.extendsObject(AbstractAjaxProcessor, {
function isContractSigned(current) {
return current.u_contract_signed_student; // if this is true, it will return true and you will be able to see the UI action else not
},
type: 'conditions_hidestudbutton'
});