diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2015-05-06 19:10:47 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2015-05-06 19:10:47 -0700 |
| commit | f921a017cd3dd987bd48e05c7fd462a1ef9cb79d (patch) | |
| tree | 4f772a73dc1852860d1d646fb7d8e866eb46d2a3 /httemplate/edit/elements | |
| parent | a9129b5b8b7a69d1d0a7fce6dc9d72665eaec568 (diff) | |
| parent | 95606bc9db41352511c886773a311f2166cc6cf2 (diff) | |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/edit/elements')
| -rw-r--r-- | httemplate/edit/elements/edit.html | 1 | ||||
| -rw-r--r-- | httemplate/edit/elements/part_svc_column.html | 7 | ||||
| -rw-r--r-- | httemplate/edit/elements/svc_Common.html | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index 76df82064..7b02994d1 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -418,6 +418,7 @@ Example: % 'value' => $opt{curr_value}, % 'label' => $label, % 'noinit' => $f->{noinit}, +% 'required' => $f->{'required'}, % } % ); % } diff --git a/httemplate/edit/elements/part_svc_column.html b/httemplate/edit/elements/part_svc_column.html index 23a6deb56..bc679e577 100644 --- a/httemplate/edit/elements/part_svc_column.html +++ b/httemplate/edit/elements/part_svc_column.html @@ -76,7 +76,7 @@ my %communigate_fields = ( <TH BGCOLOR="#cccccc">Field</TH> <TH BGCOLOR="#cccccc">Label</TH> <TH BGCOLOR="#cccccc" COLSPAN=2>Modifier</TH> - <TH BGCOLOR="#cccccc">Required?</TH> + <TH BGCOLOR="#cccccc"><% $manual_require ? 'Required?' : '' %></TH> </TR> % $part_svc->set('svcpart' => $opt{'clone'}) if $opt{'clone'}; # for now % my $i = 0; @@ -211,7 +211,9 @@ my %communigate_fields = ( % } </TD> <TD> -% if (!$def->{'type'} || !(grep {$_ eq $def->{'type'}} ('checkbox','disabled'))) { +% if ($manual_require && +% (!$def->{'type'} || !(grep {$_ eq $def->{'type'}} ('checkbox','disabled'))) +% ) { <INPUT ID="<% $name.'_required' %>" TYPE="checkbox" NAME="<% $svcdb %>__<% $field %>_required" VALUE="Y" <% ($part_svc_column->required || $def->{'required'}) ? 'CHECKED' : '' %> <% $def->{'required'} ? 'DISABLED' : '' %> @@ -309,4 +311,5 @@ if ( $svcdb eq 'svc_acct' } my @defs = map { FS::part_svc->svc_table_fields($svcdb)->{$_} } @fields; +my $manual_require = FS::part_svc->svc_table_info($svcdb)->{'manual_require'}; </%init> diff --git a/httemplate/edit/elements/svc_Common.html b/httemplate/edit/elements/svc_Common.html index 97b630f76..a4e345e40 100644 --- a/httemplate/edit/elements/svc_Common.html +++ b/httemplate/edit/elements/svc_Common.html @@ -102,6 +102,9 @@ my $columndef = $part_svc->part_svc_column($f->{'field'}); my $flag = $columndef->columnflag; + $f->{'required'} = 1 + if $columndef->required; + if ( $flag eq 'F' ) { #fixed $f->{'value'} = $columndef->columnvalue; if (length($columndef->columnvalue)) { |
