Fix saving settings.
[bugdar.git] / admin / templates / admin_settings.tpl
1 {%#import 'admin_header'%}
2
3 <form method="post">
4
5 <div ng-app="bugdar.admin.settings">
6
7 <script type="text/ng-template" id="-/admin/settings/row.tpl">
8 <tr>
9 <th>
10 <label for="settings-{{name}}">{{title}}</label>
11 <dfn>{{description}}</dfn>
12 </th>
13 <td ng-if="settingType == 'yesno'">
14 <input type="radio" id="settings-{{name}}-true" name="settings[{{name}}]" value="1" ng-checked="value == 1">
15 <label for="settings-{{name}}-true">{%=T('Yes')%}</label>
16
17 <input type="radio" id="settings-{{name}}-false" name="settings[{{name}}]" value="0" ng-checked="value == 0">
18 <label for="settings-{{name}}-false">{%=T('No')%}</label>
19 </td>
20
21 <td ng-if="settingType == 'text'">
22 <input type="text" id="settings-{{name}}" name="settings[{{name}}]" value="{{value}}">
23 </td>
24
25 <td ng-if="settingType == 'textarea'">
26 <textarea id="settings-{{name}}" name="settings[{{name}}]">{{value}}</textarea>
27 </td>
28 </tr>
29 </script>
30
31 <table id="settings">
32 <tr><th colspan="2">{%=T('General Options')%}</th></tr>
33 <tr setting-type="yesno"
34 name="allownewreg"
35 title="{%=T('Allow New Registrations')%}"
36 description="{%=T('If this is set to <em>yes</em>, then new users will be allowed to register.') | raw%}"
37 value="{%= Bugdar::$options['allownewreg'] %}">
38 <tr setting-type="yesno"
39 name="verifyemail"
40 title="{%=T('Require Activation Email')%}"
41 description="{%=T('Setting this to yes will force all new users to verify their account with an email activation link.')%}"
42 value="{%= Bugdar::$options['verifyemail'] %}">
43 <tr setting-type="yesno"
44 name="moderatenewusers"
45 title="{%=T('Moderate New Users')%}"
46 description="{%=T('All new users will have to be approved by the administration before being able to have normal user rights.')%}"
47 value="{%= Bugdar::$options['moderatenewusers'] %}">
48 <tr setting-type="yesno"
49 name="sendwelcomemail"
50 title="{%=T('Send New Use Welcome Email')%}"
51 description="{%=T('Setting this option to <em>yes</em> will send each new verified user a welcome email.') | raw%}"
52 value="{%= Bugdar::$options['sendwelcomemail'] %}">
53 <tr setting-type="text"
54 name="webmasteremail"
55 title="{%=T('Webmaster Email Address')%}"
56 description="{%=T('The email address from which emails will be sent out.')%}"
57 value="{%= Bugdar::$options['webmasteremail'] %}">
58 <tr setting-type="text"
59 name="trackertitle"
60 title="{%=T('Tracker Title')%}"
61 description="{%=T('The global name of the bug tracker. Example: Blue Static Bug Tracker')%}"
62 value="{%= Bugdar::$options['trackertitle'] %}">
63 <tr setting-type="text"
64 name="trackerurl"
65 title="{%=T('Tracker Base URL')%}"
66 description="{%=T('The base URL of the tracker. This is used when creating external links to the tracker. <strong>Be sure that this does not end in a trailing slash (&quot;/&quot;).</strong><br />Example: http://www.bluestatic.org/bugs') | raw%}"
67 value="{%= Bugdar::$options['trackerurl'] %}">
68 <tr setting-type="text"
69 name="dateformat"
70 title="{%=T('Date Format')%}"
71 description="{%=T('Set the date format used for bug report and comment information. This is based on PHP\'s date() function.')%}"
72 value="{%= Bugdar::$options['dateformat'] %}">
73 <!-- defaulttimezone -->
74 <!-- defaultlanguage -->
75 <tr setting-type="text"
76 name="syndicateditems"
77 title="{%=T('Number of Syndicated Items')%}"
78 description="{%=T('The number of bugs to be syndicated at any one time by the Atom XML feed.')%}"
79 value="{%= Bugdar::$options['syndicateditems'] %}">
80 <tr setting-type="yesno"
81 name="redirectheaders"
82 title="{%=T('Use Header Redirects')%}"
83 description="{%=T('Instead of displaying an intermediate page informing the user that their action was a success and a redirect is occurring, just send the user to the next screen using HTTP headers. This can save bandwidth.')%}"
84 value="{%= Bugdar::$options['redirectheaders'] %}">
85 <tr setting-type="textarea"
86 name="defaultcomment"
87 title="{%=T('Default Comment Text')%}"
88 description="{%=T('If you wish to set a template for entering the initial comment of a bug report, then you may specify this here. However, the template will only take effect on the initial report/comment. Note: the template cannot be forced on the user as there is no way to validate it.')%}">
89
90 <tr><th colspan="2"><input type="submit" value="Save Settings"></th></tr>
91 </table>
92
93 </div>
94
95 </form>
96
97 {%#import 'admin_footer'%}