TT#30374 fix BillingProfile create button

Change-Id: I9dcfa69ab4ffe8f29b48d740298ef888e4dd7314
changes/50/18550/4
Gerhard Jungwirth 8 years ago
parent 30e66ad9e2
commit e4253f510e

@ -515,7 +515,7 @@ sub reseller_create :Chained('reseller_list') :PathPart('create') :Args(0) {
form => $form,
fields => {'contact.create' => $c->uri_for('/contact/create/noreseller'),
'billing_profile.create' => $c->uri_for('/billing/create/noreseller'),
'billing_profile.create' => $c->uri_for('/billing/create/noreseller'),
'billing_profiles.profile.create' => $c->uri_for('/billing/create/noreseller'),
},
back_uri => $c->req->uri,
);

@ -19,7 +19,6 @@ has_field 'create' => (
do_label => 0,
value => 'Create Billing Network',
element_class => [qw/btn btn-tertiary pull-right/],
element_attr => { onclick => 'this.form.submit();return false;' }, #without this, only the first create button works
);
no Moose;

@ -19,7 +19,6 @@ has_field 'create' => (
do_label => 0,
value => 'Create Billing Profile',
element_class => [qw/btn btn-tertiary pull-right/],
element_attr => { onclick => 'this.form.submit();return false;' }, #without this, only the first create button works
);
no Moose;

@ -19,7 +19,6 @@ has_field 'create' => (
do_label => 0,
value => 'Create Profile Package',
element_class => [qw/btn btn-tertiary pull-right/],
#element_attr => { onclick => 'this.form.submit();return false;' }, #without this, only the first create button works
);
no Moose;

@ -31,50 +31,18 @@
var modalFormScript = function (formitem,repeat) {
$('#mod_edit').modal({keyboard: false, backdrop: 'static'});
$('.mod_close').click(function(event) {
[%IF m.close_target_direct%]
[%m.close_target_direct%]
[%ELSIF m.ajax_load%]
$('#mod_edit').modal('hide');
$('#mod_edit').parent('div').html('');
[%ELSE%]
console.log("redirecting to [% m.close_target ? m.close_target : c.uri_for() %]");
window.location.href="[% m.close_target ? m.close_target : c.uri_for() %]";
[%END%]
});
[%IF m.ajax_load%]
$('#mod_edit script').each(function( key, value ) {
eval(value.innerHTML);
});
[%END%]
// on clicking a button within the form, add a hidden field "submitid"
// determining the name of the button being clicked
$('input[type=button]').click(function() {
$('#mod_edit form').on("click", "input[type=button]", function() {
$(this).parents('form').find('#submitid').attr('value', $(this).attr('name'));
[%IF !m.ajax_load%]
$(this).parents('form').submit();
[%ELSE%]
$('#mod_edit').modal('hide');
processModalFormAjax($(this).parents('form'),function(status,form){
//alert('in callback: status='+status);
if( status == 'error' ){
modalFormScript(formitem);
}
if( status != 'error' ){
//form object is necessary to compose uri for refresh
[%IF m.ajax_list_refresh%]
refreshAjaxList( '[%m.ajax_list_refresh%]', form );
[%END%]
$('#mod_edit').parent('div').html('');
}
[%m.ajax_callback%]
});
[%END%]
});
};
[%IF !m.ajax_load%]$(modalFormScript);[%ELSE%]
//$('#'+$(this).parents('form').id()+' :input:enabled:visible:first').focus();
[%END%]
$(modalFormScript);
</script>
[% END -%]

Loading…
Cancel
Save