mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 22:15:51 +01:00
148 lines
6.8 KiB
HTML
148 lines
6.8 KiB
HTML
@(settings: service.SystemSettingsService.SystemSettings, info: Option[Any])(implicit context: app.Context)
|
|
@import context._
|
|
@import view.helpers._
|
|
@html.main("System Settings"){
|
|
@menu("system"){
|
|
@helper.html.information(info)
|
|
<form action="@path/admin/system" method="POST" validate="true">
|
|
<div class="box">
|
|
<div class="box-header">System Settings</div>
|
|
<div class="box-content">
|
|
<!--====================================================================-->
|
|
<!-- Account registration -->
|
|
<!--====================================================================-->
|
|
<label><strong>Account registration</strong></label>
|
|
<fieldset>
|
|
<label>
|
|
<input type="radio" name="allowAccountRegistration" value="true"@if(settings.allowAccountRegistration){ checked}>
|
|
<strong>Allow</strong> - Users can create account by themselves.
|
|
</label>
|
|
<label>
|
|
<input type="radio" name="allowAccountRegistration" value="false"@if(!settings.allowAccountRegistration){ checked}>
|
|
<strong>Deny</strong> - Only administrators can create account.
|
|
</label>
|
|
</fieldset>
|
|
<!--====================================================================-->
|
|
<!-- Services -->
|
|
<!--====================================================================-->
|
|
<hr>
|
|
<label><strong>Services</strong></label>
|
|
<fieldset>
|
|
<label>
|
|
<input type="checkbox" name="gravatar"@if(settings.gravatar){ checked}/>
|
|
Gravatar
|
|
</label>
|
|
</fieldset>
|
|
<!--====================================================================-->
|
|
<!-- Authentication -->
|
|
<!--====================================================================-->
|
|
<hr>
|
|
<label><strong>Authentication</strong></label>
|
|
<fieldset>
|
|
<label>
|
|
<input type="checkbox" id="ldapAuthentication" name="ldapAuthentication"@if(settings.ldap){ checked}/>
|
|
LDAP
|
|
</label>
|
|
</fieldset>
|
|
<div class="form-horizontal ldap">
|
|
<div class="control-group">
|
|
<label class="control-label" for="ldapHost">LDAP Host</label>
|
|
<div class="controls">
|
|
<input type="text" id="ldapHost" name="ldap.host" value="@settings.ldap.map(_.host)"/>
|
|
<span id="error-ldap_host" class="error"></span>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label" for="ldapPort">LDAP Port</label>
|
|
<div class="controls">
|
|
<input type="text" id="ldapPort" name="ldap.port" class="input-mini" value="@settings.ldap.map(_.port)"/>
|
|
<span id="error-ldap_port" class="error"></span>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label" for="ldapBaseDN">BaseDN</label>
|
|
<div class="controls">
|
|
<input type="text" id="ldapBaseDN" name="ldap.baseDN" value="@settings.ldap.map(_.baseDN)"/>
|
|
<span id="error-ldap_baseDN" class="error"></span>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label" for="ldapUserNameAttribute">User name attribute</label>
|
|
<div class="controls">
|
|
<input type="text" id="ldapUserNameAttribute" name="ldap.userNameAttribute" value="@settings.ldap.map(_.userNameAttribute)"/>
|
|
<span id="error-ldap_userNameAttribute" class="error"></span>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label" for="ldapMailAttribute">Mail address attribute</label>
|
|
<div class="controls">
|
|
<input type="text" id="ldapMailAttribute" name="ldap.mailAttribute" value="@settings.ldap.map(_.mailAttribute)"/>
|
|
<span id="error-ldap_mailAttribute" class="error"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!--====================================================================-->
|
|
<!-- Notification email -->
|
|
<!--====================================================================-->
|
|
<hr>
|
|
<label><strong>Notification email</strong></label>
|
|
<fieldset>
|
|
<label>
|
|
<input type="checkbox" id="notification" name="notification"@if(settings.notification){ checked}/>
|
|
Send notifications
|
|
</label>
|
|
</fieldset>
|
|
<div class="form-horizontal notification">
|
|
<div class="control-group">
|
|
<label class="control-label" for="smtpHost">SMTP Host</label>
|
|
<div class="controls">
|
|
<input type="text" id="smtpHost" name="smtp.host" value="@settings.smtp.map(_.host)"/>
|
|
<span id="error-smtp_host" class="error"></span>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label" for="smtpPort">SMTP Port</label>
|
|
<div class="controls">
|
|
<input type="text" id="smtpPort" name="smtp.port" class="input-mini" value="@settings.smtp.map(_.port)"/>
|
|
<span id="error-smtp_port" class="error"></span>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label" for="smtpUser">SMTP User</label>
|
|
<div class="controls">
|
|
<input type="text" id="smtpUser" name="smtp.user" value="@settings.smtp.map(_.user)"/>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label" for="smtpPassword">SMTP Password</label>
|
|
<div class="controls">
|
|
<input type="password" id="smtpPassword" name="smtp.password" value="@settings.smtp.map(_.password)"/>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<label class="checkbox">
|
|
<input type="checkbox" name="smtp.ssl"@if(settings.smtp.flatMap(_.ssl).getOrElse(false)){ checked}/> Enable SSL
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<fieldset>
|
|
<input type="submit" class="btn btn-success" value="Apply changes"/>
|
|
</fieldset>
|
|
</form>
|
|
}
|
|
}
|
|
<script>
|
|
$(function(){
|
|
$('#notification').change(function(){
|
|
$('.notification input').prop('disabled', !$(this).prop('checked'));
|
|
}).change();
|
|
|
|
$('#ldapAuthentication').change(function(){
|
|
$('.ldap input').prop('disabled', !$(this).prop('checked'));
|
|
}).change();
|
|
});
|
|
</script> |