2 // Note: This file is included from the library/Vanilla/Vanilla.Control.CategoryForm.php control.
4 echo '<div id="Form" class="Account CategoryForm">
6 <legend>'.$this->Context
->GetDefinition('CategoryManagement').'</legend>'
8 .$this->Get_PostBackForm('frmCategory');
10 if ($CategoryID > 0) {
11 $this->CategorySelect
->Attributes
= "onchange=\"document.location='".GetUrl($this->Context
->Configuration
, $this->Context
->SelfUrl
, '', '', '', '', 'PostBackAction=Category')."&CategoryID='+this.options[this.selectedIndex].value;\" id=\"sCategorySelect\"";
12 $this->CategorySelect
->SelectedValue
= $CategoryID;
13 echo '<h2>'.$this->Context
->GetDefinition('GetCategoryToEdit').'</h2>
16 <label for="sCategorySelect">'.$this->Context
->GetDefinition('Categories').' <small>'.$this->Context
->GetDefinition('Required').'</small></label>
17 '.$this->CategorySelect
->Get().'
20 <h2>'.$this->Context
->GetDefinition('ModifyCategoryDefinition').'</h2>';
22 echo '<h2>'.$this->Context
->GetDefinition('DefineNewCategory').'</h2>';
26 <label for="txtCategoryName">'.$this->Context
->GetDefinition('CategoryName').' <small>'.$this->Context
->GetDefinition('Required').'</small></label>
27 <input type="text" name="Name" value="'.$this->Category
->Name
.'" maxlength="80" class="SmallInput" id="txtCategoryName" />
28 <p class="Description">'.$this->Context
->GetDefinition('CategoryNameNotes').'</p>
31 <label for="txtCategoryDescription">'.$this->Context
->GetDefinition('CategoryDescription').'</label>
32 <textarea name="Description" id="txtCategoryDescription" class="LargeTextbox">'.$this->Category
->Description
.'</textarea>
33 <p class="Description">'.$this->Context
->GetDefinition('CategoryDescriptionNotes').'</p>
35 $this->CallDelegate('PreRolesRender');
37 <p class="Description">
38 <strong>'.$this->Context
->GetDefinition('Roles').'</strong>
39 <br />'.$this->Context
->GetDefinition('RolesInCategory')
43 <p class="Description">
44 '.$this->Context
->GetDefinition('Check')
45 ." <a href=\"./\" onclick=\"CheckAll('RoleID_'); return false;\">".$this->Context
->GetDefinition('All').'</a>, '
46 ." <a href=\"./\" onclick=\"CheckNone('RoleID_'); return false;\">".$this->Context
->GetDefinition('None').'</a>
51 $OptionCount = count($this->CategoryRoles
->aOptions
);
52 for ($i = 0; $i < $OptionCount ; $i++
) {
55 <span>'.GetDynamicCheckBox($this->CategoryRoles
->Name
,
56 $this->CategoryRoles
->aOptions
[$i]['IdValue'],
57 $this->CategoryRoles
->aOptions
[$i]['Checked'],
59 $this->CategoryRoles
->aOptions
[$i]['DisplayValue'],
61 'RoleID_'.$this->CategoryRoles
->aOptions
[$i]['IdValue'])
67 $this->CallDelegate('PostRolesRender');
70 <input type="submit" name="btnSave" value="'.$this->Context
->GetDefinition('Save').'" class="Button SubmitButton EditCategoryButton" />
71 <a href="'.GetUrl($this->Context
->Configuration
, 'settings.php', '', '', '', '', 'PostBackAction=Categories').'" class="CancelButton">'.$this->Context
->GetDefinition('Cancel').'</a>