Esempio n. 1
0
 /**
  * Generate edit form
  *
  * @param Openid_Context $record
  * @param string $op
  */
 function _showForm(&$record, $op)
 {
     require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
     $form = new XoopsThemeForm('Identifier', 'openid_identifier', XOOPS_URL . '/modules/openid/admin/index.php', 'post', true);
     $form->addElement(new XoopsFormHidden('controller', 'identifier'));
     $form->addElement(new XoopsFormHidden('op', $op));
     if ($op == 'save') {
         $form->addElement(new XoopsFormHidden('id', $record->get4Show('id')));
     }
     $form->addElement(new XoopsFormText('Claimed ID', 'claimed', 64, 255, $record->get4Show('claimed_id')));
     $form->addElement(new XoopsFormSelectUser(_AD_OPENID_LANG_USER, 'uid', false, $record->get4Show('uid')));
     $element = new XoopsFormSelect(_AD_OPENID_LANG_MODE, 'omode', $record->get4Show('omode'));
     $element->addOptionArray(array(_AD_OPENID_LANG_INACTIVE, _AD_OPENID_LANG_PRIVATE, _AD_OPENID_LANG_OPEN2MEMBER, _AD_OPENID_LANG_PUBLIC));
     $form->addElement($element);
     $form->addElement(new XoopsFormText('OP-Local ID', 'local', 64, 255, $record->get4Show('local_id')));
     $form->addElement(new XoopsFormText('Display ID', 'display', 64, 255, $record->get4Show('displayid')));
     $form->addElement(new XoopsFormLabel(_AD_OPENID_LANG_CREATED, $record->get4Show('created')));
     $form->addElement(new XoopsFormLabel(_AD_OPENID_LANG_MODIFIED, $record->get4Show('modified')));
     $form->addElement(new XoopsFormButton('', 'submit', 'OK', 'submit'));
     echo $form->render();
 }
Esempio n. 2
0
 /**
  * Show Edit or New-create Form
  *
  * @param Openid_Context $record
  * @param string $op
  */
 function _showForm(&$record, $op)
 {
     require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
     $form = new XoopsThemeForm(_AD_OPENID_LANG_BUTTONS, 'openid_buttons', $this->_url, 'post', true);
     $form->addElement(new XoopsFormHidden('controller', $this->_control));
     $form->addElement(new XoopsFormHidden('op', $op));
     $form->addElement(new XoopsFormText(_AD_OPENID_LANG_DESCRIPTION, 'description', 64, 255, $record->get4Show('description')));
     $form->addElement(new XoopsFormText(_AD_OPENID_LANG_IMAGE, 'image', 64, 255, $record->get4Show('image')));
     if ($op == 'save') {
         $form->addElement(new XoopsFormHidden('id', $record->get4Show('id')));
         $form->addElement(new XoopsFormHidden('type', $record->get4Show('type')));
     } else {
         $element = new XoopsFormRadio(_AD_OPENID_LANG_TYPE, 'type', $record->get4Show('type'));
         $element->addOptionArray(array(_AD_OPENID_LANG_TYPE_SERVER, _AD_OPENID_LANG_TYPE_SINON));
         $form->addElement($element);
     }
     $form->addElement(new XoopsFormText('OpenID Identifier', 'identifier', 64, 255, $record->get4Show('identifier')));
     if ($record->get('type') !== '0') {
         $form->addElement(new XoopsFormText(_AD_OPENID_LANG_RANGE, 'range', 10, 5, $record->get4Show('range')));
     }
     $form->addElement(new XoopsFormButton('', 'submit', 'OK', 'submit'));
     echo $form->render();
 }
Esempio n. 3
0
 /**
  * Enter description here...
  *
  * @param Openid_Context $record
  * @param string $op
  */
 function _showForm(&$record, $op)
 {
     $auth = $record->get('auth');
     require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
     $title = constant('_AD_OPENID_LANG_FILTER_' . $auth);
     $form = new XoopsThemeForm($title, 'openid_filter', $this->_url, 'post', true);
     $form->addElement(new XoopsFormHidden('controller', 'filter'));
     $form->addElement(new XoopsFormHidden('op', $op));
     $form->addElement(new XoopsFormHidden('auth', $auth));
     if ($op == 'save') {
         $form->addElement(new XoopsFormHidden('id', $record->get4Show('id')));
         $form->addElement(new XoopsFormLabel(_AD_OPENID_LANG_PATTERN, $record->get4Show('pattern')));
     } else {
         $form->addElement(new XoopsFormText(_AD_OPENID_LANG_PATTERN, 'pattern', 100, 255, $record->get4Show('pattern')));
     }
     if ($auth) {
         $member_handler =& xoops_gethandler('member');
         $groups = $member_handler->getGroupList();
         $groups = array(_AD_OPENID_LANG_FILTER_DEFAULT) + $groups;
         if ($groupid = $record->get4show('groupid')) {
             $value = explode('|', $groupid);
         } else {
             $value = array(0);
         }
         $element = new XoopsFormSelect(_AD_OPENID_LANG_GROUP, 'groupid', $value, count($groups), true);
         $element->addOptionArray($groups);
         $form->addElement($element);
     }
     $form->addElement(new XoopsFormButton('', 'submit', 'OK', 'submit'));
     echo $form->render();
 }