diff --git a/Controller/GrouperGroupsController.php b/Controller/GrouperGroupsController.php index 5f7f52d..e778038 100644 --- a/Controller/GrouperGroupsController.php +++ b/Controller/GrouperGroupsController.php @@ -343,7 +343,7 @@ public function groupCreateTemplateForm() { } } //TODO - not sure if will be able to edit via Templates, so will need to fix once known. - $this->set('title', _txt('pl.grouperlite.title.groupcreate')); + $this->set('title', _txt('pl.grouperlite.title.templatecreate')); //$this->set('grouperstems', $this->GrouperGroup->getOwnedStems($this->userId)); } diff --git a/Lib/lang.php b/Lib/lang.php index f8e3349..f4124d7 100644 --- a/Lib/lang.php +++ b/Lib/lang.php @@ -30,6 +30,7 @@ 'pl.grouperlite.title.emaillists-manage' => 'Email lists I manage', 'pl.grouperlite.title.emaillistsinfo' => 'Email list configuration and attributes', 'pl.grouperlite.title.groupcreate' => 'Create Group', + 'pl.grouperlite.title.templatecreate' => 'Create Email List', 'pl.grouperlite.message.flash.join-group-success' => 'You have been added to the group!', 'pl.grouperlite.message.flash.join-group-failed' => 'You are unable to join the group!', diff --git a/View/Elements/Components/navigation-emaillists.ctp b/View/Elements/Components/navigation-emaillists.ctp index 6612a61..7597315 100644 --- a/View/Elements/Components/navigation-emaillists.ctp +++ b/View/Elements/Components/navigation-emaillists.ctp @@ -40,14 +40,14 @@
Html->url( + $createEmailUrl = $this->Html->url( array( 'controller' => 'groupergroups', - 'action' => 'groupcreateform' + 'action' => 'groupcreatetemplateform' ) ); ?> - +  
diff --git a/View/Elements/pagination.ctp b/View/Elements/pagination.ctp index fcab6e4..1a0b1e0 100644 --- a/View/Elements/pagination.ctp +++ b/View/Elements/pagination.ctp @@ -122,9 +122,9 @@ $includeGoto = isset($goto) ? $goto : true;

diff --git a/View/GrouperGroups/groupcreateform.ctp b/View/GrouperGroups/groupcreateform.ctp index 8b5b086..c633d0f 100644 --- a/View/GrouperGroups/groupcreateform.ctp +++ b/View/GrouperGroups/groupcreateform.ctp @@ -14,16 +14,17 @@ $model = $this->name; )); ?> plugin)) { - if (file_exists(APP . "Plugin/" . $this->plugin . "/View/" . $model . "/fields.inc")) { - include(APP . "Plugin/" . $this->plugin . "/View/" . $model . "/fields.inc"); - } elseif (file_exists(LOCAL . "Plugin/" . $this->plugin . "/View/" . $model . "/fields.inc")) { - include(LOCAL . "Plugin/" . $this->plugin . "/View/" . $model . "/fields.inc"); + if (file_exists(APP . "Plugin/" . $this->plugin . "/View/" . $model . "/groupfields.inc")) { + include(APP . "Plugin/" . $this->plugin . "/View/" . $model . "/groupfields.inc"); + } elseif (file_exists(LOCAL . "Plugin/" . $this->plugin . "/View/" . $model . "/groupfields.inc")) { + include(LOCAL . "Plugin/" . $this->plugin . "/View/" . $model . "/groupfields.inc"); } } else { - include(APP . "View/" . $model . "/fields.inc"); + include(APP . "View/" . $model . "/groupfields.inc"); } ?> Form->end(); ?> - \ No newline at end of file + + \ No newline at end of file diff --git a/View/GrouperGroups/groupcreatetemplateform.ctp b/View/GrouperGroups/groupcreatetemplateform.ctp index a4fb74d..612d982 100644 --- a/View/GrouperGroups/groupcreatetemplateform.ctp +++ b/View/GrouperGroups/groupcreatetemplateform.ctp @@ -2,172 +2,29 @@ $this->extend('/GrouperGroups/base'); $this->Html->addCrumb('Create a Template Group'); +$model = $this->name; ?>
-
-
-
- Form->create(false, array( - 'url' => array('controller' => 'groupergroups', 'action' => 'groupcreatetemplateform') - )); ?> - -
-
- Form->label(false, "Working Group Extension", array( - 'for' => 'gsh_input_workingGroupExtension', - 'class' => "col-sm-3 col-form-label" - )); ?> -
- Form->input('gsh_input_workingGroupExtension', array( - 'label' => false, - 'class' => 'form-control', - 'required' => true, - 'maxlength' => '62', - 'id' => 'gsh_input_workingGroupExtension' - )); ?> -
-
-
- Form->label(false, "Working Group Display Extension", array( - 'for' => 'gsh_input_workingGroupDisplayExtension', - 'class' => "col-sm-3 col-form-label" - )); ?> -
- Form->input('gsh_input_workingGroupDisplayExtension', array( - 'label' => false, - 'class' => 'form-control', - 'maxlength' => '62', - 'id' => 'gsh_input_workingGroupDisplayExtension' - )); ?> -
-
-
- Form->label(false, "Working Group Description", array( - 'for' => 'gsh_input_workingGroupDescription', - 'class' => "col-sm-3 col-form-label" - )); ?> -
- Form->input('gsh_input_workingGroupDescription', array( - 'label' => false, - 'class' => 'form-control', - 'maxlength' => '62', - 'id' => 'gsh_input_workingGroupDescription' - )); ?> -
-
-
- Form->label(false, "Enable Sympa for Group?", array( - 'for' => 'gsh_input_isSympa', - 'class' => "col-sm-3 col-form-label" - )); ?> -
- Form->checkbox('gsh_input_isSympa', array( - 'label' => false, - 'class' => 'form-control', - 'id' => 'gsh_input_isSympa' - )); ?> -
-
-
- Form->label(false, "Sympa Domain", array( - 'for' => 'gsh_input_sympaDomain', - 'class' => "col-sm-3 col-form-label" - )); ?> -
- Form->radio( - 'gsh_input_sympaDomain', - array( - 'internet2' => 'internet2', - 'incommon' => 'incommon'), - array( - 'label' => false, - 'class' => 'form-control', - 'legend' => false, - 'id' => 'gsh_input_sympaDomain' - ) - ); ?> -
-
-
- Form->label(false, "Is Sympa Moderated?", array( - 'for' => 'gsh_input_isSympaModerated', - 'class' => "col-sm-3 col-form-label" - )); ?> -
- Form->checkbox('gsh_input_isSympaModerated', array( - 'label' => false, - 'class' => 'form-control', - 'id' => 'gsh_input_isSympaModerated' - )); ?> -
-
-
- Form->label(false, "Is Group Optin?", array( - 'for' => 'gsh_input_isOptin', - 'class' => "col-sm-3 col-form-label" - )); ?> -
- Form->checkbox('gsh_input_isOptin', array( - 'label' => false, - 'class' => 'form-control', - 'id' => 'gsh_input_isOptin' - )); ?> -
-
-
- Form->label(false, "Days for Attestation", array( - 'for' => 'gsh_input_attestationDays', - 'class' => "col-sm-3 col-form-label" - )); ?> -
- Form->input('gsh_input_attestationDays', array( - 'label' => false, - 'class' => 'form-control', - 'type' => 'number', - 'default' => '30', - 'min' => '30', - 'max' => '365', - 'id' => 'gsh_input_attestationDays' - )); ?> -
-
-
- Form->label(false, "Add Confluence?", array( - 'for' => 'gsh_input_isConfluence', - 'class' => "col-sm-3 col-form-label" - )); ?> -
- Form->checkbox('gsh_input_isConfluence', array( - 'label' => false, - 'class' => 'form-control', - 'id' => 'gsh_input_isConfluence' - )); ?> -
-
-
- Form->label(false, "Add Jira?", array( - 'for' => 'gsh_input_isJira', - 'class' => "col-sm-3 col-form-label" - )); ?> -
- Form->checkbox('gsh_input_isJira', array( - 'label' => false, - 'class' => 'form-control', - 'id' => 'gsh_input_isJira' - )); ?> -
-
-
-
- Form->button(_txt('pl.grouperlite.form.group.action.save'), array( - 'type' => 'submit', - 'class' => 'btn btn-grouper btn-primary btn-lg btn-raised' - )); ?> -
-
-
- Form->end(); ?> -
+
+
+
+ Form->create(false, array( + 'url' => array('controller' => 'groupergroups', 'action' => 'groupcreatetemplateform') + )); ?> + plugin)) { + if (file_exists(APP . "Plugin/" . $this->plugin . "/View/" . $model . "/templatefields.inc")) { + include(APP . "Plugin/" . $this->plugin . "/View/" . $model . "/templatefields.inc"); + } elseif (file_exists(LOCAL . "Plugin/" . $this->plugin . "/View/" . $model . "/templatefields.inc")) { + include(LOCAL . "Plugin/" . $this->plugin . "/View/" . $model . "/templatefields.inc"); + } + } else { + include(APP . "View/" . $model . "/templatefields.inc"); + } + ?> + Form->end(); ?> +
+
-
\ No newline at end of file +
diff --git a/View/GrouperGroups/fields.inc b/View/GrouperGroups/groupfields.inc similarity index 100% rename from View/GrouperGroups/fields.inc rename to View/GrouperGroups/groupfields.inc diff --git a/View/GrouperGroups/templatefields.inc b/View/GrouperGroups/templatefields.inc new file mode 100644 index 0000000..f6a06bd --- /dev/null +++ b/View/GrouperGroups/templatefields.inc @@ -0,0 +1,249 @@ +
+
+ Form->label(false, "Working Group Extension", array( + 'for' => 'gsh_input_workingGroupExtension', + 'class' => "col-sm-3 col-form-label" + )); ?> +
+ Form->input('gsh_input_workingGroupExtension', array( + 'label' => false, + 'class' => 'form-control', + 'required' => true, + 'maxlength' => '62', + 'id' => 'gsh_input_workingGroupExtension' + )); ?> +
+
+
+ Form->label(false, "Working Group Display Extension", array( + 'for' => 'gsh_input_workingGroupDisplayExtension', + 'class' => "col-sm-3 col-form-label" + )); ?> +
+ Form->input('gsh_input_workingGroupDisplayExtension', array( + 'label' => false, + 'class' => 'form-control', + 'maxlength' => '62', + 'id' => 'gsh_input_workingGroupDisplayExtension' + )); ?> +
+
+
+ Form->label(false, "Working Group Description", array( + 'for' => 'gsh_input_workingGroupDescription', + 'class' => "col-sm-3 col-form-label" + )); ?> +
+ Form->input('gsh_input_workingGroupDescription', array( + 'label' => false, + 'class' => 'form-control', + 'maxlength' => '62', + 'id' => 'gsh_input_workingGroupDescription' + )); ?> +
+
+
+ Form->label(false, "Enable Sympa for Group?", array( + 'for' => 'gsh_input_isSympa', + 'class' => "col-sm-3 col-form-label" + )); ?> +
+ Form->input( + 'gsh_input_isSympa', + array( + 'label' => false, + 'class' => 'form-check-input', + 'legend' => false, + 'id' => 'gsh_input_isSympa', + 'before' => '
', + 'separator' => '
', + 'after' => '
', + 'options' => array( + true => 'Yes', + false => 'No' + ), + 'type' => 'radio', + 'default' => true + ) + ); ?> +
+
+
+ Sympa Domain: +
+ Form->input( + 'gsh_input_sympaDomain', + array( + 'label' => false, + 'class' => 'form-check-input', + 'legend' => false, + 'id' => 'gsh_input_sympaDomain', + 'before' => '
', + 'separator' => '
', + 'after' => '
', + 'options' => array( + 'internet2' => 'Internet2', + 'incommon' => 'Incommon' + ), + 'type' => 'radio' + ) + ); ?> +
+
+
+ Form->label(false, "Is Sympa Moderated?", array( + 'for' => 'gsh_input_isSympaModerated', + 'class' => "col-sm-3 col-form-label" + )); ?> +
+ Form->input( + 'gsh_input_isSympaModerated', + array( + 'label' => false, + 'class' => 'form-check-input', + 'legend' => false, + 'id' => 'gsh_input_isSympaModerated', + 'before' => '
', + 'separator' => '
', + 'after' => '
', + 'options' => array( + true => 'Yes', + false => 'No' + ), + 'type' => 'radio', + 'default' => false + ) + ); ?> +
+
+
+ Form->label(false, "Is Group Optin?", array( + 'for' => 'gsh_input_isOptin', + 'class' => "col-sm-3 col-form-label" + )); ?> +
+ Form->input( + 'gsh_input_isOptin', + array( + 'label' => false, + 'class' => 'form-check-input', + 'legend' => false, + 'id' => 'gsh_input_isOptin', + 'before' => '
', + 'separator' => '
', + 'after' => '
', + 'options' => array( + true => 'Yes', + false => 'No' + ), + 'type' => 'radio', + 'default' => false + ) + ); ?> +
+
+
+ Form->label(false, "Days for Attestation", array( + 'for' => 'gsh_input_attestationDays', + 'class' => "col-sm-3 col-form-label" + )); ?> +
+ Form->input('gsh_input_attestationDays', array( + 'label' => false, + 'class' => 'form-control', + 'type' => 'number', + 'default' => '30', + 'min' => '30', + 'max' => '365', + 'id' => 'gsh_input_attestationDays' + )); ?> +
+
+
+ Form->label(false, "Add Confluence?", array( + 'for' => 'gsh_input_isConfluence', + 'class' => "col-sm-3 col-form-label" + )); ?> +
+ Form->input( + 'gsh_input_isConfluence', + array( + 'label' => false, + 'class' => 'form-check-input', + 'legend' => false, + 'id' => 'gsh_input_isConfluence', + 'before' => '
', + 'separator' => '
', + 'after' => '
', + 'options' => array( + true => 'Yes', + false => 'No' + ), + 'type' => 'radio', + 'default' => false + ) + ); ?> +
+
+
+ Form->label(false, "Add Jira?", array( + 'for' => 'gsh_input_isJira', + 'class' => "col-sm-3 col-form-label" + )); ?> +
+ Form->input( + 'gsh_input_isJira', + array( + 'label' => false, + 'class' => 'form-check-input', + 'legend' => false, + 'id' => 'gsh_input_isJira', + 'before' => '
', + 'separator' => '
', + 'after' => '
', + 'options' => array( + true => 'Yes', + false => 'No' + ), + 'type' => 'radio', + 'default' => false + ) + ); ?> +
+
+
+
+ Form->button(_txt('pl.grouperlite.form.group.action.save'), array( + 'type' => 'submit', + 'class' => 'btn btn-grouper btn-primary btn-lg btn-raised', + 'id' => 'submit' + )); ?> +
+
+
+ \ No newline at end of file