Commit 6f42be63 authored by Joseph Rafferty's avatar Joseph Rafferty

Adds pref key for the username field placeholder

Adds a new preference key to customize the placeholder text in the username texfield in the Signin UI. Implements Issue #96
parent 5ea3c935
......@@ -11,6 +11,8 @@ import Foundation
enum Preferences: String {
/// The desired AD domain as a `String`.
case ADDomain
/// A string to show as the placeholder in the Username textfield
case UsernameFieldPlaceholder
/// A filesystem path to a background image as a `String`.
case BackgroundImage
/// Should new users be created as local administrators? Set as a `Bool`.
......
......@@ -172,6 +172,11 @@ class SignIn: NSWindowController {
username.placeholderString = "Username"
self.isDomainManaged = true
}
if let usernamePlaceholder = getManagedPreference(key: .UsernameFieldPlaceholder) as? String {
os_log("Username Field Placeholder preferences found.", log: uiLog, type: .debug)
username.placeholderString = usernamePlaceholder
}
self.window?.isMovable = false
self.window?.canBecomeVisibleWithoutLogin = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment