## OpenCA - CA Command
## (c) 2001 by Michael Bell and OpenCA Group
##
##   File Name: show_prepared_role
##       Brief: show_prepared_role
## Description: show a new role before it is finally created
##  Parameters: role

sub cmdShow_prepared_role {

	libLoadCommand ("new_role");
	checkNew_role ();

	## Get required parameters ( return only the value string )
	my $sheet    = getRequired( 'ShowPreparedRoleSheet' );
	my $uptime   = $tools->getDate();

	my $page;

	## Get the base Page ( got in $page variable )
	if( not $page = $query->getFile( "$sheet" ) ) {
		configError ( i18nGettext("File not Found : __SHEET__", "__SHEET__", $sheet) );
	};

	## Substitute the Variables in the $page
	$page = $query->subVar( $page, '$uptime', $uptime );
	$page = $query->subVar( $page, '$role', $query->param ('role') );

	print "$page";
}

1;

