Commit 1b48cf93 authored by Marius Cramer's avatar Marius Cramer
Browse files

- fixed javascript for new ISPConfig object

parent d76e2d6e
......@@ -75,13 +75,13 @@ class listform_tpl_generator {
foreach($listDef["item"] as $field) {
$key = $field["field"];
if($field["formtype"] == 'SELECT') {
$html .= " <td class=\"tbl_col_".$key."\"><select name=\"".$listDef["search_prefix"].$key."\" onChange=\"submitForm('pageForm','".$module."/".$listDef["file"]."');\">{tmpl_var name='".$listDef["search_prefix"].$key."'}</select></td>\n";
$html .= " <td class=\"tbl_col_".$key."\"><select name=\"".$listDef["search_prefix"].$key."\" onChange=\"ISPConfig.submitForm('pageForm','".$module."/".$listDef["file"]."');\">{tmpl_var name='".$listDef["search_prefix"].$key."'}</select></td>\n";
} else {
$html .= " <td class=\"tbl_col_".$key."\"><input type=\"text\" name=\"".$listDef["search_prefix"].$key."\" value=\"{tmpl_var name='".$listDef["search_prefix"].$key."'}\" /></td>\n";
}
}
$html .= ' <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="'."submitForm('pageForm','".$module."/".$listDef["file"]."');".'"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
$html .= ' <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="'."ISPConfig.submitForm('pageForm','".$module."/".$listDef["file"]."');".'"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
</tr>
</thead>
<tbody>
......
......@@ -136,7 +136,7 @@ class tform_tpl_generator {
<input type=\"hidden\" name=\"id\" value=\"{tmpl_var name='id'}\">
<div class=\"buttonHolder buttons\">
<button class=\"positive iconstxt icoPositive\" type=\"button\" value=\"{tmpl_var name='btn_save_txt'}\" onclick=\"submitForm('pageForm','".$module."/".$formDef["action"]."');\"><span>{tmpl_var name='btn_save_txt'}</span></button>
<button class=\"positive iconstxt icoPositive\" type=\"button\" value=\"{tmpl_var name='btn_save_txt'}\" onclick=\"ISPConfig.submitForm('pageForm','".$module."/".$formDef["action"]."');\"><span>{tmpl_var name='btn_save_txt'}</span></button>
<button class=\"negative iconstxt icoNegative\" type=\"button\" value=\"{tmpl_var name='btn_cancel_txt'}\" data-load-content=\"".$module."/".$formDef["list_default"]."\"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
</div>
</div>
......
......@@ -130,7 +130,7 @@ if($install_server_id > 0 && $package_name != '' && ($package['package_installab
//* Add the record to start the install process
$insert_data = "(package_name, server_id, software_update_id, status) VALUES ('".$app->db->quote($package_name)."', '".$app->db->quote($install_server_id)."', '".$app->db->quote($software_update_id)."','installing')";
$app->db->datalogInsert('software_update_inst', $insert_data, 'software_update_inst_id');
$message_ok = 'Starting package installation '."<a href=\"#\" onclick=\"submitForm('pageForm','admin/software_package_list.php');\">".$app->lng('next')."</a>";
$message_ok = 'Starting package installation '."<a href=\"#\" onclick=\"ISPConfig.submitForm('pageForm','admin/software_package_list.php');\">".$app->lng('next')."</a>";
}
......
......@@ -8,7 +8,7 @@
<div class="form-group">
<label for="lng_select" class="col-sm-3 control-label">{tmpl_var name='language_select_txt'}</label>
<div class="col-sm-9"><select name="lng_select" id="language" class="form-control flags" onChange="submitForm('pageForm','admin/language_list.php');">
<div class="col-sm-9"><select name="lng_select" id="language" class="form-control flags" onChange="ISPConfig.submitForm('pageForm','admin/language_list.php');">
{tmpl_var name='language_option'}
</select></div>
......
......@@ -8,7 +8,7 @@
<div class="form-group">
<label for="server_id" class="col-sm-3 control-label">{tmpl_var name='server_select_txt'}</label>
<div class="col-sm-9"><select name="server_id" id="server_id" class="form-control" onChange="submitForm('pageForm','admin/software_update_list.php');">
<div class="col-sm-9"><select name="server_id" id="server_id" class="form-control" onChange="ISPConfig.submitForm('pageForm','admin/software_update_list.php');">
<tmpl_loop name="servers">
<option value="{tmpl_var name='server_id'}" {tmpl_var name='selected'}>{tmpl_var name='server_name'}</option>
</tmpl_loop>
......
......@@ -14,7 +14,7 @@
</fieldset>
<input type="hidden" name="id" value="{tmpl_var name='id'}">
<div class="buttonHolder buttons">
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','admin/system_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="ISPConfig.submitForm('pageForm','admin/system_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
<button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_list.php"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
</div>
</div>
......
......@@ -20,7 +20,7 @@
<th class="text-right">&nbsp;</th>
</tr>
<tr>
<td><select class="form-control" name="search_template_type" onChange="submitForm('pageForm','client/message_template_list.php');">{tmpl_var name='search_template_type'}</select></td>
<td><select class="form-control" name="search_template_type" onChange="ISPConfig.submitForm('pageForm','client/message_template_list.php');">{tmpl_var name='search_template_type'}</select></td>
<td><input class="form-control" type="text" name="search_template_name" value="{tmpl_var name='search_template_name'}" /></td>
<td class="text-right"><div class="buttons"><button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="client/message_template_list.php"><span class="icon icon-filter"></span></button></div></td>
</tr>
......
......@@ -20,7 +20,7 @@
<th class="text-right">&nbsp;</th>
</tr>
<tr>
<td><select class="form-control" name="search_template_type" onChange="submitForm('pageForm','billing/invoice_message_template_list.php');">{tmpl_var name='search_template_type'}</select></td>
<td><select class="form-control" name="search_template_type" onChange="ISPConfig.submitForm('pageForm','billing/invoice_message_template_list.php');">{tmpl_var name='search_template_type'}</select></td>
<td><input class="form-control" type="text" name="search_template_name" value="{tmpl_var name='search_template_name'}" /></td>
<td class="text-right"><div class="buttons"><button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="billing/invoice_message_template_list.php"><span class="icon icon-filter"></span></button></div></td>
</tr>
......
......@@ -11,7 +11,7 @@
<legend><tmpl_var name="dns_zone_txt"></legend>
<div class="form-group">
<label for="template_id" class="col-sm-3 control-label">{tmpl_var name='template_id_txt'}</label>
<div class="col-sm-9"><select name="template_id" id="template_id" class="form-control" onChange="submitForm('pageForm','dns/dns_wizard.php')">
<div class="col-sm-9"><select name="template_id" id="template_id" class="form-control" onChange="ISPConfig.submitForm('pageForm','dns/dns_wizard.php')">
{tmpl_var name='template_id_option'}
</select></div>
</div>
......@@ -98,7 +98,7 @@
<input type="hidden" name="create" value="0" />
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" name="btn_create" onclick="document.pageForm.create.value=1; submitForm('pageForm','dns/dns_wizard.php');">{tmpl_var name='btn_save_txt'}</button>
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" name="btn_create" onclick="document.pageForm.create.value=1; ISPConfig.submitForm('pageForm','dns/dns_wizard.php');">{tmpl_var name='btn_save_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="dns/dns_soa_list.php">{tmpl_var name='btn_cancel_txt'}</button>
</div></div>
<script language="JavaScript" type="text/javascript">
......
......@@ -44,6 +44,6 @@
<input type="hidden" name="install" value="0" />
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_install_txt'}" name="btn_install" onclick="document.pageForm.install.value=1; submitForm('pageForm','sites/aps_install_package.php?id={tmpl_var name='pkg_id'}');">{tmpl_var name='btn_install_txt'}</button>
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_install_txt'}" name="btn_install" onclick="document.pageForm.install.value=1; ISPConfig.submitForm('pageForm','sites/aps_install_package.php?id={tmpl_var name='pkg_id'}');">{tmpl_var name='btn_install_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="sites/aps_availablepackages_list.php">{tmpl_var name='btn_cancel_txt'}</button>
</div></div>
......@@ -22,7 +22,7 @@
<!--<td><input class="form-control" type="text" name="search_customer_name" value="{tmpl_var name='search_customer_name'}" /></td>-->
</tmpl_if>
<td>&nbsp;</td>
<td><select class="form-control" name="search_instance_status" onChange="submitForm('pageForm','sites/aps_installedpackages_list.php');">{tmpl_var name='search_instance_status'}</select></td>
<td><select class="form-control" name="search_instance_status" onChange="ISPConfig.submitForm('pageForm','sites/aps_installedpackages_list.php');">{tmpl_var name='search_instance_status'}</select></td>
<td class="text-right">
<button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name='filter_txt'}" data-submit-form="pageForm" data-form-action="sites/aps_installedpackages_list.php"><span class="icon icon-filter"></span></button>
</td>
......
......@@ -17,9 +17,9 @@
<tr>
<td><input class="form-control" type="text" name="search_name" value="{tmpl_var name='search_name'}" /></td>
<td><input class="form-control" type="text" name="search_version" value="{tmpl_var name='search_version'}" /></td>
<td><select class="form-control" name="search_category" onChange="submitForm('pageForm','sites/aps_availablepackages_list.php');">{tmpl_var name='search_category'}</select></td>
<td><select class="form-control" name="search_category" onChange="ISPConfig.submitForm('pageForm','sites/aps_availablepackages_list.php');">{tmpl_var name='search_category'}</select></td>
<tmpl_if name='is_admin'>
<td><select class="form-control" name="search_package_status" onChange="submitForm('pageForm','sites/aps_availablepackages_list.php');">{tmpl_var name='search_package_status'}</select></td>
<td><select class="form-control" name="search_package_status" onChange="ISPConfig.submitForm('pageForm','sites/aps_availablepackages_list.php');">{tmpl_var name='search_package_status'}</select></td>
</tmpl_if>
<td class="text-right"><button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name='filter_txt'}" data-submit-form="pageForm" data-form-action="sites/aps_availablepackages_list.php"><span class="icon icon-filter"></span></button></td>
</tr>
......
......@@ -38,9 +38,9 @@
<th class="small-col text-right">{tmpl_var name='search_limit'}</th>
</tr>
<tr>
<td><select class="form-control" name="search_active" onChange="submitForm('pageForm','sites/web_folder_list.php');">{tmpl_var name='search_active'}</select></td>
<td><select class="form-control" name="search_server_id" onChange="submitForm('pageForm','sites/web_folder_list.php');">{tmpl_var name='search_server_id'}</select></td>
<td><select class="form-control" name="search_parent_domain_id" onChange="submitForm('pageForm','sites/web_folder_list.php');">{tmpl_var name='search_parent_domain_id'}</select></td>
<td><select class="form-control" name="search_active" onChange="ISPConfig.submitForm('pageForm','sites/web_folder_list.php');">{tmpl_var name='search_active'}</select></td>
<td><select class="form-control" name="search_server_id" onChange="ISPConfig.submitForm('pageForm','sites/web_folder_list.php');">{tmpl_var name='search_server_id'}</select></td>
<td><select class="form-control" name="search_parent_domain_id" onChange="ISPConfig.submitForm('pageForm','sites/web_folder_list.php');">{tmpl_var name='search_parent_domain_id'}</select></td>
<td><input class="form-control" type="text" name="search_path" value="{tmpl_var name='search_path'}" /></td>
<td class="text-right">
<button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="sites/web_folder_list.php"><span class="icon icon-filter"></span></button>
......
......@@ -37,8 +37,8 @@
<th class="small-col text-right">{tmpl_var name='search_limit'}</th>
</tr>
<tr>
<td><select class="form-control" name="search_active" onChange="submitForm('pageForm','sites/web_folder_user_list.php');">{tmpl_var name='search_active'}</select></td>
<td><select class="form-control" name="search_web_folder_id" onChange="submitForm('pageForm','sites/web_folder_user_list.php');">{tmpl_var name='search_web_folder_id'}</select></td>
<td><select class="form-control" name="search_active" onChange="ISPConfig.submitForm('pageForm','sites/web_folder_user_list.php');">{tmpl_var name='search_active'}</select></td>
<td><select class="form-control" name="search_web_folder_id" onChange="ISPConfig.submitForm('pageForm','sites/web_folder_user_list.php');">{tmpl_var name='search_web_folder_id'}</select></td>
<td><input class="form-control" type="text" name="search_username" value="{tmpl_var name='search_username'}" /></td>
<td class="text-right">
<button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="sites/web_folder_user_list.php"><span class="icon icon-filter"></span></button>
......
......@@ -355,11 +355,11 @@
<tmpl_if name="readonly_tab">
jQuery('div.panel_web_domain').find('fieldset').find('input,select,button').not('#directive_snippets_id').bind('click mousedown', function(e) { e.preventDefault(); }).focus(function() { $(this).blur(); });
jQuery('#dom-edit-submit').click(function() {
submitForm('pageForm','sites/web_vhost_domain_edit.php');
ISPConfig.submitForm('pageForm','sites/web_vhost_domain_edit.php');
});
<tmpl_else>
jQuery('#dom-edit-submit').click(function() {
submitForm('pageForm','sites/web_vhost_domain_edit.php');
ISPConfig.submitForm('pageForm','sites/web_vhost_domain_edit.php');
});
</tmpl_if>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment