From d53a4f957192cfb7ef130d8427c4a312f61fe325 Mon Sep 17 00:00:00 2001 From: Shawn Maddock Date: Wed, 25 Sep 2019 15:24:41 -0600 Subject: [PATCH] Added alternative 3rd paragraph for manual enrollment --- README.md | 9 ++++++++- payload/Library/Application Support/umad/Resources/umad | 9 +++++++++ payload/Library/LaunchAgents/com.erikng.umad.plist | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f84852b8..505870cf 100755 --- a/README.md +++ b/README.md @@ -159,6 +159,13 @@ Configure the Manual Enrollment button with a custom URL. https://apple.com ``` +### Manual enrollment paragraph 3 text +This is the text for the third paragraph on the manual enrollment UI. +```xml +--manualenrollparagraph3 +To enroll, download the profile using the button below, and click Install. Once prompted, log in with your username and password. +``` + ### More info URL When you see the Manual Enrollment button, you can customize a URL directing the users to more information. ```xml @@ -195,7 +202,7 @@ This is the text for the second paragraph. 160 character limit. To enroll, just look for the below notification, and click Details. Once prompted, log in with your username and password. ``` -### Paragraph 2 text +### Paragraph 3 text This is the text for the third paragraph. 160 character limit. ```xml --paragraph3 diff --git a/payload/Library/Application Support/umad/Resources/umad b/payload/Library/Application Support/umad/Resources/umad index 173c6780..715cc2f3 100755 --- a/payload/Library/Application Support/umad/Resources/umad +++ b/payload/Library/Application Support/umad/Resources/umad @@ -341,6 +341,11 @@ def get_parsed_options(): o.add_option('--manualenrollh2text', default='Click on the Manual Enrollment button below.', help=('Optional: Manual enrollment text.')) + o.add_option('--manualenrollparagraph3', + default='To enroll, download the profile using the button ' + 'below, and click Install. Once prompted, log in with ' + 'your username and password.', + help=('Required: Manual enrollment paragraph 3 text.')) o.add_option('--moreinfourl', default='https://google.com', help=('Required: More info URL.')) @@ -777,6 +782,8 @@ def main(): umad.views['button.understand'].setHidden_(True) # Show the manual enrollment UI for emergency purposes + umad.views['field.paragraph3'].setStringValue_( + opts.manualenrollparagraph3.decode('utf8')) umad.views['button.manualenrollment'].setHidden_(False) umad.views['field.manualenrollmenttext'].setHidden_(False) umad.views['image.nagscreen'].setHidden_(True) @@ -896,6 +903,8 @@ def main(): # Also if admin always wants the break glass option # Also enable if dep nag didn't actually pop-up if (not dep_capable and mdm_profile_set) or opts.enableenrollmentbutton or not nag_triggered: + umad.views['field.paragraph3'].setStringValue_( + opts.manualenrollparagraph3.decode('utf8')) umad.views['button.manualenrollment'].setHidden_(False) umad.views['field.manualenrollmenttext'].setHidden_(False) umad.views['image.nagscreen'].setHidden_(True) diff --git a/payload/Library/LaunchAgents/com.erikng.umad.plist b/payload/Library/LaunchAgents/com.erikng.umad.plist index cabdbf43..efc22713 100755 --- a/payload/Library/LaunchAgents/com.erikng.umad.plist +++ b/payload/Library/LaunchAgents/com.erikng.umad.plist @@ -39,6 +39,8 @@ + +