TT#8950 Decorate readonly fields in the api doc

Change-Id: I5425f9280e576a16bd972a9a9f539f0f28ff3c0e
changes/89/11189/6
Irina Peshinskaya 8 years ago
parent d547234f25
commit 5a80eb6b55

@ -363,7 +363,7 @@ sub get_field_poperties :Private{
unless (defined $desc && length($desc) > 0) {
$desc = 'to be described ...';
}
return { name => $name, description => $desc, types => \@types, type_original => $field->type };
return { name => $name, description => $desc, types => \@types, type_original => $field->type, readonly => $field->readonly };
}
sub get_collection_properties {
my ($self, $form) = @_;

@ -54,6 +54,7 @@ has_field 'destinations.destination' => (
has_field 'destinations.simple_destination' => (
type => 'Text',
label => 'A simple destination format, e.g. "4312345" if it is a number, or "user@domain" if it is a URI.',
readonly => 1,
);
has_field 'destinations.timeout' => (

@ -116,7 +116,7 @@ has_field 'create_timestamp' => (
readonly => 1,
element_attr => {
rel => ['tooltip'],
title => ['Readonly. The datetime (YYYY-MM-DD HH:mm:ss) of the creation.']
title => ['The datetime (YYYY-MM-DD HH:mm:ss) of the creation.']
},
);
@ -126,7 +126,7 @@ has_field 'activate_timestamp' => (
readonly => 1,
element_attr => {
rel => ['tooltip'],
title => ['Readonly. The datetime (YYYY-MM-DD HH:mm:ss) of the activation.']
title => ['The datetime (YYYY-MM-DD HH:mm:ss) of the activation.']
},
);
@ -136,7 +136,7 @@ has_field 'modify_timestamp' => (
readonly => 1,
element_attr => {
rel => ['tooltip'],
title => ['Readonly. The datetime (YYYY-MM-DD HH:mm:ss) of the modification.']
title => ['The datetime (YYYY-MM-DD HH:mm:ss) of the modification.']
},
);
@ -146,7 +146,7 @@ has_field 'terminate_timestamp' => (
readonly => 1,
element_attr => {
rel => ['tooltip'],
title => ['Readonly. The datetime (YYYY-MM-DD HH:mm:ss) of the termination.']
title => ['The datetime (YYYY-MM-DD HH:mm:ss) of the termination.']
},
);

@ -92,7 +92,7 @@ See description how to obtain properties, if any.
[% ELSE -%]
<ul id="[% id %]-props">
[% FOREACH f IN col.fields -%]
<li><b>[% f.name %] </b>(<i>[% f.types.join(', ') %]</i>): [% f.description %]</li>
<li><b>[% f.name %] </b>(<i>[% f.types.join(', ') %]</i>): [%IF f.readonly %]<b>Readonly</b>. [%END%][% f.description %]</li>
[% END -%]
</ul>
[% END -%]

Loading…
Cancel
Save