Hello,
Is there a way to ensure a label must be entered before publishing or updating a page?
A popup should appear if no label is entered.
First I tried including a JavaScript in custom HTML:
<script type="text/javascript" src="/confluence/includes/js/label_alert.js"></script>
At the moment the script looks like this:
<script type="text/javascript">
AJS.toInit(function(){
AJS.$('#rte-button-publish').click(function(e){
alert("Please add at least one or more labels");
});
});
</script>
I have the code from this post: Solved: Mandatory labels in Confluence
Since it is the first time that I do something with custom html and javascript, I do not know if it is correct at all. In any case, I don’t get any alerts.
I am now trying to develop my own plugin.
Can you guide me in the right way so that I habe a good start and can achieve my goal?
I would be grateful for any help!