From ca8ec3eb35756ecc0c05854880d7647eea74714b Mon Sep 17 00:00:00 2001
From: James Morrish <jamesmorrish@gmail.com>
Date: Mon, 3 Jun 2013 17:17:57 +0100
Subject: [PATCH] Pathauto opposite behaviour

---
 sites/all/modules/pathauto/pathauto.module | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sites/all/modules/pathauto/pathauto.module b/sites/all/modules/pathauto/pathauto.module
index dffc292..9ee9c6e 100644
--- a/sites/all/modules/pathauto/pathauto.module
+++ b/sites/all/modules/pathauto/pathauto.module
@@ -306,7 +306,13 @@ function pathauto_field_attach_form($entity_type, $entity, &$form, &$form_state,

   // Add JavaScript that will disable the path textfield when the automatic
   // alias checkbox is checked.
-  $form['path']['alias']['#states']['!enabled']['input[name="path[pathauto]"]'] = array('checked' => TRUE);
+  $state = 'enabled';
+  global $user;
+  if ($user->uid === '1') {
+    $state = '!' . $state;
+  }
+
+  $form['path']['alias']['#states'][$state]['input[name="path[pathauto]"]'] = array('checked' => TRUE);

   // Override path.module's vertical tabs summary.
   $form['path']['#attached']['js'] = array(
--
1.8.3

