|
|
|
@ -20,11 +20,16 @@ along with Booked Scheduler. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
<div id="page-manage-resource-types" class="admin-page"> |
|
|
|
|
|
|
|
|
|
{include file='Admin/Resources/manage_resource_menu.tpl' ResourcePageTitleKey='ManageResourceTypes'} |
|
|
|
|
{if ! $WP_EMBED} |
|
|
|
|
{include file='Admin/Resources/manage_resource_menu.tpl' ResourcePageTitleKey='ManageResourceStatus'} |
|
|
|
|
{else} |
|
|
|
|
<div class="clear"></div> |
|
|
|
|
{/if} |
|
|
|
|
|
|
|
|
|
<div id="globalError" class="error" style="display:none"></div> |
|
|
|
|
|
|
|
|
|
<form id="addForm" ajaxAction="{ManageResourceTypesActions::Add}" class="form-inline" role="form" method="post"> |
|
|
|
|
<input type="hidden" name="action" value="{$WP_ADMIN_POST_PREFIX}_{ManageResourceTypesActions::Add}"/> |
|
|
|
|
<div class="panel panel-default" id="add-resource-type-panel"> |
|
|
|
|
<div class="panel-heading">{translate key="AddResourceType"} {showhide_icon}</div> |
|
|
|
|
<div class="panel-body add-contents"> |
|
|
|
@ -93,6 +98,7 @@ along with Booked Scheduler. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
aria-hidden="true"> |
|
|
|
|
<div class="modal-dialog"> |
|
|
|
|
<form id="editForm" method="post" ajaxAction="{ManageResourceTypesActions::Update}"> |
|
|
|
|
<input type="hidden" name="action" value="{$WP_ADMIN_POST_PREFIX}_{ManageResourceTypesActions::Update}"/> |
|
|
|
|
<div class="modal-content"> |
|
|
|
|
<div class="modal-header"> |
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
|
|
|
@ -127,6 +133,7 @@ along with Booked Scheduler. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
aria-hidden="true"> |
|
|
|
|
<div class="modal-dialog"> |
|
|
|
|
<form id="deleteForm" method="post" ajaxAction="{ManageResourceTypesActions::Delete}"> |
|
|
|
|
<input type="hidden" name="action" value="{$WP_ADMIN_POST_PREFIX}_{ManageResourceTypesActions::Delete}"/> |
|
|
|
|
<div class="modal-content"> |
|
|
|
|
<div class="modal-header"> |
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
|
|
|
@ -195,10 +202,11 @@ along with Booked Scheduler. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
$.fn.editable.defaults.emptyclass = ''; |
|
|
|
|
$.fn.editable.defaults.params = function(params) { |
|
|
|
|
params.CSRF_TOKEN = $('#csrf_token').val(); |
|
|
|
|
params.action = '{$WP_ADMIN_POST_PREFIX}_{ManageResourceTypesActions::ChangeAttribute}'; |
|
|
|
|
return params; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var updateUrl = '{$smarty.server.SCRIPT_NAME}?action='; |
|
|
|
|
var updateUrl = '{$WP_ADMIN_POST|default:$smarty.server.SCRIPT_NAME}?action='; |
|
|
|
|
|
|
|
|
|
$('.inlineAttribute').editable({ |
|
|
|
|
url: updateUrl + '{ManageResourceTypesActions::ChangeAttribute}', |
|
|
|
@ -212,8 +220,8 @@ along with Booked Scheduler. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
setUpEditables(); |
|
|
|
|
|
|
|
|
|
var opts = { |
|
|
|
|
submitUrl: '{$smarty.server.SCRIPT_NAME}', |
|
|
|
|
saveRedirect: '{$smarty.server.SCRIPT_NAME}' |
|
|
|
|
submitUrl: '{$WP_ADMIN_POST|default:$smarty.server.SCRIPT_NAME}', |
|
|
|
|
saveRedirect: '{$WP_ADMIN_POST|default:$smarty.server.SCRIPT_NAME}' |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var resourceTypes = new ResourceTypeManagement(opts); |
|
|
|
|