aboutsummaryrefslogtreecommitdiff
blob: 4bfc313b691650688b415986c72c9fa2ef42a47a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<? include /main_top.pyhtml ?>
<?
errormsg = ""
if post_params:
	if post_params['profile_name']:
		for profile in shared_info.profiles:
			if post_params['profile_name'] == profile['name']:
				errormsg = "That profile already exists!"
		if not errormsg:
			try:
				new_profile = {}
				new_profile['name'] = post_params['profile_name']
				new_profile['ccxmlfile'] = post_params['ccxmlfile']
				new_profile['ipxmlfile'] = post_params['ipxmlfile']
				shared_info.profiles.append(new_profile)
			except:
				errormsg += "Error while adding the new profile!"
	else:
		errormsg += "You didn't specify a profile name! "
	if not errormsg:
		errormsg = "Profile added successfully"

?>
<: if errormsg:
<br><% errormsg %><br><br>
:>
<h2>Add Profile:</h2>
<br>
<form action="/add_profile.pyhtml" method="POST" enctype="multipart/form-data">
To create the profile, you can use any of the frontends available to GLI.
The <a href="/webgli/">webgli</a> frontend is available via this web interface.
<br><br>
Name: <input type="text" name="profile_name"><br>
Client Configuration Profile Filename: <input type="text" name="ccxmlfile"><br>
Installation Profile Filename: <input type="text" name="ipxmlfile"><br>
<input type="submit" name="addprofile" value="Add Profile">
<hr>


</form>

<? include /main_bottom.pyhtml ?>