1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-29 18:50:08 +03:00

Bug #3980: Fix hidden wizardForm

This commit is contained in:
Carlos Martín 2015-09-14 12:09:52 +02:00
parent 1b0542b7b2
commit 057708778b
3 changed files with 9 additions and 8 deletions

View File

@ -728,8 +728,8 @@ define(function(require) {
if (!formPanelInstance) {
formContext =
$('<div class="tabs-content tabs-contentForm" form-panel-id="'+formPanelId+'">\
<div class="content active" id="wizardForms"></div>\
<div class="content" id="advancedForms"></div>\
<div class="wizardForms content active" id="'+tab.tabName+'-wizardForms"></div>\
<div class="advancedForms content" id="'+tab.tabName+'-advancedForms"></div>\
</div>').appendTo( $(".contentForm", context) );
// Create panelInstance, insert in the DOM and setup
@ -753,6 +753,7 @@ define(function(require) {
$(".wizard_tabs", context).show();
} else {
$(".wizard_tabs", context).hide();
$('a[href="#'+tab.tabName+'-wizardForms"]', context).click();
}
// Hide reset button if not defined
@ -783,9 +784,9 @@ define(function(require) {
setTimeout(function() {
var formPanelInstance = SunstoneCfg["tabs"][tabId].activeFormPanel
if ($("#wizardForms.active", context).length > 0) {
if ($(".wizardForms.active", context).length > 0) {
$('#' + formPanelInstance.formPanelId + 'Wizard').submit();
} else if ($("#advancedForms.active", context).length > 0) {
} else if ($(".advancedForms.active", context).length > 0) {
$('#' + formPanelInstance.formPanelId + 'Advanced').submit();
}
}, 13)

View File

@ -64,10 +64,10 @@
</span>
<dl class="tabs right wizard_tabs" data-tab style="margin-left: 10px;">
<dd id="wizard_mode" class="active">
<a style="padding: 0.3rem 1rem;" href="#wizardForms">{{tr "Wizard"}}</a>
<a style="padding: 0.3rem 1rem;" href="#{{customId}}-wizardForms">{{tr "Wizard"}}</a>
</dd>
<dd id="advanced_mode">
<a style="padding: 0.3rem 1rem;" id="advanced_mode_a" href="#advancedForms">{{tr "Advanced"}}</a>
<a style="padding: 0.3rem 1rem;" href="#{{customId}}-advancedForms">{{tr "Advanced"}}</a>
</dd>
</dl>
</span>

View File

@ -23,9 +23,9 @@ define(function(require) {
function _insert(context) {
var that = this;
this.wizardElement = $(that.htmlWizard()).appendTo( $("#wizardForms", context) );
this.wizardElement = $(that.htmlWizard()).appendTo( $(".wizardForms", context) );
if (that.htmlAdvanced) {
this.advancedElement = $(that.htmlAdvanced()).appendTo( $("#advancedForms", context) );
this.advancedElement = $(that.htmlAdvanced()).appendTo( $(".advancedForms", context) );
}
context.off('invalid.fndtn.abide', '#' + that.formPanelId + 'Wizard');