2 /************************************************************************/
\r
4 /************************************************************************/
\r
5 /* Copyright (c) 2010 */
\r
6 /* Inclusive Design Institute */
\r
8 /* This program is free software. You can redistribute it and/or */
\r
9 /* modify it under the terms of the GNU General Public License */
\r
10 /* as published by the Free Software Foundation. */
\r
11 /************************************************************************/
\r
14 $onload = "initial();";
\r
16 include(TR_INCLUDE_PATH.'header.inc.php');
\r
19 <form name="input_form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?><?php if (isset($_GET["id"])) echo '?id='.$_GET["id"]; ?>" >
\r
20 <?php if (isset($this->row["language_code"])) {?>
\r
21 <input type="hidden" name="language_code" value="<?php echo $this->row["language_code"]; ?>" />
\r
22 <input type="hidden" name="charset" value="<?php echo $this->row["charset"]; ?>" />
\r
25 <div class="input-form">
\r
27 <fieldset class="group_form"><legend class="group_form"><?php echo _AT('add_edit_language'); ?></legend>
\r
28 <table class="form-data" align="center">
\r
30 <td colspan="2" align="left"><?php echo _AT('required_field_text') ;?></td>
\r
34 <th><span class="required" title="<?php echo _AT('required_field'); ?>">*</span>
\r
35 <label for="lang_code"><?php echo _AT('lang_code'); ?></label></th>
\r
37 <?php if (isset($this->row['language_code'])) echo $this->row['lang_code']; else {?>
\r
38 <select name="lang_code" id="lang_code">
\r
39 <option value="-1">-- <?php echo _AT('select');?> --</option>
\r
41 foreach ($this->rows_lang as $row_lang)
\r
44 <option value="<?php echo $row_lang['code_3letters']; ?>" <?php if ((isset($_POST["lang_code"]) && $_REQUEST["lang_code"] == $row_lang['code_3letters']) || (!isset($_REQUEST["lang_code"]) && $this->row["lang_code"] == $row_lang['code_3letters'])) echo 'selected="selected"'; ?>><?php echo $row_lang["description"]. ' - '. $row_lang['code_3letters']; ?></option>
\r
54 <th><label for="lang_code"> <?php echo _AT('lang_code'); ?></label></th>
\r
56 <?php if (isset($this->row['language_code'])) echo $this->row['language_code']; else {?>
\r
57 <input id="lang_code" name="lang_code" type="text" size="2" maxlength="2" value="<?php if (isset($_POST['lang_code'])) echo $_POST['lang_code']; else echo $this->row['language_code']; ?>" />
\r
63 <th><label for="locale"> <?php echo _AT('locale'); ?></label></th>
\r
65 <?php if (isset($this->row['language_code'])) if ($this->row['locale'] == '') echo _AT('na'); else echo $this->row['locale']; else {?>
\r
66 <input id="locale" name="locale" type="text" size="2" maxlength="2" value="<?php if (isset($_POST['locale'])) echo $_POST['locale']; else echo $this->row['locale']; ?>" />
\r
72 <th><span class="required" title="<?php echo _AT('required_field'); ?>">*</span>
\r
73 <label for="charset"><?php echo _AT('charset'); ?></label></th>
\r
75 <?php if (isset($this->row['language_code'])) echo $this->row['charset']; else {?>
\r
76 <input type="text" name="charset" id="charset" value="<?php if (isset($_POST['charset'])) echo $_POST['charset']; else if (isset($this->row["charset"])) echo $this->row["charset"]; else echo DEFAULT_CHARSET; ?>" />
\r
82 <th><span class="required" title="<?php echo _AT('required_field'); ?>">*</span>
\r
83 <label for="native_name"><?php echo _AT('name_in_language'); ?></label></th>
\r
84 <td><input type="text" name="native_name" id="native_name" value="<?php if (isset($_POST['native_name'])) echo $_POST['native_name']; else echo $this->row["native_name"]; ?>" /></td>
\r
88 <th><span class="required" title="<?php echo _AT('required_field'); ?>">*</span>
\r
89 <label for="english_name"><?php echo _AT('name_in_english'); ?></label></th>
\r
90 <td><input type="text" name="english_name" id="english_name" value="<?php if (isset($_POST['english_name'])) echo $_POST['english_name']; else echo $this->row["english_name"]; ?>" /></td>
\r
94 <th> <?php echo _AT("status"); ?></th>
\r
96 <input type="radio" name="status" id="statusD" value="0" <?php if ((isset($_POST['status']) && $_POST['status']==0) || (!isset($_POST['status']) && $this->row['status']==0)) echo 'checked="checked"'; ?> /><label for="statusD"><?php echo _AT('disabled'); ?></label>
\r
97 <input type="radio" name="status" id="statusE" value="1" <?php if ((isset($_POST['status']) && $_POST['status']==1) || (!isset($_POST['status']) && $this->row['status']==1) || (!isset($_POST['status']) && !isset($this->row['status']))) echo 'checked="checked"'; ?> /><label for="statusE"><?php echo _AT('enabled'); ?></label>
\r
102 <td colspan="2" align="center">
\r
103 <p class="submit_button">
\r
104 <input type="submit" name="save" value="<?php echo _AT('save'); ?>" />
\r
105 <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?>" />
\r
115 <script type="text/JavaScript">
\r
120 // set cursor focus
\r
121 document.input_form.lang_code.focus();
\r
124 function CheckAll(element_name, selectall_checkbox_name) {
\r
125 for (var i=0;i<document.input_form.elements.length;i++) {
\r
126 var e = document.input_form.elements[i];
\r
127 if ((e.name == element_name) && (e.type=='checkbox')) {
\r
128 e.checked = document.input_form[selectall_checkbox_name].checked;
\r
129 togglerowhighlight(document.getElementById("r" + e.id), e.id);
\r
134 function togglerowhighlight(obj, boxid) {
\r
135 if (document.getElementById(boxid).checked) {
\r
136 obj.className = 'selected';
\r
138 obj.className = '';
\r
145 <?php include(TR_INCLUDE_PATH.'footer.inc.php'); ?>
\r