Fixing a small css issue in the user class.
[elgg.git] / units / templates / templates_add.php
blob941eb6081b3eb2e7f8f079e750f0ecb883012a98
1 <?php
3 $run_result .= templates_add();
4 /*
5 global $USER;
6 global $CFG;
8 if (empty($CFG->disable_usertemplates)) {
9 // Create a new template
10 $header = __gettext("Create theme"); // gettext variable
11 $desc = __gettext("Here you can create your own themes based on one of the existing public themes. Just select which public theme you would like to alter and then create your own. You will now have edit privilages."); // gettext variable
13 $panel = <<< END
15 <h2>$header</h2>
16 <p>$desc</p>
17 <form action="index.php" method="post">
19 END;
21 $panel .= <<< END
23 END;
25 $panel .= templates_draw(array(
26 'context' => 'databox1',
27 'name' => __gettext("Theme name"),
28 'column1' => display_input_field(array("new_template_name","","text"))
32 $default = __gettext("Default Theme"); // gettext variable
33 $column1 = <<< END
35 <select name="template_based_on">
36 <option value="-1">$default</option>
37 END;
39 if ($templates = get_records_select('templates',"owner = ? OR public = ?",array($USER->ident,'yes'),'public')) {
40 foreach($templates as $template) {
41 $column1 .= "<option value=\"".$template->ident."\">".stripslashes($template->name) . "</option>";
45 $column1 .= <<< END
46 </select>
47 END;
50 $panel .= templates_draw(array(
51 'context' => 'databox1',
52 'name' => __gettext("Based on"),
53 'column1' => $column1
57 $buttonValue = __gettext("Create Theme"); // gettext variable
58 $panel .= <<< END
60 <p>
61 <input type="hidden" name="action" value="templates:create" />
62 <input type="submit" value="$buttonValue" />
63 </p>
65 </form>
67 END;
71 $run_result .= $panel;