public function __construct() { parent::__construct('formRegular', 'Regulars'); $existingRegulars = $this->getExistingRegulars(); $this->addElement(new ElementTextbox('regularsUsernames', 'Username', $existingRegulars, 'Enter a list of usernames separated by commas. The usernames will checked for valid usernames when you submit the form.')); $this->addDefaultButtons(); }
public function __construct() { parent::__construct('formRouting', 'Update Routing'); $routes = getSetting('routes'); $this->addElement(new ElementTextbox('routes', 'Routes', $routes)); $this->addDefaultButtons(); }
public function __construct() { parent::__construct('targetedMailingList', 'Tageted Mailing List'); $this->addElement($this->getEventListElement()); $this->addElement(new ElementCheckbox('ignoreOptOut', 'Include users preferences', 1, 'When checked, the mailing list will even contain users who chose to opt out of the main mailing list.')); $this->addButtons(Form::BTN_SUBMIT); }
public function __construct() { parent::__construct('mumbleSettings', 'Mumble settings'); $this->addElement(new ElementTextbox('excludePages', 'Exclude pages', getSiteSetting('plugin.mumble.ignorePages'))); $this->addElement(new ElementTextbox('excludePagesAdmin', 'Exclude pages as admin', getSiteSetting('plugin.mumble.ignorePages.admin'))); $this->addDefaultButtons(); }
public function __construct() { parent::__construct('formAdditionalMenuItems', 'Additional Menu Items'); Session::requirePriv('ADDITIONAL_MENU_ITEMS'); $this->addElement(new ElementTextbox('links', 'Links', $this->getLinks(), 'Format: title=url<newline>...')); $this->addDefaultButtons(); }
public function __construct() { parent::__construct('createSurveyForm', 'Create survey'); $this->addElement(new ElementHidden('action', null, 'create')); $this->addElement(new ElementInput('title', 'Question', null, 'What do you want the survey to ask?')); $this->addDefaultButtons(); }
public function __construct($editId = false) { parent::__construct('contentEdit', '<a href = "listContent.php">Content edit</a> » Content Edit'); global $db; $this->editId = $editId; if ($editId) { $this->addElement(new ElementHidden('action', null, 'edit')); $this->addElement(new ElementHidden('id', null, $this->editId)); $sql = 'SELECT id, page, content FROM page_content WHERE id = :id'; $stmt = $db->prepare($sql); $stmt->bindValue(':id', $this->getElementValue('id')); $stmt->execute(); $page = $stmt->fetchRow(); $page['content'] = stripslashes($page['content']); $page['content'] = htmlentities($page['content']); $this->addElement(new ElementTextbox('content', 'Content', $page['content'])); $this->addElementHidden('title', $page['page']); } else { $this->addElement(new ElementHidden('action', null, 'new')); $this->addElement(new ElementInput('title', 'Page Title')); $this->getElement('title')->setMinMaxLengths(2, 64); $this->addElement(new ElementTextbox('content', 'Content')); } $this->addDefaultButtons(); }
public function __construct() { parent::__construct('login', 'Login'); $this->addElement(new ElementHtml('loginPasswordSecurity', null)); $this->addElement(new ElementInput('username', 'Username')); $this->addElement(new ElementPassword('password', 'Password')); $this->addButtons(Form::BTN_SUBMIT); }
public function __construct() { parent::__construct('shoutbox'); $this->addElement(new ElementAlphaNumeric('shout', 'Shout!')); $this->getElement('shout')->setPunctuationAllowed(true); $this->copyRequestVar('id'); $this->addButtons(Form::BTN_SUBMIT); }
public function __construct($eventId) { parent::__construct('forceSignup', 'Force Signup'); $this->addElement(new ElementInput('username', 'Username')); $this->addElement(new ElementHidden('id', null, $eventId)); $this->addButtons(Form::BTN_SUBMIT); $this->getElement('submit')->setCaption('Force signup'); }
public function __construct(array $survey) { parent::__construct('editSurveyOptions', 'Add survey options'); $this->addElement(new ElementHidden('id', null, $survey['id'])); $this->addElement(new ElementHidden('action', null, 'edit')); $this->addElement(new ElementInput('value', 'Value')); $this->addDefaultButtons('Add option'); }
public function __construct($groupId) { parent::__construct('updateGroupPrivs', 'Update group privs'); Session::requirePriv('SUPERUSER'); $this->addElement(new ElementHidden('id', 'Group', $groupId)); $this->addElement($this->getPermissionElement()); $this->addDefaultButtons('Grant priv'); }
public function __construct() { parent::__construct('formUpdatePermission', 'Update permission'); $permission = $this->getPermission(); $this->addElementHidden('id', $permission['key']); $this->addElement(new ElementInput('description', 'Description', $permission['description'])); $this->addDefaultButtons(); }
public function __construct() { parent::__construct('addNews', 'Add news'); $this->addElement(new ElementHidden('action', null, 'add')); $this->addElement(new ElementInput('title', 'Title')); $this->addElement(new ElementTextbox('content', 'Content')); $this->addDefaultButtons(); }
public function __construct($email) { parent::__construct('sendEmail', 'Send Email to user'); $this->email = $email; $this->addElement(new ElementHtml('email', null, 'Send to: ' . $this->email)); $this->addElement(new ElementAlphaNumeric('subject', 'Subject', getSiteSetting('defaultEmailSubject'))); $this->addElement(new ElementTextbox('content', 'Content', 'Your message here', 'Footers will automatically be applied.')); $this->addButtons(Form::BTN_SUBMIT); }
public function __construct($userId) { parent::__construct('addUserToGroup', 'Add user to group'); Session::requirePriv('GROUP_EDIT'); $this->addElement(new ElementHidden('id', 'User', $userId)); $elGroup = $this->getGroupSelection(); $this->addElement($elGroup); $this->addDefaultButtons(); }
public function __construct() { parent::__construct('createGallery', 'Create gallery'); $this->addElement(new ElementInput('title', 'Title')); $this->addElement(new ElementAlphaNumeric('folderPath', 'Folder Path')); $this->getElement('folderPath')->setMinMaxLengths(1, 64); $this->requireFields('title', 'folderPath'); $this->addDefaultButtons(); }
public function __construct($event, $user, $status) { parent::__construct('signup', 'Signup to: ' . $event['name']); $this->addElement(new ElementHidden('user', null, $user)); $this->addElement(new ElementHidden('event', null, $event['id'])); $this->addElement(new ElementInput('comment', 'Special requirements', null, 'Let us know about things like really large monitors, friends you want to sit next to or anything else. If you dont have any special requirements it is customary to enter something funny for the staff to read ;)')); $this->addDefaultButtons(); $this->getElement('submit')->setCaption('Sign up!'); }
public function __construct() { parent::__construct('formUpdateFinanceAllocator', 'Update allocator'); $this->allocatedPaymentTypes = array(); $this->loadAvailableAccounts(); $this->addStandardAccounts(); $this->addPersonalAccounts(); $this->addDefaultButtons(); }
public function __construct() { parent::__construct('formSeatingPlanMoveUser', 'Move user'); $eventId = Sanitizer::getInstance()->filterUint('event'); $this->addElement(new ElementInput('username', 'Username')); $this->addElement(new ElementNumeric('seat', 'New seat number')); $this->addElementHidden('event', $eventId); $this->addDefaultButtons(); }
public function __construct() { parent::__construct('formCreateFinanceEntry', 'Create Finance Entry'); $sanitizer = new Sanitizer(); $this->addElement(new ElementInput('description', 'Description')); $this->addElement(new ElementNumeric('amount', 'Amount')); $this->addElement(new ElementHidden('account', 'Account', $sanitizer->filterUint('account'))); $this->addDefaultButtons(); }
public function __construct() { parent::__construct('swapSeats', 'Swap Seats'); requirePrivOrRedirect('SWAP_USERS_SEATS'); $this->eventId = Sanitizer::getInstance()->filterUint('event'); $this->addElement(new ElementInput('username1', 'First username')); $this->addElement(new ElementInput('username2', 'Second username')); $this->addElementHidden('event', $this->eventId); $this->addDefaultButtons(); }
public function __construct() { parent::__construct('formUpdateFinanceAccount', 'Update Finance Account'); $this->databaseRow = $this->getDatabaseRow(); $this->addElement(new ElementInput('title', 'Title', $this->databaseRow['title'])); $this->addElement(new ElementNumeric('assignedTo', 'Assigned to user ID', $this->databaseRow['assigned_to'], 'The user ID to assign this account to. You can type a username here to look up a user ID.')); $this->getElement('assignedTo')->setBounds(0, 999); $this->addElement(new ElementHidden('id', null, $this->databaseRow['id'])); $this->addDefaultButtons(); }
public function __construct() { parent::__construct('formPermissionCreate', 'Create permission'); Session::requirePriv('SUPERUSER'); $this->addElement(new ElementAlphaNumeric('permission', 'Permission name', null, 'Even after creating a permission, it needs to be implemented in code for it to take affect.')); $this->getElement('permission')->setPatternToIdentifier(); $this->addElement(new ElementInput('description', 'Description')); $this->getElement('description')->setMinMaxLengths(0, 2555); $this->addButtons(Form::BTN_SUBMIT); }
public function __construct(array $survey) { parent::__construct('editSurvey', 'Edit survey'); $this->addElement(new ElementHidden('id', null, $survey['id'])); $this->addElement(new ElementHidden('action', null, 'edit')); $this->addElement(new ElementInput('title', 'Title', $survey['title'])); $this->addElement(new ElementNumeric('count', 'Vote count', $survey['count'], 'How many options may voters choose?')); $this->addElement(new ElementCheckbox('active', 'Active', $survey['active'], 'Is the survey active?')); $this->addDefaultButtons(); }
public function __construct() { parent::__construct('formGroupEdit', 'Edit Group'); $id = Sanitizer::getInstance()->filterUint('id'); $group = new Group($id); $this->addElement(new ElementHidden('id', null, $group->getId())); $this->addElement(new ElementInput('title', 'Title', $group->getTitle())); $this->addElement(new ElementInput('css', 'CSS', $group->getAttribute('css'), 'Additional styles to be applied to this group title (eg: color: red) ')); $this->getElement('css')->setMinMaxLengths(0, 128); $this->addDefaultButtons(); }
public function __construct() { parent::__construct('registration', 'Registration'); $this->addElement(new ElementInput('username', 'Username')); $this->addElement(new ElementPassword('password1', 'Password')); $this->addElement(new ElementPassword('password2', 'Password (confirm)')); $this->addElement(new ElementInput('email', 'Email Address')); $this->addElement(new ElementInput('realName', 'Real Name')); $this->addDefaultButtons(); $this->requireFields(array('username', 'password1', 'email', 'realName')); }
public function __construct($events) { parent::__construct('payForFriend', 'Pay for friend'); $eventsSel = new ElementSelect('event', 'Event'); foreach ($events as $event) { $eventsSel->addOption($event['name'], $event['id']); } $this->addElement($eventsSel); $this->addElement(new ElementInput('username', 'Your friends username')); $this->addElement(new ElementHidden('action', null, 'add')); $this->addDefaultButtons('Add friends ticket to basket'); }
public function __construct($user) { parent::__construct('avatar'); Session::requirePriv('CHANGE_AVATAR'); $this->enctype = 'multipart/form-data'; $this->addElement(new ElementFile('avatar', 'Avatar', null, 'You may upload a png or jpg, maximum size ' . getSiteSetting('avatarMaxWidth') . ' x ' . getSiteSetting('avatarMaxHeight') . ' pixels. Remember to press F5 to refresh your avatar after you have uploaded it!')); $this->getElement('avatar')->destinationDir = 'resources/images/avatars/'; $this->getElement('avatar')->imageMaxW = getSiteSetting('avatarMaxWidth'); $this->getElement('avatar')->imageMaxH = getSiteSetting('avatarMaxHeight'); $this->addElement(new ElementHidden('user', 'User', $user)); $this->addDefaultButtons(); }
public function __construct() { parent::__construct('uploadImage', 'Upload Image'); $this->enctype = 'multipart/form-data'; $this->directorySettings['gallery'] = array('maxWidth' => 800, 'maxHeight' => 600); $this->directorySettings['schedule'] = array('maxWidth' => 16, 'maxHeight' => 16); $this->addElement($this->getElementImageDirectories()); $this->addElement(new ElementFile('file', 'File', null)); // $this->getElement('file')->isImage = true; $this->getElement('file')->destinationDir = 'tempUploads'; $this->getElement('file')->setMaxImageBounds(1000, 1000); $this->addDefaultButtons(); }