5a5c487ce17cf548112824e31dcb3e72d2f01af1
[atutor.git] / docs / themes / default / instructor / groups / create_manual.tmpl.php
1 <?php global $moduleFactory, $_pages;?>
2
3 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="form">
4         <div class="input-form">
5         <fieldset class="group_form"><legend class="group_form"><?php echo _AT('groups_create_manual'); ?></legend>
6                 <div class="row">
7                         <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="type"><?php echo _AT('groups_type'); ?></label><br />
8                         <?php if ($this->types): ?>
9                                 <?php echo _AT('existing_type'); ?>
10                                 <select name="type" id="type">
11                                 <?php foreach ($this->types as $type_id => $type_title): ?>
12                                         <option value="<?php echo $type_id; ?>"><?php echo $type_title; ?></option>
13                                 <?php endforeach; ?>
14                                 </select>
15                                 <strong><?php echo _AT('or'); ?></strong>
16                         <?php endif; ?>
17                         <label for="new"><?php echo _AT('new_type'); ?></label> <input type="text" name="new_type" value="<?php echo AT_print($_POST['new_type'], 'groups.type'); ?>" id="new" size="30" maxlength="40" />
18                 </div>
19
20                 <div class="row">
21                         <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="prefix"><?php echo _AT('title'); ?></label><br />
22                         <input type="text" name="prefix" id="prefix" value="<?php echo AT_print($_POST['prefix'], 'prefix'); ?>" size="20" maxlength="40" />
23                 </div>
24
25                 <div class="row">
26                         <label for="description"><?php echo _AT('description'); ?></label><br />
27                         <textarea name="description" id="description" cols="10" rows="2"><?php echo AT_print($_POST['description'], 'groups.description'); ?></textarea>
28                 </div>
29
30                 <div class="row">
31                         <?php echo _AT('tools'); ?><br />
32                                 <?php
33                                 $modules = $moduleFactory->getModules(AT_MODULE_STATUS_ENABLED, 0, TRUE);
34                                 $keys = array_keys($modules);
35                                 $i=0;
36                                 ?>
37                                 <?php foreach($keys as $module_name): ?>
38                                         <?php $module =& $modules[$module_name]; ?>
39                                         <?php if ($module->getGroupTool() && (in_array($module->getGroupTool(),$_pages[AT_NAV_HOME]) || in_array($module->getGroupTool(),$_pages[AT_NAV_COURSE])) ): ?>
40                                                 <input type="checkbox" value="<?php echo $module_name; ?>" name="modules[]" id="m<?php echo ++$i; ?>" /><label for="m<?php echo $i; ?>"><?php echo $module->getName(); ?></label><br />
41                                         <?php endif; ?>
42                                 <?php endforeach; ?>
43                 </div>
44
45                 <div class="row buttons">
46                         <input type="submit" name="submit" value="<?php echo _AT('create'); ?>" accesskey="s" />
47                         <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?>" />
48                 </div>
49                 </fieldset>
50         </div>
51 </form>