diff options
Diffstat (limited to 'httemplate/edit')
| -rw-r--r-- | httemplate/edit/process/reason.html | 6 | ||||
| -rw-r--r-- | httemplate/edit/process/reason_type.html | 6 | ||||
| -rw-r--r-- | httemplate/edit/reason.html | 42 | ||||
| -rw-r--r-- | httemplate/edit/reason_type.html | 28 | 
4 files changed, 82 insertions, 0 deletions
diff --git a/httemplate/edit/process/reason.html b/httemplate/edit/process/reason.html new file mode 100644 index 000000000..55c1ea958 --- /dev/null +++ b/httemplate/edit/process/reason.html @@ -0,0 +1,6 @@ +<% include( 'elements/process.html', +               'table'    => 'reason', +               'redirect' => popurl(3) . 'browse/reason.html?class=' . +	                      $cgi->param('class') . '&', +           ) +%> diff --git a/httemplate/edit/process/reason_type.html b/httemplate/edit/process/reason_type.html new file mode 100644 index 000000000..4ccccaddd --- /dev/null +++ b/httemplate/edit/process/reason_type.html @@ -0,0 +1,6 @@ +<% include( 'elements/process.html', +               'table'       => 'reason_type', +               'redirect'    => popurl(3) . 'browse/reason_type.html?class=' .  +	                         $cgi->param('class') . '&', +           ) +%> diff --git a/httemplate/edit/reason.html b/httemplate/edit/reason.html new file mode 100644 index 000000000..2f5932846 --- /dev/null +++ b/httemplate/edit/reason.html @@ -0,0 +1,42 @@ +% +% $cgi->param('class') =~ /^(\w)$/ or die "illegal class"; +% my $class=$1; +% +% my %classmap = ('C' => 'cancel', +%              'S' => 'suspend', +%             ); +% my $classname = $classmap{$class}; +% +% my (@types) = qsearch( 'reason_type', { 'class' => $class } ); +% +<% include( 'elements/edit.html', +                 'name'   => ucfirst($classname) . ' Reason', +                 'table'  => 'reason', +                 'labels' => {  +                               'reasonnum'   => ucfirst($classname) .  ' Reason', +                               'reason_type' => ucfirst($classname) . ' Reason type', +                               'reason'      => ucfirst($classname) . ' Reason', +			       'disabled'    => 'Disabled', +                               'class'       => '', +                             }, +		 'fields' => [ +			       { 'field' => 'reason_type', +			         'type'  => 'select', +				 'value' => { 'vcolumn' => 'typenum', +				              'ccolumn' => 'type', +					      'values'  => \@types, +					    }, +			       }, +			       'reason', +			       { 'field' => 'class', +			         'type'  => 'fixedhidden', +				 'value' => $class, +			       }, +			       { 'field' => 'disabled', +			         'type'  => 'checkbox', +				 'value' => 'Y' +			       }, +		             ], +                 'viewall_url' => $p . "browse/reason.html?class=$class", +           ) +%> diff --git a/httemplate/edit/reason_type.html b/httemplate/edit/reason_type.html new file mode 100644 index 000000000..970529e35 --- /dev/null +++ b/httemplate/edit/reason_type.html @@ -0,0 +1,28 @@ +% +%$cgi->param('class') =~ /^(\w)$/; +%my $class = $1; +% +%my %classmap = ( 'C' => 'Cancel', +%                 'S' => 'Suspend', +%		); +% +%my $classname = $classmap{$class}; +% +<% include( 'elements/edit.html', +                 'name'   => $classname . ' Reason Type', +                 'table'  => 'reason_type', +                 'labels' => {  +                               'typenum'  => $classname . ' reason type', +                               'type'     => $classname . ' reason type name', +			       'class'    => '', +                             }, +	         'fields' => [ +			       'type', +			       { 'field' => 'class', +			         'type'  => 'hidden', +			       }, +		             ], +                 'viewall_url' => $p . "browse/reason_type.html?class=$class", +                 'new_hashref_callback' => sub {{ 'class' => $class }}, +           ) +%>  | 
