From 9ec654186a8374b0d260cf641114bcbde1f6bb4f Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 15 May 2016 21:50:46 -0400 Subject: User creation forms are now displayed with inline popup --- app/Template/user_creation/local.php | 45 +++++++++++++++++++++++++++++++ app/Template/user_creation/remote.php | 50 +++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 app/Template/user_creation/local.php create mode 100644 app/Template/user_creation/remote.php (limited to 'app/Template/user_creation') diff --git a/app/Template/user_creation/local.php b/app/Template/user_creation/local.php new file mode 100644 index 00000000..a83074e8 --- /dev/null +++ b/app/Template/user_creation/local.php @@ -0,0 +1,45 @@ + +
+ form->csrf() ?> + +
+ form->label(t('Username'), 'username') ?> + form->text('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> + + form->label(t('Name'), 'name') ?> + form->text('name', $values, $errors) ?> + + form->label(t('Email'), 'email') ?> + form->email('email', $values, $errors) ?> + + form->label(t('Password'), 'password') ?> + form->password('password', $values, $errors, array('required')) ?> + + form->label(t('Confirmation'), 'confirmation') ?> + form->password('confirmation', $values, $errors, array('required')) ?> +
+ +
+ form->label(t('Add project member'), 'project_id') ?> + form->select('project_id', $projects, $values, $errors) ?> + + form->label(t('Timezone'), 'timezone') ?> + form->select('timezone', $timezones, $values, $errors) ?> + + form->label(t('Language'), 'language') ?> + form->select('language', $languages, $values, $errors) ?> + + form->label(t('Role'), 'role') ?> + form->select('role', $roles, $values, $errors) ?> + + form->checkbox('notifications_enabled', t('Enable email notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?> +
+ +
+ + + url->link(t('cancel'), 'user', 'index', array(), false, 'close-popover') ?> +
+
diff --git a/app/Template/user_creation/remote.php b/app/Template/user_creation/remote.php new file mode 100644 index 00000000..5266fce8 --- /dev/null +++ b/app/Template/user_creation/remote.php @@ -0,0 +1,50 @@ + +
+ + form->csrf() ?> + form->hidden('is_ldap_user', array('is_ldap_user' => 1)) ?> + +
+ form->label(t('Username'), 'username') ?> + form->text('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> + + form->label(t('Name'), 'name') ?> + form->text('name', $values, $errors) ?> + + form->label(t('Email'), 'email') ?> + form->email('email', $values, $errors) ?> + + hook->render('template:user:create-remote:form', array('values' => $values, 'errors' => $errors)) ?> +
+ +
+ form->label(t('Add project member'), 'project_id') ?> + form->select('project_id', $projects, $values, $errors) ?> + + form->label(t('Timezone'), 'timezone') ?> + form->select('timezone', $timezones, $values, $errors) ?> + + form->label(t('Language'), 'language') ?> + form->select('language', $languages, $values, $errors) ?> + + form->label(t('Role'), 'role') ?> + form->select('role', $roles, $values, $errors) ?> + + form->checkbox('notifications_enabled', t('Enable email notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?> + form->checkbox('disable_login_form', t('Disallow login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?> +
+ +
+ + + url->link(t('cancel'), 'user', 'index', array(), false, 'close-popover') ?> +
+
+
+ +
-- cgit v1.2.3