mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-14 16:49:17 +02:00
* Added a 'WEBAPI_AUTHS' table to the database. * Added a 'USERS.WEBAPI_AUTH_TIMEOUT' field to the database. * Incremented the database version to 260. * Added 'RDUser::webapiAuthTimeout()' and 'RDUser::setWebapiAuthTimeout()' methods in 'lib/rduser.cpp' and 'lib/rduser.h'. * Added a 'WebAPI Timeout' control to the Edit User dialog in 'rdadmin/edit_user.cpp' and 'rdadmin/edit_user.h'. * Implemented a 'CreateTicket' Web API call.
75 lines
2.3 KiB
JavaScript
75 lines
2.3 KiB
JavaScript
// editcart.js
|
|
//
|
|
// Script for selecting cart label elements for the EditCart web method
|
|
//
|
|
// (C) Copyright 2015 Fred Gleason <fredg@paravelsystems.com>
|
|
//
|
|
// This program is free software; you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License version 2 as
|
|
// published by the Free Software Foundation.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public
|
|
// License along with this program; if not, write to the Free Software
|
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
//
|
|
|
|
function EditCart_Field(field)
|
|
{
|
|
if(document.getElementById("USE_"+field).checked) {
|
|
return '&'+field+'='+UrlEncode(document.getElementById(field).value);
|
|
}
|
|
return '';
|
|
}
|
|
|
|
|
|
function EditCart_MakePost()
|
|
{
|
|
var form='COMMAND=14';
|
|
form+='&LOGIN_NAME='+document.getElementById("LOGIN_NAME").value;
|
|
form+='&PASSWORD='+document.getElementById("PASSWORD").value;
|
|
form+='&TICKET='+document.getElementById("TICKET").value;
|
|
form+='&CART_NUMBER='+document.getElementById("CART_NUMBER").value;
|
|
if(document.getElementById("INCLUDE_CUTS").value.length==0) {
|
|
form+="&INCLUDE_CUTS=0";
|
|
}
|
|
else {
|
|
form+="&INCLUDE_CUTS="+document.getElementById("INCLUDE_CUTS").value;
|
|
}
|
|
form+=EditCart_Field("ASYNCHRONOUS");
|
|
form+=EditCart_Field("ENFORCE_LENGTH");
|
|
form+=EditCart_Field("FORCED_LENGTH");
|
|
form+=EditCart_Field("GROUP_NAME");
|
|
form+=EditCart_Field("TITLE");
|
|
form+=EditCart_Field("ARTIST");
|
|
form+=EditCart_Field("YEAR");
|
|
form+=EditCart_Field("SONG_ID");
|
|
form+=EditCart_Field("ALBUM");
|
|
form+=EditCart_Field("LABEL");
|
|
form+=EditCart_Field("CLIENT");
|
|
form+=EditCart_Field("AGENCY");
|
|
form+=EditCart_Field("PUBLISHER");
|
|
form+=EditCart_Field("COMPOSER");
|
|
form+=EditCart_Field("CONDUCTOR");
|
|
form+=EditCart_Field("USER_DEFINED");
|
|
form+=EditCart_Field("OWNER");
|
|
form+=EditCart_Field("NOTES");
|
|
|
|
return form;
|
|
}
|
|
|
|
function EditCart_ShowPost()
|
|
{
|
|
alert('form: '+EditCart_MakePost());
|
|
}
|
|
|
|
|
|
function EditCart_Submit()
|
|
{
|
|
PostForm(EditCart_MakePost(),"rdxport.cgi");
|
|
}
|