MT#9177 Fix model form look.

(cherry picked from commit 1d6c29da2f9f0f5628f0a62fdd8fd2fd42478609)

Conflicts:
	lib/NGCP/Panel/Form/Device/Model.pm
changes/52/552/1
Irina Peshinskaya 11 years ago
parent 0de3a2ab1c
commit 8d134d191d

@ -220,7 +220,7 @@ has_field 'bootstrap_config_http_sync_uri' => (
required => 0,
label => 'Bootstrap Sync URI',
default => 'http://[% client.ip %]/admin/resync',
wrapper_class => [qw/bootstrap_config bootstrap_config_http/],
wrapper_class => [qw/ngcp-bootstrap-config ngcp-bootstrap-config-http/],
element_attr => {
rel => ['tooltip'],
title => ['The sync URI to set the provisioning server of the device (e.g. http://client.ip/admin/resync. The client.ip variable is automatically expanded during provisioning time.'],
@ -236,28 +236,25 @@ has_field 'bootstrap_config_http_sync_method' => (
{ label => 'POST', value => 'POST' },
],
default => 'GET',
wrapper_class => [qw/bootstrap_config bootstrap_config_http/],
wrapper_class => [qw/ngcp-bootstrap-config ngcp-bootstrap-config-http/],
element_attr => {
rel => ['tooltip'],
title => ['The HTTP method to set the provisioning server (one of GET, POST).'],
},
);
has_field 'bootstrap_config_http_sync_params' => (
type => 'Text',
required => 0,
label => 'Bootstrap Sync Parameters',
default => '[% server.uri %]/$MA',
wrapper_class => [qw/bootstrap_config bootstrap_config_http/],
wrapper_class => [qw/ngcp-bootstrap-config ngcp-bootstrap-config-http/],
element_attr => {
rel => ['tooltip'],
title => ['The parameters appended to the sync URI when setting the provisioning server, e.g. server.uri/$MA. The server.uri variable is automatically expanded during provisioning time.'],
},
);
has_field 'save' => (
type => 'Submit',
value => 'Save',

@ -6,10 +6,11 @@
</span>
</div>
[% back_created = 1 -%]
<script>
function bootstrapDynamicFields(selectedValue){
$('.bootstrap_config').css("display","none");
$('.bootstrap_config_'+selectedValue).css("display","inline");
$('.ngcp-bootstrap-config').css("display","none");
$('.ngcp-bootstrap-config-'+selectedValue).css("display","block");
}
function vendor2bootstrapMethod(vendorField){
var bootstrapMethod='';
@ -38,11 +39,10 @@ function vendor2bootstrapMethod(vendorField){
bootstrapMethodField.options[i].selected = true;
}
}
bootstrapDynamicFields(bootstrapMethod);
}
</script>
<style>
.bootstrap_config {display:none;}
</style>
<div class="row">
[% FOREACH m IN messages -%]
<div class="alert alert-[% m.type %]">[% m.text %]</div>

Loading…
Cancel
Save