summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2019-05-13 10:16:32 -0400
committerChristopher Burger <burgerc@freeside.biz>2019-05-13 10:16:32 -0400
commitb7d4aaee22ceda078bbfcca47038eb0bf4230a1c (patch)
tree619511637d0679bb11e675e23e1ff09ea15d020d /httemplate
parent8eb629a5a142756a3fd3b4419f36182457263a9c (diff)
RT# 83251 - added option to update tower/sector
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/edit/elements/edit.html5
-rw-r--r--httemplate/edit/tower.html1
-rw-r--r--httemplate/elements/tr-tower_sectors.html5
3 files changed, 9 insertions, 2 deletions
diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html
index de309ca3d..0f5f7bdb7 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"'.
-% '>&nbsp;'. ($f->{'m2_label'} || $field ). ' ';
+% '>&nbsp;'. ($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 f2faa5a9a..b8fce52eb 100644
--- a/httemplate/edit/tower.html
+++ b/httemplate/edit/tower.html
@@ -19,6 +19,7 @@
# type => 'tower_sector',
# o2m_table => 'tower_sector',
# m2_label => 'Sector',
+# m2_label_callback => sub { 'Sector #'.shift->sectornum; },
# m2_error_callback => $m2_error_callback,
# },
{ type => 'tower_sectors',
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"