Merge remote branch 'pm/master'
This commit is contained in:
@@ -813,7 +813,7 @@ class workspaceTools
|
||||
$arrayData["MESS_FROM_NAME"] = (isset($emailConfiguration["MESS_FROM_NAME"]))? $emailConfiguration["MESS_FROM_NAME"] : "";
|
||||
$arrayData["SMTPSECURE"] = $emailConfiguration["SMTPSecure"];
|
||||
$arrayData["MESS_TRY_SEND_INMEDIATLY"] = (isset($emailConfiguration["MESS_TRY_SEND_INMEDIATLY"]) && ($emailConfiguration["MESS_TRY_SEND_INMEDIATLY"] . "" == "true" || $emailConfiguration["MESS_TRY_SEND_INMEDIATLY"] . "" == "1"))? 1 : 0;
|
||||
$arrayData["MAIL_TO"] = $emailConfiguration["MAIL_TO"];
|
||||
$arrayData["MAIL_TO"] = isset($emailConfiguration["MAIL_TO"]) ? $emailConfiguration["MAIL_TO"] : '';
|
||||
$arrayData["MESS_DEFAULT"] = (isset($emailConfiguration["MESS_ENABLED"]) && $emailConfiguration["MESS_ENABLED"] . "" == "1")? 1 : 0;
|
||||
break;
|
||||
case "MAIL":
|
||||
|
||||
@@ -4386,7 +4386,7 @@
|
||||
<column name="MESS_FROM_NAME" type="VARCHAR" size="256" default="" />
|
||||
<column name="SMTPSECURE" type="VARCHAR" size="3" required="true" default="No" />
|
||||
<column name="MESS_TRY_SEND_INMEDIATLY" type="INTEGER" required="true" default="0" />
|
||||
<column name="MAIL_TO" type="VARCHAR" size="256" required="true" default="" />
|
||||
<column name="MAIL_TO" type="VARCHAR" size="256" required="false" default="" />
|
||||
<column name="MESS_DEFAULT" type="INTEGER" required="true" default="0" />
|
||||
</table>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -559,5 +559,38 @@ abstract class Importer
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function saveAs($prj_uid, $prj_name, $prj_description, $prj_category)
|
||||
{
|
||||
try {
|
||||
$exporter = new \ProcessMaker\Exporter\XmlExporter($prj_uid);
|
||||
$getProjectName = $exporter->truncateName($exporter->getProjectName(), false);
|
||||
|
||||
$outputDir = PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "files" . PATH_SEP . "output" . PATH_SEP;
|
||||
$version = \ProcessMaker\Util\Common::getLastVersion($outputDir . $getProjectName . "-*.pmx") + 1;
|
||||
$outputFilename = $outputDir . sprintf("%s-%s.%s", str_replace(" ", "_", $getProjectName), $version, "pmx");
|
||||
|
||||
$exporter->setMetadata("export_version", $version);
|
||||
$outputFilename = $outputDir . $exporter->saveExport($outputFilename);
|
||||
|
||||
$httpStream = new \ProcessMaker\Util\IO\HttpStream();
|
||||
$fileExtension = pathinfo($outputFilename, PATHINFO_EXTENSION);
|
||||
|
||||
$this->setSourceFile($outputFilename);
|
||||
$this->prepare();
|
||||
$this->importData["tables"]["bpmn"]["project"][0]["prj_name"] = $prj_name;
|
||||
$this->importData["tables"]["bpmn"]["project"][0]["prj_description"] = $prj_description;
|
||||
$this->importData["tables"]["bpmn"]["diagram"][0]["dia_name"] = $prj_name;
|
||||
$this->importData["tables"]["bpmn"]["process"][0]["pro_name"] = $prj_name;
|
||||
$this->importData["tables"]["workflow"]["process"][0]["PRO_TITLE"] = $prj_name;
|
||||
$this->importData["tables"]["workflow"]["process"][0]["PRO_DESCRIPTION"] = $prj_description;
|
||||
$this->importData["tables"]["workflow"]["process"][0]["PRO_CATEGORY"] = $prj_category;
|
||||
$this->importData["tables"]["workflow"]["process"][0]["PRO_CATEGORY_LABEL"] = null;
|
||||
$this->importData["tables"]["workflow"]["process"][0]["PRO_UPDATE_DATE"] = null;
|
||||
$this->importData["tables"]["workflow"]["process"] = $this->importData["tables"]["workflow"]["process"][0];
|
||||
return array("prj_uid" => $this->doImport());
|
||||
} catch (\Exception $e) {
|
||||
return $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,6 +154,20 @@ class Project extends Api
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @url POST /save-as
|
||||
*
|
||||
* @param string $prj_uid
|
||||
* @param string $prj_name
|
||||
* @param string $prj_description
|
||||
* @param string $prj_category
|
||||
*/
|
||||
public function doSaveAs($prj_uid, $prj_name, $prj_description, $prj_category)
|
||||
{
|
||||
$importer = new \ProcessMaker\Importer\XmlImporter();
|
||||
return $importer->saveAs($prj_uid, $prj_name, $prj_description, $prj_category);
|
||||
}
|
||||
|
||||
/**
|
||||
* @url GET /:prj_uid/process
|
||||
|
||||
@@ -89,7 +89,9 @@
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a class="mafe-close" href="#" ><span class="mafe-button-close" ></span></a></li>
|
||||
<li class="mafe-save-process"><a href="#" class="mafe-button-save"></a></li>
|
||||
<li class="mafe-save-process"><a href="#" class="mafe-button-save"></a>
|
||||
<span class="mafe-button-menu"><img src="/lib/img/caret-down.png"/></span>
|
||||
</li>
|
||||
<li><a href="#" class="mafe-button-export-process"></a></li>
|
||||
<li><a class="mafe-button-export-bpmn-process"></a></li>
|
||||
<li><span class="mafe-zoom-options"></span></li>
|
||||
|
||||
@@ -63,7 +63,10 @@
|
||||
<div class="col-xs-4 text-right">
|
||||
<i style=" width:60px; text-align:center; display:block; float:right;" class="ind-symbol-selector fa fa-arrow-up fa-3x" data-toggle="tooltip" data-original-title="{translate label='ID_DASH_HELP_SYMBOL_SELECTOR'}">
|
||||
</i>
|
||||
<div class="small ind-comparative-selector" style="clear:both;" data-toggle="tooltip" data-original-title="{translate label='ID_DASH_HELP_IND_COMPARE'}">
|
||||
<div class="small ind-comparative-selector"
|
||||
style="clear:both; width:auto; text-align:right; float:right;"
|
||||
data-toggle="tooltip"
|
||||
data-original-title="{translate label='ID_DASH_HELP_IND_COMPARE'}">
|
||||
<%- indicator.comparative %> <%- indicator.percentComparative %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user