crlf fix
This commit is contained in:
parent
d83c004fb9
commit
b65007868a
3 changed files with 50 additions and 50 deletions
|
@ -525,22 +525,22 @@ class Application_Service_HistoryService
|
|||
$md = $file->getDbColMetadata();
|
||||
|
||||
$prefix = Application_Form_EditHistoryFile::ID_PREFIX;
|
||||
$formValues = array();
|
||||
$formValues["{$prefix}id"] = $id;
|
||||
|
||||
foreach($template["fields"] as $index => $field) {
|
||||
|
||||
$formValues = array();
|
||||
$formValues["{$prefix}id"] = $id;
|
||||
|
||||
foreach($template["fields"] as $index => $field) {
|
||||
|
||||
$key = $field["name"];
|
||||
|
||||
if (in_array($key, $required)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$value = $md[$key];
|
||||
$formValues["$prefix{$key}"] = $value;
|
||||
}
|
||||
|
||||
$form->populate($formValues);
|
||||
|
||||
$value = $md[$key];
|
||||
$formValues["$prefix{$key}"] = $value;
|
||||
}
|
||||
|
||||
$form->populate($formValues);
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
@ -563,7 +563,7 @@ class Application_Service_HistoryService
|
|||
$templateValues = $values[$prefix."template"];
|
||||
|
||||
$md = array();
|
||||
|
||||
|
||||
foreach ($templateValues as $index => $value) {
|
||||
|
||||
$key = substr($index, $prefix_len);
|
||||
|
@ -746,25 +746,25 @@ class Application_Service_HistoryService
|
|||
try {
|
||||
$id = $data["his_file_id"];
|
||||
$form = $form = $this->makeHistoryFileForm($id);
|
||||
$history_id = $form->getElement("his_file_id");
|
||||
$history_id = $form->getElement("his_file_id");
|
||||
$history_id->setRequired(true);
|
||||
|
||||
Logging::info($data);
|
||||
$json = array();
|
||||
|
||||
if ($form->isValid($data)) {
|
||||
$history_id->setIgnore(true);
|
||||
$history_id->setIgnore(true);
|
||||
$values = $form->getValues();
|
||||
|
||||
Logging::info("edited list item");
|
||||
Logging::info($values);
|
||||
|
||||
Logging::info("edited list item");
|
||||
Logging::info($values);
|
||||
|
||||
$this->populateTemplateFile($values, $id);
|
||||
}
|
||||
else {
|
||||
$msgs = $form->getMessages();
|
||||
Logging::info($msgs);
|
||||
|
||||
$msgs = $form->getMessages();
|
||||
Logging::info($msgs);
|
||||
|
||||
$json["error"] = $msgs;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue