Skip to content

Commit

Permalink
Added create template fields
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Mar 12, 2021
1 parent e9741dc commit 61671a2
Show file tree
Hide file tree
Showing 8 changed files with 286 additions and 178 deletions.
2 changes: 1 addition & 1 deletion Controller/GrouperGroupsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
1 change: 1 addition & 0 deletions Lib/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -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!',
Expand Down
6 changes: 3 additions & 3 deletions View/Elements/Components/navigation-emaillists.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
<?php if ($isuserowner === 'T') { ?>
<div class="align-self-center">
<?php
$createGroupUrl = $this->Html->url(
$createEmailUrl = $this->Html->url(
array(
'controller' => 'groupergroups',
'action' => 'groupcreateform'
'action' => 'groupcreatetemplateform'
)
);
?>
<a href="<?php echo $createGroupUrl; ?>" class="btn btn-grouper btn btn-link px-3 py-2">
<a href="<?php echo $createEmailUrl; ?>" class="btn btn-grouper btn btn-link px-3 py-2">
<i class="fa fa-plus-circle"></i>&nbsp; <?php echo _txt('pl.grouperlite.nav.create-email'); ?>
</a>
</div>
Expand Down
6 changes: 3 additions & 3 deletions View/Elements/pagination.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ $includeGoto = isset($goto) ? $goto : true;
<form id="limit-page" class="pagination-form pagination-element pagination-limit d-flex align-items-center" method="get" onsubmit="limitPage(this.pageLimit.value,recordCount,currentPage,currentPath,currentAction); return false;">
<label for="pageLimit"><?php print _txt('fd.page.limit.display'); ?></label>
<select name="pageLimit" id="pageLimit">
<option value="2">2</option>
<option value="4">4</option>
<option value="6">6</option>
<option value="20">20</option>
<option value="50">50</option>
<option value="all">all</option>
</select>
<p class=""><?php print _txt('fd.page.limit.records'); ?></p>
<input type="submit" value="<?php print _txt('op.go'); ?>" class="btn btn-primary-light" />
Expand Down
13 changes: 7 additions & 6 deletions View/GrouperGroups/groupcreateform.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ $model = $this->name;
)); ?>
<?php
if (!empty($this->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");
}
?>
<?php $this->Form->end(); ?>
</div>
</div>
</div>
</div>
</div>
187 changes: 22 additions & 165 deletions View/GrouperGroups/groupcreatetemplateform.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -2,172 +2,29 @@
$this->extend('/GrouperGroups/base');
$this->Html->addCrumb('Create a Template Group');

$model = $this->name;
?>
<hr />
<div class="mt-4">
<div class="row">
<div class="col-lg-9 col-xs-12 col-xl-6">
<div class="create-group">
<?php echo $this->Form->create(false, array(
'url' => array('controller' => 'groupergroups', 'action' => 'groupcreatetemplateform')
)); ?>

<fieldset id="form" class="">
<div class="form-group row py-2 bg-light">
<?php echo $this->Form->label(false, "Working Group Extension", array(
'for' => 'gsh_input_workingGroupExtension',
'class' => "col-sm-3 col-form-label"
)); ?>
<div class="col-sm-9">
<?php echo $this->Form->input('gsh_input_workingGroupExtension', array(
'label' => false,
'class' => 'form-control',
'required' => true,
'maxlength' => '62',
'id' => 'gsh_input_workingGroupExtension'
)); ?>
</div>
</div>
<div class="form-group row py-2 bg-light">
<?php echo $this->Form->label(false, "Working Group Display Extension", array(
'for' => 'gsh_input_workingGroupDisplayExtension',
'class' => "col-sm-3 col-form-label"
)); ?>
<div class="col-sm-9">
<?php echo $this->Form->input('gsh_input_workingGroupDisplayExtension', array(
'label' => false,
'class' => 'form-control',
'maxlength' => '62',
'id' => 'gsh_input_workingGroupDisplayExtension'
)); ?>
</div>
</div>
<div class="form-group row py-2 bg-light">
<?php echo $this->Form->label(false, "Working Group Description", array(
'for' => 'gsh_input_workingGroupDescription',
'class' => "col-sm-3 col-form-label"
)); ?>
<div class="col-sm-9">
<?php echo $this->Form->input('gsh_input_workingGroupDescription', array(
'label' => false,
'class' => 'form-control',
'maxlength' => '62',
'id' => 'gsh_input_workingGroupDescription'
)); ?>
</div>
</div>
<div class="form-group row py-2 bg-light">
<?php echo $this->Form->label(false, "Enable Sympa for Group?", array(
'for' => 'gsh_input_isSympa',
'class' => "col-sm-3 col-form-label"
)); ?>
<div class="col-sm-9">
<?php echo $this->Form->checkbox('gsh_input_isSympa', array(
'label' => false,
'class' => 'form-control',
'id' => 'gsh_input_isSympa'
)); ?>
</div>
</div>
<div class="form-group row py-2 bg-light">
<?php echo $this->Form->label(false, "Sympa Domain", array(
'for' => 'gsh_input_sympaDomain',
'class' => "col-sm-3 col-form-label"
)); ?>
<div class="col-sm-9">
<?php echo $this->Form->radio(
'gsh_input_sympaDomain',
array(
'internet2' => 'internet2',
'incommon' => 'incommon'),
array(
'label' => false,
'class' => 'form-control',
'legend' => false,
'id' => 'gsh_input_sympaDomain'
)
); ?>
</div>
</div>
<div class="form-group row py-2 bg-light">
<?php echo $this->Form->label(false, "Is Sympa Moderated?", array(
'for' => 'gsh_input_isSympaModerated',
'class' => "col-sm-3 col-form-label"
)); ?>
<div class="col-sm-9">
<?php echo $this->Form->checkbox('gsh_input_isSympaModerated', array(
'label' => false,
'class' => 'form-control',
'id' => 'gsh_input_isSympaModerated'
)); ?>
</div>
</div>
<div class="form-group row py-2 bg-light">
<?php echo $this->Form->label(false, "Is Group Optin?", array(
'for' => 'gsh_input_isOptin',
'class' => "col-sm-3 col-form-label"
)); ?>
<div class="col-sm-9">
<?php echo $this->Form->checkbox('gsh_input_isOptin', array(
'label' => false,
'class' => 'form-control',
'id' => 'gsh_input_isOptin'
)); ?>
</div>
</div>
<div class="form-group row py-2 bg-light">
<?php echo $this->Form->label(false, "Days for Attestation", array(
'for' => 'gsh_input_attestationDays',
'class' => "col-sm-3 col-form-label"
)); ?>
<div class="col-sm-9">
<?php echo $this->Form->input('gsh_input_attestationDays', array(
'label' => false,
'class' => 'form-control',
'type' => 'number',
'default' => '30',
'min' => '30',
'max' => '365',
'id' => 'gsh_input_attestationDays'
)); ?>
</div>
</div>
<div class="form-group row py-2 bg-light">
<?php echo $this->Form->label(false, "Add Confluence?", array(
'for' => 'gsh_input_isConfluence',
'class' => "col-sm-3 col-form-label"
)); ?>
<div class="col-sm-9">
<?php echo $this->Form->checkbox('gsh_input_isConfluence', array(
'label' => false,
'class' => 'form-control',
'id' => 'gsh_input_isConfluence'
)); ?>
</div>
</div>
<div class="form-group row py-2 bg-light">
<?php echo $this->Form->label(false, "Add Jira?", array(
'for' => 'gsh_input_isJira',
'class' => "col-sm-3 col-form-label"
)); ?>
<div class="col-sm-9">
<?php echo $this->Form->checkbox('gsh_input_isJira', array(
'label' => false,
'class' => 'form-control',
'id' => 'gsh_input_isJira'
)); ?>
</div>
</div>
<div class="form-group row py-2 bg-lighter">
<div class="col-sm-9 offset-sm-3">
<?php echo $this->Form->button(_txt('pl.grouperlite.form.group.action.save'), array(
'type' => 'submit',
'class' => 'btn btn-grouper btn-primary btn-lg btn-raised'
)); ?>
</div>
</div>
</fieldset>
<?php echo $this->Form->end(); ?>
</div>
<div class="row">
<div class="col-lg-9 col-xs-12 col-xl-6">
<div class="create-group">
<?php echo $this->Form->create(false, array(
'url' => array('controller' => 'groupergroups', 'action' => 'groupcreatetemplateform')
)); ?>
<?php
if (!empty($this->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");
}
?>
<?php $this->Form->end(); ?>
</div>
</div>
</div>
</div>
</div>
File renamed without changes.
Loading

0 comments on commit 61671a2

Please sign in to comment.