diff options
Diffstat (limited to 'httemplate')
| -rw-r--r-- | httemplate/edit/elements/edit.html | 5 | ||||
| -rw-r--r-- | httemplate/edit/tower.html | 1 | ||||
| -rw-r--r-- | httemplate/elements/tr-tower_sectors.html | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index 27ed0f5d7..6bc05591d 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -515,12 +515,15 @@ Example: % } % foreach my $name_obj ( @existing ) { % +% my $m2_label = $f->{'m2_label'}; +% $m2_label = &{ $f->{'m2_label_callback'} }($name_obj) if $f->{'m2_label_callback'}; +% % my $ex_label = '<INPUT TYPE="button" VALUE="X" TITLE="Remove this '. % lc($f->{'m2_label'}). % qq(" onClick="remove_$field($fieldnum);"). % ' STYLE="color:#ff0000;font-weight:bold;'. % 'padding-left:2px;padding-right:2px"'. -% '> '. ($f->{'m2_label'} || $field ). ' '; +% '> '. ($m2_label || $field ). ' '; % % if ( $f->{'layer_values_callback'} ) { % my %switches = ( 'mode' => $mode ); diff --git a/httemplate/edit/tower.html b/httemplate/edit/tower.html index 93b7235b7..e35fa615c 100644 --- a/httemplate/edit/tower.html +++ b/httemplate/edit/tower.html @@ -18,6 +18,7 @@ type => 'tower_sector', o2m_table => 'tower_sector', m2_label => 'Sector', + m2_label_callback => sub { 'Sector #'.shift->sectornum; }, m2_error_callback => $m2_error_callback, }, ], diff --git a/httemplate/elements/tr-tower_sectors.html b/httemplate/elements/tr-tower_sectors.html index 8acedb84b..b3d453282 100644 --- a/httemplate/elements/tr-tower_sectors.html +++ b/httemplate/elements/tr-tower_sectors.html @@ -184,7 +184,10 @@ $(function() { % my $id = $opt{id}; # sectornumX <div id="<% $id %>"> % # no id on this one, the panel gets the "sectornumX" id - <input type="hidden" name="<% $id %>" value="<% $sector->sectornum |h %>"> + <p> + <label><% emt('Sector number') %></label> <% $sector->sectornum |h %> + <input type="hidden" name="<% $id %>" value="<% $sector->sectornum |h %>"> + </p> <p> <label><% emt('Sector name') %></label> <input style="text-align: left" |
