Exemplo n.º 1
0
 function modifyForm()
 {
     global $itemfield_typ, $gorumroll, $lll, $jQueryLib;
     $this->id = $gorumroll->rollid;
     if (!Roll::isPreviousFormSubmitInvalid()) {
         $ret = $this->load();
     }
     // hogy ezek ne legyenek a formban, mikor egy global common field-et nezunk:
     if ($this->isCommon && !$this->cid) {
         $fieldsToLeaveOut = array("detailsProperties", "showInDetails", "formProperties", "expl", "default_text", "mandatory", "allowHtml");
         foreach ($fieldsToLeaveOut as $attr) {
             $itemfield_typ["attributes"][$attr][] = "form invisible";
         }
         // hogy a customfield.js-ben a feltetelek jol mukodjenek:
         $fieldsToMakeHidden = array("type", "subType");
         foreach ($fieldsToMakeHidden as $attr) {
             $itemfield_typ["attributes"][$attr][] = "form hidden";
         }
     }
     JavaScript::addInclude(GORUM_JS_DIR . $jQueryLib);
     JavaScript::addInclude(GORUM_JS_DIR . "/jquery/jquery.center.js");
     // to center the loading animation image
     JavaScript::addInclude(GORUM_JS_DIR . "/jquery/field.js");
     // to retrieve the form field values
     // Propagate into all other categories:
     $propagatePostfix = OverlayController::addPropagateOverlay($this->id);
     // Propagate into the subcategories only:
     if ($this->cid) {
         getDbCount($count, array("SELECT COUNT(*) FROM @category WHERE up=#cid#", $this->cid));
         if ($count) {
             $propagatePostfix .= " " . OverlayController::addPropagateOverlay($this->id, "", "_subcat");
         }
     }
     foreach (array_keys($itemfield_typ["attributes"]) as $attr) {
         if (!in_array($attr, array("name", "isCommon", "type", "userField"))) {
             if (isset($lll["itemfield_{$attr}"])) {
                 $lll["itemfield_{$attr}"] .= $propagatePostfix;
             } elseif (isset($lll["customfield_{$attr}"])) {
                 $lll["customfield_{$attr}"] .= $propagatePostfix;
             }
         }
     }
     parent::modifyForm();
 }
Exemplo n.º 2
0
 function modifyForm()
 {
     global $gorumroll, $customfield_typ;
     $this->id = $gorumroll->rollid;
     if (!Roll::isPreviousFormSubmitInvalid()) {
         if ($this->load()) {
             handleErrorNotFound($this, __FILE__, __LINE__);
         }
     }
     $this->hasObjectRights($hasRight, "modify", TRUE);
     $this->initializeMultipleSelectionFieldsAndDefaults();
     JavaScript::addInclude(GORUM_JS_DIR . "/jquery/json.js");
     JavaScript::addInclude(JS_DIR . "/propagate.js");
     JavaScript::addOnload('$.noah.submitOptionValueModificationStack();');
     if ($this->isFixField()) {
         $customfield_typ["attributes"]["values"][] = "form invisible";
     }
     $this->generForm();
     if ($this->isFixField()) {
         Roll::setInfoText("customfield_fixInfoText");
     }
 }
Exemplo n.º 3
0
 function modifyForm($elementName = "")
 {
     global $gorumroll;
     $this->id = $gorumroll->rollid;
     if (!Roll::isPreviousFormSubmitInvalid()) {
         $ret = $this->load();
         if ($ret) {
             handleErrorNotFound($this, __FILE__, __LINE__);
         }
     }
     $this->hasObjectRights($hasRight, "modify", TRUE);
     $this->generForm($elementName);
 }
Exemplo n.º 4
0
 function modifyForm()
 {
     global $gorumroll, $lll;
     $_EC = EComm::createObject();
     $this->id = $gorumroll->rollid;
     LocationHistory::saveGorumCategory($this->getCid());
     $this->activateVariableFields();
     //csak emiatt kellett feluldefinialn
     $this->initClassVars();
     if (!Roll::isPreviousFormSubmitInvalid()) {
         $ret = $this->load();
         if ($ret) {
             $txt = $lll["not_found_in_db"];
             handleError($txt);
         }
         $old =& $this;
     } else {
         G::load($old, $this->id, "item");
     }
     $this->hasObjectRights($hasRight, "modify", TRUE);
     if (isset($this->expirationTime) && !$this->expirationTime->isEmpty()) {
         $this->expiration = round($this->expirationTime->getDayDiff());
         if ($this->expirationTime->isPast()) {
             $this->expiration = "-{$this->expiration}";
         }
     }
     $this->addDeletePictureStuff();
     $this->addDeleteMediaStuff();
     $_EC->confirmRules($this->cid, $old);
     $this->cName = $this->getCatName();
     $this->catPermaLink = $this->getCatPermaLink();
     $this->generForm();
 }
Exemplo n.º 5
0
 function modifyForm($elementName = "")
 {
     global $gorumroll, $user_typ, $emailAccount, $gorumuser;
     $this->id = $gorumroll->rollid ? $gorumroll->rollid : $gorumuser->id;
     hasAdminRights($isAdm);
     $this->hasObjectRights($hasRight, "modify", TRUE);
     $this->activateVariableFields();
     $this->initClassVars();
     if (!Roll::isPreviousFormSubmitInvalid()) {
         $ret = $this->load();
         if ($ret) {
             handleErrorNotFound($this, __FILE__, __LINE__);
         }
     }
     if (!$isAdm && !$emailAccount) {
         $user_typ["attributes"]["email"][] = "modify_form: form invisible";
     }
     // A password mezok kezdetben mindig uresek:
     $this->password = $this->passwordCopy = "";
     $this->addDeletePictureStuff();
     $this->addDeleteMediaStuff();
     $this->generForm($elementName);
 }