Merge remote branch 'upstream/master' into BUG-9508
This commit is contained in:
@@ -4585,9 +4585,9 @@ class Cases
|
||||
throw (new Exception("Template file \"$fileTemplate\" does not exist."));
|
||||
}
|
||||
|
||||
$sBody = G::replaceDataField(file_get_contents($fileTemplate), $aFields);
|
||||
$sBody = G::replaceDataGridField(file_get_contents($fileTemplate), $aFields);
|
||||
} else {
|
||||
$sBody = nl2br(G::replaceDataField($aTaskInfo["TAS_DEF_MESSAGE"], $aFields));
|
||||
$sBody = nl2br(G::replaceDataGridField($aTaskInfo["TAS_DEF_MESSAGE"], $aFields));
|
||||
}
|
||||
|
||||
G::LoadClass("tasks");
|
||||
|
||||
@@ -276,7 +276,7 @@ class Content extends BaseContent {
|
||||
*
|
||||
* @param array $langs
|
||||
*/
|
||||
function regenerateContent($langId)
|
||||
function regenerateContent($langs)
|
||||
{
|
||||
//Search the language
|
||||
$key = array_search('en',$langs);
|
||||
@@ -382,6 +382,17 @@ class Content extends BaseContent {
|
||||
}
|
||||
}
|
||||
|
||||
function fastInsertContent ($ConCategory, $ConParent, $ConId, $ConLang, $ConValue) {
|
||||
$con = new Content ( );
|
||||
$con->setConCategory ( $ConCategory );
|
||||
$con->setConParent ( $ConParent );
|
||||
$con->setConId ( $ConId );
|
||||
$con->setConLang ( $ConLang );
|
||||
$con->setConValue ( $ConValue );
|
||||
$res = $con->save ();
|
||||
return $res;
|
||||
}
|
||||
|
||||
function removeLanguageContent($lanId) {
|
||||
try {
|
||||
$c = new Criteria ( );
|
||||
|
||||
@@ -30,6 +30,10 @@ if (isset ($_POST['form']['USER_ENV'])) {
|
||||
die ();
|
||||
}
|
||||
|
||||
@session_destroy();
|
||||
session_start();
|
||||
session_regenerate_id();
|
||||
|
||||
//Required classes for dbArray work
|
||||
require_once ("propel/Propel.php");
|
||||
require_once ("creole/Creole.php");
|
||||
|
||||
@@ -61,8 +61,8 @@ $roles['ROL_UID'] = $_GET['rUID'];
|
||||
$roles['ROL_CODE'] = $RBAC->getRoleCode($_GET['rUID']);
|
||||
$roles['CURRENT_TAB'] = ($_GET['tab']=='permissions') ? 1 : 0;
|
||||
|
||||
|
||||
$oHeadPublisher->assign('ROLES', $roles);
|
||||
$oHeadPublisher->assign('permissionsAdmin', $RBAC->loadPermissionAdmin());
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
?>
|
||||
203
workflow/engine/methods/services/Rest/CRUD.java
Normal file
203
workflow/engine/methods/services/Rest/CRUD.java
Normal file
@@ -0,0 +1,203 @@
|
||||
// Main class to sent differen kind of messages to the http server
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
|
||||
// Enter CRUD memebers
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.methods.HttpPut;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.client.methods.HttpDelete;
|
||||
|
||||
// Used to set JSON or XML messages request
|
||||
import org.apache.http.entity.StringEntity;
|
||||
|
||||
// Needed for response fetch goal
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
/**
|
||||
* Single class containing functions to show how to use GET,POST,PUT,DELETE methods.
|
||||
*/
|
||||
public class CRUD
|
||||
{
|
||||
private static String m_user = "workflow"; // This member variable must be changed to its own dev workspace
|
||||
|
||||
private static void PostSample()
|
||||
{
|
||||
System.out.println("POST: Enter login params\n");
|
||||
|
||||
String loginParamsXML = "<?xml version='1.0'?>\n"
|
||||
+"<request>\n"
|
||||
+"<user>admin</user>\n"
|
||||
+"<password>admin</password>\n"
|
||||
+"</request>";
|
||||
String URI = "http://"+m_user+".pmos.colosa.net/rest/"+m_user+"/login/";
|
||||
|
||||
System.out.println( "Request: "+URI + "\n"+ loginParamsXML + "\n");
|
||||
|
||||
DefaultHttpClient httpClient = new DefaultHttpClient();
|
||||
HttpPost postRequest = new HttpPost(URI);
|
||||
try
|
||||
{
|
||||
StringEntity input = new StringEntity( loginParamsXML);
|
||||
input.setContentType("application/xml");
|
||||
postRequest.setEntity(input);
|
||||
HttpResponse httpResponse = httpClient.execute(postRequest);
|
||||
|
||||
HttpEntity responseEntity = httpResponse.getEntity();
|
||||
if( responseEntity != null)
|
||||
{
|
||||
String response = new String();
|
||||
response = EntityUtils.toString( responseEntity);
|
||||
System.out.println( "Response: " + response + "\n");
|
||||
}
|
||||
}
|
||||
catch( java.io.IOException x)
|
||||
{
|
||||
throw new RuntimeException("I/O error: " + x.toString());
|
||||
}
|
||||
}
|
||||
|
||||
private static void GetSample()
|
||||
{
|
||||
System.out.println("GET: Display TRANSLATION table row\n");
|
||||
|
||||
String URI = "http://"+m_user+".pmos.colosa.net/rest/"+m_user+"/TRANSLATION/LABEL/LOGIN/en/";
|
||||
System.out.println( "Request: " + URI + "\n");
|
||||
|
||||
DefaultHttpClient httpClient = new DefaultHttpClient();
|
||||
HttpGet getRequest = new HttpGet(URI);
|
||||
try
|
||||
{
|
||||
HttpResponse httpResponse = httpClient.execute(getRequest);
|
||||
|
||||
HttpEntity responseEntity = httpResponse.getEntity();
|
||||
if( responseEntity != null)
|
||||
{
|
||||
String response = new String();
|
||||
response = EntityUtils.toString( responseEntity);
|
||||
System.out.println( "Response: " + response + "\n");
|
||||
}
|
||||
}
|
||||
catch( java.io.IOException x)
|
||||
{
|
||||
throw new RuntimeException("I/O error: " + x.toString());
|
||||
}
|
||||
}
|
||||
|
||||
private static void AnotherPostSample()
|
||||
{
|
||||
System.out.println("POST: Insert new row in TRANLATION\n");
|
||||
|
||||
String URI = "http://"+m_user+".pmos.colosa.net/rest/"+m_user+"/TRANSLATION/";
|
||||
String newRow = "BUTTON/ESCAPE/en/sample/2012-05-05/";
|
||||
System.out.println( "Request: " + URI + " new row: " + newRow + "\n");
|
||||
URI = URI + newRow;
|
||||
|
||||
DefaultHttpClient httpClient = new DefaultHttpClient();
|
||||
HttpPost postRequest = new HttpPost(URI);
|
||||
try
|
||||
{
|
||||
HttpResponse httpResponse = httpClient.execute(postRequest);
|
||||
|
||||
HttpEntity responseEntity = httpResponse.getEntity();
|
||||
if( responseEntity != null)
|
||||
{
|
||||
String response = new String();
|
||||
if(response.isEmpty())
|
||||
{
|
||||
System.out.println( "Response: Status code: " + httpResponse.getStatusLine().getStatusCode()+ "\n");
|
||||
return;
|
||||
}
|
||||
response = EntityUtils.toString( responseEntity);
|
||||
System.out.println( "Response: " + response + "\n");
|
||||
}
|
||||
}
|
||||
catch( java.io.IOException x)
|
||||
{
|
||||
throw new RuntimeException("I/O error: " + x.toString());
|
||||
}
|
||||
}
|
||||
|
||||
private static void PutSample()
|
||||
{
|
||||
System.out.println("POST: Update a row in TRANLATION\n");
|
||||
|
||||
String URI = "http://"+m_user+".pmos.colosa.net/rest/"+m_user+"/TRANSLATION/";
|
||||
String index = "BUTTON/ESCAPE/en/";
|
||||
String updateData = "changesample/2011-07-06/";
|
||||
|
||||
System.out.println( "Request: " + URI + " index: " + index + " updateData: " + updateData + "\n");
|
||||
URI = URI + index + updateData;
|
||||
|
||||
DefaultHttpClient httpClient = new DefaultHttpClient();
|
||||
HttpPut putRequest = new HttpPut(URI);
|
||||
try
|
||||
{
|
||||
HttpResponse httpResponse = httpClient.execute(putRequest);
|
||||
|
||||
HttpEntity responseEntity = httpResponse.getEntity();
|
||||
if( responseEntity != null)
|
||||
{
|
||||
String response = new String();
|
||||
if(response.isEmpty())
|
||||
{
|
||||
System.out.println( "Response: Status code: " + httpResponse.getStatusLine().getStatusCode()+ "\n");
|
||||
return;
|
||||
}
|
||||
response = EntityUtils.toString( responseEntity);
|
||||
System.out.println( "Response: " + response + "\n");
|
||||
}
|
||||
}
|
||||
catch( java.io.IOException x)
|
||||
{
|
||||
throw new RuntimeException("I/O error: " + x.toString());
|
||||
}
|
||||
}
|
||||
|
||||
private static void DeleteSample()
|
||||
{
|
||||
System.out.println("DELETE: Remove a row in TRANLATION\n");
|
||||
|
||||
String URI = "http://"+m_user+".pmos.colosa.net/rest/"+m_user+"/TRANSLATION/";
|
||||
String index = "BUTTON/ESCAPE/en/";
|
||||
|
||||
System.out.println( "Request: " + URI + "index:" + index + "\n");
|
||||
URI = URI + index;
|
||||
|
||||
DefaultHttpClient httpClient = new DefaultHttpClient();
|
||||
HttpDelete deleteRequest = new HttpDelete(URI);
|
||||
try
|
||||
{
|
||||
HttpResponse httpResponse = httpClient.execute(deleteRequest);
|
||||
|
||||
HttpEntity responseEntity = httpResponse.getEntity();
|
||||
if( responseEntity != null)
|
||||
{
|
||||
String response = new String();
|
||||
if(response.isEmpty())
|
||||
{
|
||||
System.out.println( "Response: Status code: " + httpResponse.getStatusLine().getStatusCode()+ "\n");
|
||||
return;
|
||||
}
|
||||
response = EntityUtils.toString( responseEntity);
|
||||
System.out.println( "Response: " + response + "\n");
|
||||
}
|
||||
}
|
||||
catch( java.io.IOException x)
|
||||
{
|
||||
throw new RuntimeException("I/O error: " + x.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String args[])
|
||||
{
|
||||
System.out.println("CRUD samples.");
|
||||
PostSample();
|
||||
GetSample();
|
||||
AnotherPostSample();
|
||||
PutSample();
|
||||
DeleteSample();
|
||||
|
||||
}
|
||||
}
|
||||
149
workflow/engine/methods/services/Rest/CURLMessage.php
Normal file
149
workflow/engine/methods/services/Rest/CURLMessage.php
Normal file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
/**
|
||||
* Abstract class containing the CURL functionality, used to handle GET, POST, PUT and DELETE http methods.
|
||||
*
|
||||
* This class uses many different Curl functions, it would be great if this one gorws to allow the use of alll of them.
|
||||
*
|
||||
* @category Zend
|
||||
* @package ProcessMaker
|
||||
* @subpackage workflow
|
||||
* @copyright Copyright (c) ProcessMaker Colosa Inc.
|
||||
* @version Release: @2.0.44@
|
||||
* @since Class available since Release 2.0.44
|
||||
*/
|
||||
|
||||
define('PATH_SEP', '/');
|
||||
define('COLON', ':');
|
||||
define('DOT', '.');
|
||||
define('PROTOCOL_HTTP', 'http');
|
||||
|
||||
/**
|
||||
* Abstract class, containing the CURL functionality, used to handle GET, POST, PUT and DELETE http methods.
|
||||
*/
|
||||
abstract class CURLMessage
|
||||
{
|
||||
protected $restServer; // e.g. "http://ralph.pmos.colosa.net/rest/ralph/"; host + technich dir + workspace
|
||||
protected $content = "Content-Type: application/"; //set the string used to attach next the kind of message to be handle.
|
||||
protected $serviceTechnic = "rest";// name of the current durectory where the rest methods are.
|
||||
protected $server_method; // used to set the name of the remote host and the Rest method to be called.
|
||||
protected $type; // contains the type of the message.
|
||||
protected $ch; //curl handle instance.
|
||||
protected $output; // contains the output returned by the curl_exec function.
|
||||
|
||||
/**
|
||||
* Setting the remote host and init the Curl handle options
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
$serverDNS = explode(DOT,$_SERVER['SERVER_NAME']);
|
||||
$serverDNS = array_reverse($serverDNS);
|
||||
$workspace = array_pop($serverDNS); //***aware this must contains the workspace name***
|
||||
|
||||
$this->restServer = PROTOCOL_HTTP . COLON.PATH_SEP . PATH_SEP;
|
||||
$this->restServer .= $_SERVER['SERVER_NAME'] . PATH_SEP;
|
||||
$this->restServer .= $this->serviceTechnic . PATH_SEP . $workspace . PATH_SEP;
|
||||
|
||||
$this->ch = curl_init();
|
||||
curl_setopt($this->ch,CURLOPT_TIMEOUT, 2);
|
||||
curl_setopt($this->ch,CURLOPT_POST, 1);
|
||||
curl_setopt($this->ch,CURLOPT_RETURNTRANSFER, 1);
|
||||
}
|
||||
/**
|
||||
* set the message in order to follow the message format
|
||||
*/
|
||||
abstract protected function format(array $message);
|
||||
/**
|
||||
* Set properties used in a simpleMessage Class like a set in a URI, or formatted as a JSon msg.
|
||||
*/
|
||||
abstract protected function setMoreProperties($messageFormated);
|
||||
/**
|
||||
* Attach the method to the restServer path, set the type of the message, and the message itself.
|
||||
*/
|
||||
protected function setMessageProperties($method,array $message)
|
||||
{
|
||||
$messageFormated = $this->format($message);
|
||||
$this->server_method = $this->restServer . $method;
|
||||
$this->setMoreProperties($messageFormated);
|
||||
}
|
||||
/**
|
||||
* Send or execute(curl notation) the message using a rest method
|
||||
**/
|
||||
public function send($method,array $message)
|
||||
{
|
||||
self::setMessageProperties($method,$message);
|
||||
$this->output = curl_exec($this->ch);
|
||||
return $this->output;
|
||||
}
|
||||
/**
|
||||
* Set the message to GET method type
|
||||
*/
|
||||
public function sendGET($method,array $message)
|
||||
{
|
||||
curl_setopt($this->ch, CURLOPT_HTTPGET,true);
|
||||
return $this->send($method,$message);
|
||||
}
|
||||
/**
|
||||
* Set the message to POST method type
|
||||
*/
|
||||
public function sendPOST($method,array $message)
|
||||
{
|
||||
curl_setopt($this->ch,CURLOPT_POST,true);
|
||||
return $this->send($method,$message);
|
||||
}
|
||||
/**
|
||||
* Set the message to PUT method type
|
||||
*/
|
||||
public function sendPUT($method,array $message)
|
||||
{
|
||||
curl_setopt($this->ch,CURLOPT_PUT,true);
|
||||
return $this->send($method,$message);
|
||||
}
|
||||
/**
|
||||
* Set the message to DELETE method type
|
||||
*/
|
||||
public function sendDELETE($method,array $message)
|
||||
{
|
||||
curl_setopt($this->ch,CURLOPT_CUSTOMREQUEST,"DELETE");
|
||||
return $this->send($method,$message);
|
||||
}
|
||||
/**
|
||||
* Display all the data that the response could got.
|
||||
*/
|
||||
public function displayResponse()
|
||||
{
|
||||
$error = curl_error($this->ch);
|
||||
$result = array( 'header' => '',
|
||||
'body' => '',
|
||||
'curl_error' => '',
|
||||
'http_code' => '',
|
||||
'last_url' => '');
|
||||
if ($error != ""){
|
||||
$result['curl_error'] = $error;
|
||||
return $result;
|
||||
}
|
||||
$response = $this->output;
|
||||
$header_size = curl_getinfo($this->ch,CURLINFO_HEADER_SIZE);
|
||||
$result['header'] = substr($response,0,$header_size);
|
||||
$result['body'] = substr($response,$header_size);
|
||||
$result['http_code'] = curl_getinfo($this -> ch,CURLINFO_HTTP_CODE);
|
||||
$result['last_url'] = curl_getinfo($this -> ch,CURLINFO_EFFECTIVE_URL);
|
||||
|
||||
echo $this->type." Response: ".$response."<BR>";
|
||||
foreach($result as $index => $data)
|
||||
{
|
||||
if($data != ""){
|
||||
echo $index . "=" . $data . "<BR>";
|
||||
}
|
||||
}
|
||||
echo "<BR>";
|
||||
}
|
||||
/**
|
||||
* Close the Curl session using the Curl Handle set by curl_init() function.
|
||||
*/
|
||||
public function close()
|
||||
{
|
||||
curl_close($this->ch);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
46
workflow/engine/methods/services/Rest/FormatedMessage.php
Normal file
46
workflow/engine/methods/services/Rest/FormatedMessage.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Class defined to set all the configuration that XML, Json or other needs.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package ProcessMaker
|
||||
* @subpackage workflow
|
||||
* @copyright Copyright (c) ProcessMaker Colosa Inc.
|
||||
* @version Release: @2.0.44@
|
||||
* @since Class available since Release 2.0.44
|
||||
*/
|
||||
|
||||
require_once("CURLMessage.php");
|
||||
|
||||
/**
|
||||
* Class defined to set all the configuration that XML, Json or other needs.
|
||||
*/
|
||||
class FormatedMessage extends CURLMessage
|
||||
{
|
||||
public function FormatedMessage()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
/**
|
||||
* Set the message in order to follow the message format, empty caused this class should not be instanced
|
||||
*/
|
||||
protected function format(array $message)
|
||||
{
|
||||
}
|
||||
/**
|
||||
* Setting CURL Url, Content and the message to be send
|
||||
*/
|
||||
protected function setMoreProperties($messageFormated)
|
||||
{
|
||||
//Please, remove this comment, is only for looging proposes.
|
||||
//
|
||||
echo "Request: " . $this->server_method . PATH_SEP . $messageFormated . " <br>";
|
||||
//
|
||||
curl_setopt($this->ch,CURLOPT_URL,$this->server_method);
|
||||
$contentSelected = $this->content . $this->type;
|
||||
curl_setopt($this->ch,CURLOPT_HTTPHEADER,array($contentSelected));
|
||||
curl_setopt($this->ch,CURLOPT_POSTFIELDS,$messageFormated);
|
||||
}
|
||||
}
|
||||
?>
|
||||
43
workflow/engine/methods/services/Rest/JsonMessage.php
Normal file
43
workflow/engine/methods/services/Rest/JsonMessage.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Class defined to be instanced and handle Json messages.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package ProcessMaker
|
||||
* @subpackage workflow
|
||||
* @copyright Copyright (c) ProcessMaker Colosa Inc.
|
||||
* @version Release: @2.0.44@
|
||||
* @since Class available since Release 2.0.44
|
||||
*/
|
||||
|
||||
require_once("FormatedMessage.php");
|
||||
/**
|
||||
* Class defined to be instanced and handle Json messages
|
||||
*/
|
||||
class JsonMessage extends FormatedMessage
|
||||
{
|
||||
/**
|
||||
* Call the parent Curl initialization and set the type of the message
|
||||
*/
|
||||
public function JsonMessage()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->type = "json";
|
||||
}
|
||||
/**
|
||||
* Format the array parameter to a json format.
|
||||
*/
|
||||
protected function format(array $message)
|
||||
{
|
||||
if (empty($message)){
|
||||
return ;
|
||||
}
|
||||
if (is_array($message)){
|
||||
$jsonMessage = json_encode( $message);
|
||||
}
|
||||
return $jsonMessage;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
47
workflow/engine/methods/services/Rest/RestMessage.php
Normal file
47
workflow/engine/methods/services/Rest/RestMessage.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Class defined to be instanced and handle rest single parameters.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package ProcessMaker
|
||||
* @subpackage workflow
|
||||
* @copyright Copyright (c) ProcessMaker Colosa Inc.
|
||||
* @version Release: @2.0.44@
|
||||
* @since Class available since Release 2.0.44
|
||||
*/
|
||||
|
||||
require_once("SimpleMessage.php");
|
||||
/**
|
||||
* Class defined to be instanced and handle rest single parameters
|
||||
*/
|
||||
class RestMessage extends SimpleMessage
|
||||
{
|
||||
/**
|
||||
* Call the parent Curl initialization and set the type of the message
|
||||
*/
|
||||
public function RestMessage()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->type = "rest";
|
||||
}
|
||||
/**
|
||||
* Format the array parameter to a single rest line format separed by '/'.
|
||||
*/
|
||||
protected function format(array $message)
|
||||
{
|
||||
$rest = "";
|
||||
if (!empty($message)){
|
||||
if (is_array($message)){
|
||||
foreach($message as $index => $data)
|
||||
{
|
||||
$rest .= "/" . $data;
|
||||
}
|
||||
$rest .= "/";
|
||||
}
|
||||
}
|
||||
return $rest;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
43
workflow/engine/methods/services/Rest/SimpleMessage.php
Normal file
43
workflow/engine/methods/services/Rest/SimpleMessage.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Class defined to set enough curl configuration.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package ProcessMaker
|
||||
* @subpackage workflow
|
||||
* @copyright Copyright (c) ProcessMaker Colosa Inc.
|
||||
* @version Release: @2.0.44@
|
||||
* @since Class available since Release 2.0.44
|
||||
*/
|
||||
|
||||
require_once("CURLMessage.php");
|
||||
|
||||
/**
|
||||
* Class defined to set enough curl configuration
|
||||
*/
|
||||
class SimpleMessage extends CURLMessage
|
||||
{
|
||||
public function SimpleMessage()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
/**
|
||||
* Set the message in order to follow the message format, empty caused this class should not be instanced
|
||||
*/
|
||||
protected function format(array $message)
|
||||
{
|
||||
}
|
||||
/**
|
||||
* Setting CURL Url, enough to attach a message.
|
||||
*/
|
||||
protected function setMoreProperties($messageFormated)
|
||||
{
|
||||
//Please, remove this comment, is only for looging proposes.
|
||||
//
|
||||
echo "Request: " . $this->server_method . PATH_SEP . $messageFormated . " <br>";
|
||||
//
|
||||
curl_setopt($this->ch,CURLOPT_URL,$this->server_method.$messageFormated);
|
||||
}
|
||||
}
|
||||
?>
|
||||
48
workflow/engine/methods/services/Rest/XmlMessage.php
Normal file
48
workflow/engine/methods/services/Rest/XmlMessage.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* Class defined to be instanced and handle XML format messages.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package ProcessMaker
|
||||
* @subpackage workflow
|
||||
* @copyright Copyright (c) ProcessMaker Colosa Inc.
|
||||
* @version Release: @2.0.44@
|
||||
* @since Class available since Release 2.0.44
|
||||
*/
|
||||
|
||||
require_once("FormatedMessage.php");
|
||||
/**
|
||||
* Class defined to be instanced and handle XML format messages.
|
||||
*/
|
||||
class XmlMessage extends FormatedMessage
|
||||
{
|
||||
/**
|
||||
* Call the parent Curl initialization and set the type of the message
|
||||
*/
|
||||
public function XmlMessage()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->type = "xml";
|
||||
}
|
||||
/**
|
||||
* Format the array parameter to a xml valid format. TODO: Need to find out a better way to do it.
|
||||
*/
|
||||
protected function format(array $message)
|
||||
{
|
||||
if (empty($message)){
|
||||
return ;
|
||||
}
|
||||
if (is_array($message)){
|
||||
$xml = "<?xml version='1.0'?><request>";
|
||||
foreach($message as $index => $data)
|
||||
{
|
||||
$xml .= "<" . $index . ">" . $data . "</" . $index . ">";
|
||||
}
|
||||
$xml .= "</request>";
|
||||
}
|
||||
return $xml;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
37
workflow/engine/methods/services/Rest/testing.php
Normal file
37
workflow/engine/methods/services/Rest/testing.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
require_once("JsonMessage.php");
|
||||
require_once("XmlMessage.php");
|
||||
require_once("RestMessage.php");
|
||||
|
||||
$msg = array( 'user'=>'admin' , 'password'=>'admin');
|
||||
$method = "login";
|
||||
|
||||
$jsonm = new JsonMessage();
|
||||
$jsonm->send($method,$msg);
|
||||
$jsonm->displayResponse();
|
||||
|
||||
$xmlm = new XmlMessage();
|
||||
$xmlm->send($method, $msg);
|
||||
$xmlm->displayResponse();
|
||||
|
||||
$msg = array( "LABEL", "LOGIN", "en");
|
||||
$table = "TRANSLATION";
|
||||
|
||||
$rest = new RestMessage();
|
||||
$rest->sendGET($table,$msg);
|
||||
$rest->displayResponse();
|
||||
|
||||
$msg = array( "HOUSE", "PUSHIN", "en", "sample", "2012-06-06" );
|
||||
$rest->sendPOST($table,$msg);
|
||||
$rest->displayResponse();
|
||||
|
||||
$msg = array( "HOUSE", "PUSHIN", "en", "samplemod", "2012-07-06" );
|
||||
$rest->sendPUT($table,$msg);
|
||||
$rest->displayResponse();
|
||||
|
||||
$msg = array( "HOUSE", "PUSHIN", "en");
|
||||
$rest->sendDELETE($table,$msg);
|
||||
$rest->displayResponse();
|
||||
|
||||
?>
|
||||
@@ -72,9 +72,9 @@ try {
|
||||
$importResults = $language->import($languageFile);
|
||||
|
||||
G::LoadClass("wsTools");
|
||||
$renegerateContent = new workspaceTools();
|
||||
$renegerateContent = new workspaceTools(SYS_SYS);
|
||||
$renegerateContent->upgradeContent();
|
||||
|
||||
|
||||
$result->msg = G::LoadTranslation('IMPORT_LANGUAGE_SUCCESS') . "\n";
|
||||
$result->msg .= "PO File num. records: " . $importResults->recordsCount . "\n";
|
||||
$result->msg .= "Success Records: " . $importResults->recordsCountSuccess . "\n";
|
||||
|
||||
@@ -373,7 +373,8 @@ try {
|
||||
if ($filter != ''){
|
||||
$cc = $oCriteria->getNewCriterion(UsersPeer::USR_USERNAME,'%'.$filter.'%',Criteria::LIKE)->addOr(
|
||||
$oCriteria->getNewCriterion(UsersPeer::USR_FIRSTNAME,'%'.$filter.'%',Criteria::LIKE)->addOr(
|
||||
$oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME,'%'.$filter.'%',Criteria::LIKE)));
|
||||
$oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME,'%'.$filter.'%',Criteria::LIKE)->addOr(
|
||||
$oCriteria->getNewCriterion(UsersPeer::USR_EMAIL,'%'.$filter.'%',Criteria::LIKE))));
|
||||
$oCriteria->add($cc);
|
||||
}
|
||||
$oCriteria->add(UsersPeer::USR_STATUS, array('CLOSED'), Criteria::NOT_IN);
|
||||
@@ -406,7 +407,8 @@ try {
|
||||
if ($filter != ''){
|
||||
$cc = $oCriteria->getNewCriterion(UsersPeer::USR_USERNAME,'%'.$filter.'%',Criteria::LIKE)->addOr(
|
||||
$oCriteria->getNewCriterion(UsersPeer::USR_FIRSTNAME,'%'.$filter.'%',Criteria::LIKE)->addOr(
|
||||
$oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME,'%'.$filter.'%',Criteria::LIKE)));
|
||||
$oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME,'%'.$filter.'%',Criteria::LIKE)->addOr(
|
||||
$oCriteria->getNewCriterion(UsersPeer::USR_EMAIL,'%'.$filter.'%',Criteria::LIKE))));
|
||||
$oCriteria->add($cc);
|
||||
}
|
||||
// $sw_add = false;
|
||||
|
||||
@@ -240,22 +240,22 @@ class SkinEngine
|
||||
|
||||
$templateFile = $this->layoutFile['dirname'] . PATH_SEP . $this->layoutFileExtjs['basename'];
|
||||
}
|
||||
|
||||
|
||||
$template = new TemplatePower($templateFile);
|
||||
$template->prepare();
|
||||
$template->assign('header', $header);
|
||||
$template->assign('styles', $styles);
|
||||
$template->assign('bodyTemplate', $body);
|
||||
|
||||
|
||||
// verify is RTL
|
||||
$oServerConf =& serverConf::getSingleton();
|
||||
if ($oServerConf->isRtl(SYS_LANG)) {
|
||||
$template->assign('dirBody', 'dir="RTL"');
|
||||
$template->assign('dirBody', 'dir="RTL"');
|
||||
}
|
||||
// end verify
|
||||
|
||||
// verify is IE
|
||||
$doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
|
||||
$doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
|
||||
$meta = '';
|
||||
$iexplores = array(
|
||||
'IE=10' => '(MSIE 10\.[0-9]+)',
|
||||
@@ -264,16 +264,16 @@ class SkinEngine
|
||||
'IE=7' => '(MSIE 7\.[0-9]+)',
|
||||
'IE=6' => '(MSIE 6\.[0-9]+)'
|
||||
);
|
||||
|
||||
foreach ($iexplores as $browser => $pattern) {
|
||||
|
||||
foreach ($iexplores as $browser => $pattern) {
|
||||
if (preg_match('/'.$pattern.'/', $_SERVER['HTTP_USER_AGENT'])) {
|
||||
$doctype = '';
|
||||
$meta = '<meta http-equiv="X-UA-Compatible" content="'. $browser .'"/>';
|
||||
}
|
||||
$meta = '<meta http-equiv="X-UA-Compatible" content="'. $browser .'"/>';
|
||||
}
|
||||
}
|
||||
// end verify
|
||||
|
||||
$template->assign('meta', $meta);
|
||||
|
||||
$template->assign('meta', $meta);
|
||||
$template->assign('doctype', $doctype);
|
||||
echo $template->getOutputContent();
|
||||
}
|
||||
@@ -598,7 +598,9 @@ class SkinEngine
|
||||
$header = '';
|
||||
|
||||
if (isset($oHeadPublisher)) {
|
||||
$oHeadPublisher->title = isset($_SESSION['USR_USERNAME']) ? '(' . $_SESSION['USR_USERNAME'] . ' ' . G::LoadTranslation('ID_IN') . ' ' . SYS_SYS . ')' : '';
|
||||
if (defined('SYS_SYS')) {
|
||||
$oHeadPublisher->title = isset($_SESSION['USR_USERNAME']) ? '(' . $_SESSION['USR_USERNAME'] . ' ' . G::LoadTranslation('ID_IN') . ' ' . SYS_SYS . ')' : '';
|
||||
}
|
||||
$header = $oHeadPublisher->printHeader();
|
||||
$header .= $oHeadPublisher->getExtJsStylesheets($this->cssFileName);
|
||||
}
|
||||
|
||||
@@ -1478,15 +1478,15 @@ body.x-body-masked .x-window-plain .x-window-mc {
|
||||
body.x-pm-login-body{
|
||||
width: 100%;
|
||||
}
|
||||
body.x-pm-login-body div.x-window{
|
||||
body.x-pm-login-body div.x-window-login{
|
||||
/*!important needed to change position, not appearance. Not allows JavaScrpit change Position.*/
|
||||
left: 50% !important;
|
||||
left: 50% !important;
|
||||
margin-left: -185px !important; /*Left Location for Login Box. Must be a half from the width of login Box.*/
|
||||
margin-top: -120px !important; /*Top Location for Login Box. Must be a half from height of login Box.*/
|
||||
overflow: auto !important;
|
||||
position: absolute !important;
|
||||
top: 50% !important;
|
||||
}
|
||||
}
|
||||
body.x-pm-login-body div.x-ie-shadow, body.x-pm-login-body div.x-shadow{
|
||||
/*Disappears the shadow Login Box.*/
|
||||
display: none !important;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
{if $user_logged neq ''}
|
||||
{$msgVer}<label class="textBlue">{$userfullname} <a href="../users/myInfo">{$user}</a> | </label>
|
||||
{if $switch_interface}
|
||||
<label class="textBlue"><a href="../../uxs/home">{$switch_interface_label}</a> | </label>
|
||||
<label class="textBlue"><a href="../../uxs/home">{$switch_interface_label}</a> | </label>
|
||||
{/if}
|
||||
<a href="{$linklogout}" class="tableOption">{$logout}</a> <br/>
|
||||
<label class="textBlack"><b>{$rolename}</b> {$workspace_label} <b><u>{$workspace}</u></b> <br/>
|
||||
@@ -65,7 +65,6 @@
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{if $footer neq ''}
|
||||
<tr height="100%">
|
||||
<td height="100%">
|
||||
<div class="Footer">
|
||||
@@ -73,7 +72,6 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ProcessMaker Login
|
||||
* Created on date Jul 15, 2011
|
||||
*
|
||||
*
|
||||
* @author Erik Amaru Ortiz <erik@colosa.com>
|
||||
*/
|
||||
|
||||
@@ -40,7 +40,7 @@ var Login = function() {
|
||||
enableVirtualKeyboard : false,
|
||||
enableForgotPassword : false,
|
||||
fieldsWidth : 200,
|
||||
|
||||
|
||||
/** Init method */
|
||||
init : function() {
|
||||
new Ext.KeyMap(document, {
|
||||
@@ -49,18 +49,18 @@ var Login = function() {
|
||||
Login.submit();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Ext.QuickTips.init();
|
||||
Ext.form.Field.prototype.msgTarget = 'side';
|
||||
|
||||
this.enableVirtualKeyboard = virtualKeyboad;
|
||||
this.enableForgotPassword = forgotPasswd;
|
||||
|
||||
|
||||
this.initComponents();
|
||||
|
||||
|
||||
this.window.show();
|
||||
Ext.getCmp('userTxt').focus(true, 1000);
|
||||
|
||||
|
||||
if (typeof errMsg != 'undefined') {
|
||||
Ext.msgBoxSlider.msgTopCenter('alert', 'ERROR', errMsg, 10);
|
||||
}
|
||||
@@ -87,27 +87,27 @@ Login.initComponents = function()
|
||||
fieldLabel: _('ID_USER'),
|
||||
allowBlank: false
|
||||
}
|
||||
|
||||
|
||||
var usernameTxt = {
|
||||
id : 'usernameTxt',
|
||||
name : 'username',
|
||||
fieldLabel: _('ID_USER'),
|
||||
allowBlank: false
|
||||
}
|
||||
|
||||
|
||||
var emailTxt = {
|
||||
id : 'emailTxt',
|
||||
name : 'email',
|
||||
fieldLabel: _('ID_EMAIL'),
|
||||
allowBlank: false
|
||||
}
|
||||
|
||||
|
||||
var passwordTxt = {
|
||||
fieldLabel: _('ID_PASSWORD'),
|
||||
name : 'form[USR_PASSWORD]',
|
||||
inputType : 'password',
|
||||
allowBlank: false,
|
||||
|
||||
|
||||
validationEvent : this.enableVirtualKeyboard == true ? 'blur' : 'keyup',
|
||||
enableKeyEvents : true,
|
||||
width: this.fieldsWidth, //this.enableVirtualKeyboard == true ? 183 : this.fieldsWidth,
|
||||
@@ -116,7 +116,7 @@ Login.initComponents = function()
|
||||
languageSelection: true
|
||||
},
|
||||
plugins: this.enableVirtualKeyboard == true ? new Ext.ux.plugins.VirtualKeyboard() : null,
|
||||
|
||||
|
||||
listeners: {
|
||||
render: function() {
|
||||
this.capsWarningTooltip = new Ext.ToolTip({
|
||||
@@ -132,7 +132,7 @@ Login.initComponents = function()
|
||||
this.disable();
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
keypress: {
|
||||
fn: function(field, e) {
|
||||
if(this.forceVirtualKeyboard) {
|
||||
@@ -161,7 +161,7 @@ Login.initComponents = function()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*,
|
||||
listeners : {
|
||||
specialkey: function(f,e){
|
||||
@@ -171,7 +171,7 @@ Login.initComponents = function()
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
var forgotPasswordLink = {
|
||||
xtype: 'box',
|
||||
autoEl: {
|
||||
@@ -251,7 +251,7 @@ Login.initComponents = function()
|
||||
|
||||
|
||||
this.form = new Ext.FormPanel(formConfig);
|
||||
|
||||
|
||||
this.forgotPasswordForm = new Ext.FormPanel({
|
||||
id : 'fp-form',
|
||||
labelWidth: 80,
|
||||
@@ -282,7 +282,7 @@ Login.initComponents = function()
|
||||
handler: Login.restore
|
||||
}]
|
||||
});
|
||||
|
||||
|
||||
this.forgotPasswordForm = new Ext.FormPanel({
|
||||
id : 'fp-form',
|
||||
labelWidth: 80,
|
||||
@@ -315,6 +315,7 @@ Login.initComponents = function()
|
||||
});
|
||||
|
||||
this.window = new Ext.Window({
|
||||
cls: 'x-window-login',
|
||||
layout: 'fit',
|
||||
title: _('LOGIN'),
|
||||
width: 380,
|
||||
@@ -332,7 +333,7 @@ Login.initComponents = function()
|
||||
items: []
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
this.fpWindow = new Ext.Window({
|
||||
layout: 'fit',
|
||||
title: _('ID_FORGOT_PASSWORD'),
|
||||
@@ -405,7 +406,7 @@ Login.restore = function()
|
||||
Login.sendFpRequest = function()
|
||||
{
|
||||
Ext.getCmp('login-statusbar2').showBusy();
|
||||
|
||||
|
||||
if (!Login.forgotPasswordForm.getForm().isValid()) {
|
||||
Ext.getCmp('login-statusbar2').setStatus({
|
||||
text: _('ID_VALIDATION_ERRORS'),
|
||||
@@ -414,7 +415,7 @@ Login.sendFpRequest = function()
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Login.forgotPasswordForm.getForm().submit({
|
||||
method: 'POST',
|
||||
waitTitle: '',
|
||||
@@ -449,7 +450,7 @@ Login.sendFpRequest = function()
|
||||
//Login.form.getForm().reset();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -469,7 +470,7 @@ Login.submit = function()
|
||||
|
||||
|
||||
Ext.getCmp('login-statusbar').showBusy();
|
||||
|
||||
|
||||
if (!Login.form.getForm().isValid()) {
|
||||
Ext.getCmp('login-statusbar').setStatus({
|
||||
text: _('ID_VALIDATION_ERRORS'),
|
||||
|
||||
@@ -160,7 +160,6 @@ Ext.onReady(function(){
|
||||
editor: {
|
||||
xtype: 'textfield',
|
||||
allowBlank: true,
|
||||
style:'text-transform: uppercase',
|
||||
listeners:{
|
||||
change: function(f,e){
|
||||
this.setValue(this.getValue().toUpperCase());
|
||||
@@ -546,7 +545,6 @@ Ext.onReady(function(){
|
||||
emptyText: _("ID_SET_A_TABLE_NAME"),
|
||||
width: 250,
|
||||
stripCharsRe: /(\W+)/g,
|
||||
style:'text-transform: uppercase',
|
||||
listeners:{
|
||||
change: function(){
|
||||
this.setValue(this.getValue().toUpperCase())
|
||||
|
||||
@@ -277,13 +277,7 @@ Ext.onReady(function(){
|
||||
editor: {
|
||||
xtype: 'textfield',
|
||||
allowBlank: true,
|
||||
style:'text-transform: uppercase',
|
||||
listeners:{
|
||||
/*specialkey: function(f,e){
|
||||
if(e.getKey()==e.ENTER){
|
||||
this.setValue(this.getValue().toUpperCase());
|
||||
}
|
||||
}*/
|
||||
change: function(f,e){
|
||||
this.setValue(this.getValue().toUpperCase());
|
||||
}
|
||||
@@ -797,7 +791,6 @@ Ext.onReady(function(){
|
||||
emptyText: _("ID_SET_A_TABLE_NAME"),
|
||||
width: 250,
|
||||
stripCharsRe: /(\W+)/g,
|
||||
style:'text-transform: uppercase',
|
||||
listeners:{
|
||||
change: function(){
|
||||
this.setValue(this.getValue().toUpperCase());
|
||||
|
||||
@@ -150,14 +150,27 @@ Ext.onReady(function(){
|
||||
selectSingle: false,
|
||||
listeners:{
|
||||
selectionchange: function(sm){
|
||||
switch(sm.getCount()){
|
||||
case 0: Ext.getCmp('removeButton').disable(); break;
|
||||
default: (ROLES.ROL_UID==pm_admin)? Ext.getCmp('removeButton').disable() : Ext.getCmp('removeButton').enable(); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
switch (sm.getCount()) {
|
||||
case 0: Ext.getCmp('removeButton').disable(); break;
|
||||
default:
|
||||
Ext.getCmp('removeButton').enable();
|
||||
if (ROLES.ROL_UID == pm_admin) {
|
||||
var permissionUid = assignedGrid.getSelectionModel().getSelections();
|
||||
permissionUid = permissionUid[0].get('PER_UID');
|
||||
for (var i=0; i<permissionsAdmin.length; i++)
|
||||
{
|
||||
if (permissionUid == permissionsAdmin[i]['PER_UID']) {
|
||||
Ext.getCmp('removeButton').disable();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
searchTextA = new Ext.form.TextField ({
|
||||
id: 'searchTextA',
|
||||
ctCls:'pm_search_text_field',
|
||||
@@ -268,7 +281,7 @@ Ext.onReady(function(){
|
||||
{xtype:'button',text: '>', handler: AssignPermissionAction, id: 'assignButton', disabled: true},
|
||||
{xtype:'button',text: '<', handler: RemovePermissionAction, id: 'removeButton', disabled: true},
|
||||
{xtype:'button',text: '>>', handler: AssignAllPermissionsAction, id: 'assignButtonAll', disabled: false},
|
||||
{xtype:'button',text: '<<', handler: RemoveAllPermissionsAction, id: 'removeButtonAll', disabled: (ROLES.ROL_UID==pm_admin) ? true : false}
|
||||
{xtype:'button',text: '<<', handler: RemoveAllPermissionsAction, id: 'removeButtonAll', disabled: false}
|
||||
],
|
||||
hidden : true
|
||||
});
|
||||
@@ -659,14 +672,25 @@ AssignPermissionAction = function(){
|
||||
|
||||
//RemoveButton Functionality
|
||||
RemovePermissionAction = function(){
|
||||
if (ROLES.ROL_UID != pm_admin){
|
||||
rowsSelected = assignedGrid.getSelectionModel().getSelections();
|
||||
var arrAux = new Array();
|
||||
for(var a=0; a < rowsSelected.length; a++){
|
||||
arrAux[a] = rowsSelected[a].get('PER_UID');
|
||||
}
|
||||
DeletePermissionsRole(arrAux,RefreshPermissions,FailureProcess);
|
||||
}
|
||||
rowsSelected = assignedGrid.getSelectionModel().getSelections();
|
||||
var arrAux = new Array();
|
||||
var sw;
|
||||
for(var a=0; a < rowsSelected.length; a++){
|
||||
sw = true;
|
||||
if (ROLES.ROL_UID == pm_admin) {
|
||||
for (var i=0; i<permissionsAdmin.length; i++)
|
||||
{
|
||||
if (permissionsAdmin[i]['PER_UID'] == rowsSelected[a].get('PER_UID')) {
|
||||
sw = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sw) {
|
||||
arrAux[a] = rowsSelected[a].get('PER_UID');
|
||||
}
|
||||
}
|
||||
DeletePermissionsRole(arrAux,RefreshPermissions,FailureProcess);
|
||||
};
|
||||
|
||||
//AssignALLButton Functionality
|
||||
@@ -684,15 +708,28 @@ AssignAllPermissionsAction = function(){
|
||||
|
||||
//RevomeALLButton Functionality
|
||||
RemoveAllPermissionsAction = function(){
|
||||
var allRows = assignedGrid.getStore();
|
||||
var arrAux = new Array();
|
||||
if (allRows.getCount()>0){
|
||||
for (var r=0; r < allRows.getCount(); r++){
|
||||
row = allRows.getAt(r);
|
||||
arrAux[r] = row.data['PER_UID'];
|
||||
}
|
||||
DeletePermissionsRole(arrAux,RefreshPermissions,FailureProcess);
|
||||
}
|
||||
var allRows = assignedGrid.getStore();
|
||||
var arrAux = new Array();
|
||||
if (allRows.getCount()>0){
|
||||
var sw;
|
||||
for (var r=0; r < allRows.getCount(); r++){
|
||||
row = allRows.getAt(r);
|
||||
sw = true;
|
||||
if (ROLES.ROL_UID == pm_admin) {
|
||||
for (var i=0; i<permissionsAdmin.length; i++)
|
||||
{
|
||||
if (permissionsAdmin[i]['PER_UID'] == row.data['PER_UID']) {
|
||||
sw = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sw) {
|
||||
arrAux[r] = row.data['PER_UID'];
|
||||
}
|
||||
}
|
||||
DeletePermissionsRole(arrAux,RefreshPermissions,FailureProcess);
|
||||
}
|
||||
};
|
||||
|
||||
//ASSIGN USERS TO A ROLE
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
<tr>
|
||||
<td valign='top'>
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$HTML}</td>
|
||||
<td class='FormFieldContent' >{$form.HTML}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}"></td>
|
||||
<td class='FormButton'>
|
||||
<span style="float:left;">{$form.PME_HTML_ENABLETEMPLATE}{$PME_HTML_ENABLETEMPLATE}</span><span style="float:right;">{$form.PME_REFRESH_VIEW}</span><span style="float:right;">{$form.PME_RESTORE_HTML}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$HTML}</td>
|
||||
<td class='FormFieldContent' >{$form.HTML}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$HTML2}</td>
|
||||
<td class='FormFieldContent' >{$form.HTML2}</td>
|
||||
|
||||
@@ -5,10 +5,6 @@
|
||||
<URL type="phpvariable"/>
|
||||
|
||||
|
||||
<HTML type="html" width="100%" height="350px" toolbarSet="toolbar2lines">
|
||||
<en>HTML View</en>
|
||||
</HTML>
|
||||
|
||||
<PME_HTML_ENABLETEMPLATE type="checkbox" value="1" defaultvalue="0" labelOnRight="0">
|
||||
<en>Enable HTML Editing</en>
|
||||
</PME_HTML_ENABLETEMPLATE>
|
||||
@@ -21,6 +17,10 @@
|
||||
<en>Refresh View</en>
|
||||
</PME_REFRESH_VIEW>
|
||||
|
||||
<HTML type="html" width="100%" height="300px" toolbarSet="toolbar2lines">
|
||||
<en>HTML View</en>
|
||||
</HTML>
|
||||
|
||||
<HTML2 type="textarea" cols="120" rows="16" style="width:100%;" className="htmleditor">
|
||||
<en>HTML Code</en>
|
||||
</HTML2>
|
||||
@@ -73,7 +73,18 @@ getField("PME_HTML_ENABLETEMPLATE","dynaforms_HtmlEditor").onclick=function()
|
||||
{
|
||||
/*getField("ENABLETEMPLATE","dynaforms_Properties").checked=this.checked;
|
||||
dynaformEditor.saveProperties();*/
|
||||
dynaformEditor.setEnableTemplate( this.checked );
|
||||
if (getField("PME_HTML_ENABLETEMPLATE","dynaforms_HtmlEditor").checked == true) {
|
||||
new leimnud.module.app.confirm().make(
|
||||
{
|
||||
label: "@G::LoadTranslation(ID_MSG_ENABLE_HTML_EDITING)",
|
||||
size:{ w: 350, h: 150 },
|
||||
action: function() { },
|
||||
cancel: function() {
|
||||
getField("PME_HTML_ENABLETEMPLATE","dynaforms_HtmlEditor").checked = false;
|
||||
}
|
||||
});
|
||||
dynaformEditor.setEnableTemplate( this.checked );
|
||||
}
|
||||
}
|
||||
]]></PME_RESIZE_JS>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user