Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Blueprint wizard JS is ignored

Hi to all,

I created a own blueprint plugin based on the Atlassian tutorial simple / intermediate.

Everything works fine (page created / title set by context provider), but the rules I attached in my JavaScript file are ignored. I also tried to push a simple alert to the front end, it will be ignored also.

I can´t see any wrong code, also the script works in the first versions of my plugin.

Soy

{namespace SlaBpPlugin.Blueprints.Simple}
/**
* A form to insert SLA data
*/
{template .page1Form}
<form action="#" method="post" class="aui">
<fieldset>
<div class="field-group">
<label for="slaId">{getText('slabp.form.label.title.slaId')} <span class="aui-icon icon-required">required</span></label>
<input id="slaId" class="text" type="text" name="slaId">
</div>
<div class="field-group">
<label for="slaName">{getText('slabp.form.label.title.slaName')} <span class="aui-icon icon-required">required</span></label>
<input id="slaName" class="text" type="text" name="slaName">
</div>
<div class="field-group">
<label for="slaDescription">{getText('slabp.form.label.title.slaDescription')}</label>
<input id="slaDescription" class="text" type="text" name="slaDescription">
</div>
<div class="field-group">
<label for="template-key">{getText('slabp.form.label.templatekey')}</label>
<select id="template-key" class="select" name="contentTemplateKey">
<option value="sla_de_bp01">{getText('slabp.blueprint.title.sla_de_bp01')}</option>
<option value="sla_at_bp01">{getText('slabp.blueprint.title.sla_at_bp01')}</option>
</select>
</div>
</fieldset>
</form>
{/template}

 

JS

Confluence.Blueprint.setWizard('com.riso.confluence.addon.slabp.slabp:create-by-sample-template', function(wizard) {
wizard.on('submit.page1Id', function(e, state) {
var slaId = state.pageData.slaId;
var slaName = state.pageData.slaName;

if (!slaId){
alert('Please provide an ID for this SLA.');
return false;
}
if (!slaName){
alert('Please provide a name for this SLA.');
return false;
}
});
});

XML

<atlassian-plugin key="${atlassian.plugin.key}" name="${project.name}" plugins-version="2">
<plugin-info>
<description>${project.description}</description>
<version>${project.version}</version>
<vendor name="${project.organization.name}" url="${project.organization.url}" />
<param name="plugin-icon">images/pluginIcon.png</param>
<param name="plugin-logo">images/pluginLogo.png</param>
</plugin-info>

<!-- add our i18n resource -->
<resource type="i18n" name="i18n" location="slabp"/>

<!-- add our web resources -->
<web-resource key="slabp-resources" name="slabp Web Resources">
<dependency>com.atlassian.auiplugin:ajs</dependency>
<dependency>com.atlassian.confluence.plugins.confluence-create-content-plugin:resources</dependency>

<transformation extension="soy">
<transformer key="soyTransformer">
<functions>com.atlassian.confluence.plugins.soy:soy-core-functions
</functions>
</transformer>
</transformation>

<resource type="download" name="slabp.css" location="/css/slabp.css" />
<resource type="download" name="slabp.js" location="/js/slabp.js" />
<resource type="download" name="slabp.soy.js" location="/soy/slabp.soy" />
<resource type="download" name="images/" location="/images" />

<context>create-content</context>
</web-resource>

<!-- Template for Blueprint -->
<content-template key="sla_de_bp01" i18n-name-key="slabp.blueprint.title.sla_de_bp01">
<resource name="template" type="download" location="/templates/sla_de_bp01.xml" />
context-provider class="com.riso.confluence.addon.slabp.SlaBpContextProvider" />
</content-template>
<!-- Second Template for Blueprint -->
<content-template key="sla_at_bp01" i18n-name-key="slabp.blueprint.title.sla_at_bp01">
<resource name="template" type="download" location="/templates/sla_at_bp01.xml" />
</content-template>

<!-- Add to the Create Menu -->
<web-item key="create-by-sample-template" i18n-name-key="slabp.create-link.title" section="system.create.dialog/content">
<description key="slabp.create-link.description" />
<resource name="icon" type="download" location="/images/templateSymbol.png" />
<param name="blueprintKey" value="sla-blueprint" />
</web-item>

<!-- Blueprint -->
<blueprint key="sla-blueprint" index-key="my-index" i18n-name-key="slabp.name"
how-to-use-template="SlaBpPlugin.Blueprints.Simple.letsGetStarted">
<content-template ref="sla_de_bp01" />
<content-template ref="sla_at_bp01" />
<dialog-wizard key="slabp-wizard">
<dialog-page id="page1Id"
template-key="SlaBpPlugin.Blueprints.Simple.page1Form"
title-key="slabp.wizard.page1.title"
description-header-key="slabp.wizard.page1.desc.header"
description-content-key="slabp.wizard.page1.desc.content"
last="true" />
</dialog-wizard>
</blueprint>

</atlassian-plugin>

 

Regards

Uli

1 answer

1 accepted

0 votes
Answer accepted

Hello Uli,

Hope you are having a pleasant week. I would recommend sharing this at our Atlassian Developer Community, since those members would have more experience developing a blueprint for Confluence than here. 

This community is more end-users, whereas the Developer community has users who are also interested in developing for Atlassian products.

Let me know if you have any trouble!

Regards,

Shannon 

Hi Shannon,

 

thank you for your reply.

I opened an new issue in the developer community.

 

Regards

Uli

Like Shannon Spaniol likes this

Uli,

Thank you for letting me know! When it's resolved, you can also follow-up here and let us know the solution, in case anyone else ended up on Community with the same problem.

Regards,

Shannon

Like Shannon Spaniol likes this

Thank you for sharing, Uli! Hopefully someone there will be able to help you out.

Take care, and have a pleasant week.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

408 views 23 8
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you