Change the yesno directive to settingType and support text rows.
[bugdar.git] / admin / templates / admin_settings.tpl
1 {%#import 'admin_header'%}
2
3 <div ng-app="bugdar.admin.settings">
4
5 <script type="text/ng-template" id="-/admin/settings/row.tpl">
6 <tr>
7 <th>
8 <label for="settings-{{name}}">{{title}}</label>
9 <dfn>{{description}}</dfn>
10 </th>
11 <td ng-show="settingType == 'yesno'">
12 <input type="radio" id="settings-{{name}}-true" name="settings[{{name}}]" value="1" ng-checked="value == 1">
13 <label for="settings-{{name}}-true">{%=T('Yes')%}</label>
14
15 <input type="radio" id="settings-{{name}}-false" name="settings[{{name}}]" value="0" ng-checked="value == 0">
16 <label for="settings-{{name}}-false">{%=T('No')%}</label>
17 </td>
18
19 <td ng-show="settingType == 'text'">
20 <input type="text" id="settings-{{name}}" name="settings[{{name}}]" value="{{value}}">
21 </td>
22 </tr>
23 </script>
24
25 <table id="settings">
26 <tr><th colspan="2">{%=T('General Options')%}</th></tr>
27 <tr setting-type="yesno"
28 name="allownewreg"
29 title="{%=T('Allow New Registrations')%}"
30 description="{%=T('If this is set to <em>yes</em>, then new users will be allowed to register.') | raw%}"
31 value="{%= Bugdar::$options['allownewreg'] %}">
32 <tr setting-type="yesno"
33 name="verifyemail"
34 title="{%=T('Require Activation Email')%}"
35 description="{%=T('Setting this to yes will force all new users to verify their account with an email activation link.')%}"
36 value="{%= Bugdar::$options['verifyemail'] %}">
37 <tr setting-type="yesno"
38 name="moderatenewusers"
39 title="{%=T('Moderate New Users')%}"
40 description="{%=T('All new users will have to be approved by the administration before being able to have normal user rights.')%}"
41 value="{%= Bugdar::$options['moderatenewusers'] %}">
42 <tr setting-type="yesno"
43 name="sendwelcomemail"
44 title="{%=T('Send New Use Welcome Email')%}"
45 description="{%=T('Setting this option to <em>yes</em> will send each new verified user a welcome email.') | raw%}"
46 value="{%= Bugdar::$options['sendwelcomemail'] %}">
47 <tr setting-type="text"
48 name="webmasteremail"
49 title="{%=T('Webmaster Email Address')%}"
50 description="{%=T('The email address from which emails will be sent out.')%}"
51 value="{%= Bugdar::$options['webmasteremail'] %}">
52 <tr setting-type="text"
53 name="trackertitle"
54 title="{%=T('Tracker Title')%}"
55 description="{%=T('The global name of the bug tracker. Example: Blue Static Bug Tracker')%}"
56 value="{%= Bugdar::$options['trackertitle'] %}">
57 <tr setting-type="text"
58 name="trackerurl"
59 title="{%=T('Tracker Base URL')%}"
60 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%}"
61 value="{%= Bugdar::$options['trackerurl'] %}">
62 <tr setting-type="text"
63 name="dateformat"
64 title="{%=T('Date Format')%}"
65 description="{%=T('Set the date format used for bug report and comment information. This is based on PHP\'s date() function.')%}"
66 value="{%= Bugdar::$options['dateformat'] %}">
67 <!-- defaulttimezone -->
68 <!-- defaultlanguage -->
69 <tr setting-type="text"
70 name="syndicateditems"
71 title="{%=T('Number of Syndicated Items')%}"
72 description="{%=T('The number of bugs to be syndicated at any one time by the Atom XML feed.')%}"
73 value="{%= Bugdar::$options['syndicateditems'] %}">
74 <tr setting-type="yesno"
75 name="redirectheaders"
76 title="{%=T('Use Header Redirects')%}"
77 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.')%}"
78 value="{%= Bugdar::$options['redirectheaders'] %}">
79 </table>
80
81 </div>
82
83 {%#import 'admin_footer'%}