Subversion Repositories DevTools

Rev

Rev 1295 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1293 dpurdie 1
[%# Screen for the edit project form. #%]
2
 
3
[% PROCESS header.html.tmpl version = version displaymenu = 1 
4
                            closehead = 1 help = "x370.html" %]
5
 
6
 
7
<script language="JavaScript">
8
<!--
9
//
10
// This function will hit the user with a "are you sure" message box if they
11
//  ask to delete the project. Otherwise, just let them change the state. It
12
//  is called when the submit button is pressed. 
13
//
14
function DeleteProjectConfirm()
15
{
16
[% IF project.id != 1 %]
17
    var stateIndex = document.form.project_state.options.selectedIndex;
18
    var stateSelection = document.form.project_state.options[stateIndex].value;
19
 
20
    // Confirm with the user if they are deleting.
21
    if (stateSelection == 'Deleted')
22
    {
23
    	return confirm('This project and all of its topics will be ' +
24
                       'permanently removed. Are you sure you want ' +
25
                       'to delete this project?');
26
    }
27
[% END %]
28
    return 1;
29
}
30
-->
31
</script>
32
 
33
[%# Display any "feedback" to the user if necessary. #%]
34
[% IF feedback != '' %]
35
    <span class="feedback">[% feedback %]</span>
36
[% END %]
37
 
38
<P>
39
 
40
<H1>Edit project</H1>
41
 
42
<P>
43
<FORM METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" NAME="form">
44
 
45
<INPUT TYPE="hidden" name="projectid" value="[% project.id %]">
46
<INPUT TYPE="hidden" name="version" value="[% project.version %]">
47
<INPUT TYPE="hidden" NAME="action" VALUE="submit_editproject">
48
 
49
[%# The project name input field #%]
50
Project name:
51
<BR>
52
<INPUT TYPE="text" NAME="project_name" VALUE="[% project.name | html_entity %]" SIZE=70 MAXLENGTH=70
53
	[% IF project_states.0 != project.state %]
54
		readonly
55
	[% END %]
56
	>
57
<P>
58
 
59
[%# The project description input field #%]
60
Project description: 
61
<BR>
62
<TEXTAREA NAME="project_description" ROWS=6 COLS=70 WRAP="physical"
63
	[% IF project_states.0 != project.state %]
64
		readonly
65
	[% END %]
66
	>[% project.description | html_entity %]</TEXTAREA>
67
<P>
68
 
69
<P>
70
[% IF project.id <= 1 || project_state_change_enabled != 1 %]
71
	<INPUT TYPE="hidden" NAME="project_state" VALUE="[% project.state %]">
72
[% ELSE %]
73
<tr class="tt1">
74
 <td>State:</td>
75
  <td>
76
    [%# Now display the option button for changing the project state #%]
77
    <select name="project_state">
78
    [% FOREACH state = project_states %]
79
       [% IF state == project.state %]
80
           <option selected value="[% state %]">[% state %]</option>
81
       [% ELSIF state == 'Deleted' %]
82
   	   <option value="Deleted">Delete Project ...</option>
83
       [% ELSE %]           
84
           <option value="[% state %]">[% state %]</option>
85
       [% END %]
86
    [% END %]
87
    </select>
88
 </td>
89
</tr>
90
[% END %]
91
 
92
<tr class="tt1"><td colspan="2">&nbsp;</td></tr>
93
 
94
 
95
[%# Render the submit button #%]
96
<tr>
97
  <td colspan="2">
98
    <input type="submit" name="button" value="Update Project" 
99
           onClick="return DeleteProjectConfirm();">
100
  </td>
101
</tr>
102
 
103
</FORM>
104
 
105
<a href="[% list_projects_url %]">Project list</a>
106
 
107
 
108
[% PROCESS trailer.html.tmpl %]
109
 
110
</BODY>
111
</HTML>