예제 #1
0
 private function renderForm(Tag $t)
 {
     $dataMinlength = 'data-minlength';
     $dataMatch = "data-match";
     $dataMatchError = "data-match-error";
     $dataMinlengthError = "data-minlength-error";
     /** @noinspection PhpMethodParametersCountMismatchInspection */
     /** @noinspection PhpUndefinedFunctionInspection */
     /** @noinspection PhpUndefinedClassConstantInspection */
     return $t->div(a::c1ass('login-box-body'), [$t->p(a::c1ass('login-box-msg ' . $this->getClasses()), $this->getInfoMessage()), $t->form(a::c1ass('form-signin'), a::action('/auth/login'), a::method('POST'), [$t->div(a::c1ass('form-group has-feedback hidden register'), [$t->input(a::type('text'), a::c1ass('form-control'), a::placeholder(trans('placeholder.fullName')), a::id('inputFullName'), a::name('fullName'), a::autofocus('autofocus')), $t->span(a::c1ass('glyphicon glyphicon-user form-control-feedback')), $t->div(a::c1ass('help-block with-errors'))]), $t->div(a::c1ass('form-group has-feedback'), [$t->input(a::type('email'), a::c1ass('form-control'), a::placeholder(trans('placeholder.email')), a::id('inputEmail'), a::name('email'), a::required('required'), a::autofocus('autofocus')), $t->span(a::c1ass('glyphicon glyphicon-envelope form-control-feedback')), $t->div(a::c1ass('help-block with-errors'))]), $t->div(a::c1ass('form-group has-feedback'), [$t->input(a::type('password'), a::id('inputPassword'), a::name('password'), a::c1ass('form-control'), a::placeholder(trans('placeholder.password')), a::required('required'), a::$dataMinlength('8'), a::$dataMinlengthError(trans('auth.minimum.8.chars'))), $t->span(a::c1ass('glyphicon glyphicon-lock form-control-feedback')), $t->div(a::c1ass('help-block with-errors'))]), $t->div(a::c1ass('form-group has-feedback hidden register'), [$t->input(a::type('password'), a::id('inputRetypePassword'), a::name('retypedPassword'), a::c1ass('form-control'), a::placeholder(trans('placeholder.retype.password')), a::$dataMatch('#inputPassword'), a::$dataMatchError(trans('auth.password.doesnt.match'))), $t->span(a::c1ass('glyphicon glyphicon-lock form-control-feedback')), $t->div(a::c1ass('help-block with-errors'))]), $t->div(a::c1ass('row'), [$t->div(a::c1ass('col-xs-8'), [$t->div(a::c1ass('checkbox icheck'), [$t->label([$t->input(a::type('checkbox')), ' ' . trans('auth.remember.me')])])]), $t->div(a::c1ass('col-xs-4'), [$t->button(a::type('submit'), a::c1ass('btn btn-success btn-block btn-flat'), trans('auth.signin'))])]), $t->input(a::type("hidden"), a::name("_token"), a::value(csrf_token()))]), $t->div(a::c1ass('social-auth-links text-center'), [$t->p(trans('select.or')), $t->a(a::href('#'), a::c1ass("btn btn-block btn-social btn-facebook btn-flat"), [$t->i(a::c1ass("fa fa-facebook")), trans('auth.signin.facebook')]), $t->a(a::href('#'), a::c1ass("btn btn-block btn-social btn-google-plus btn-flat"), [$t->i(a::c1ass("fa fa-google-plus")), trans('auth.signin.google')]), $t->p(a::style('padding: 15px;'), trans('select.or')), $t->div(a::style('padding-bottom: 20px;'), $t->a(a::id('registerBtn'), a::c1ass('btn btn-block bg-gray color-palette btn-flat pull-left'), trans('auth.register')), $t->a(a::id('cancel'), a::c1ass('btn bg-gray color-palette btn-flat hidden pull-right'), a::style('text-align: right'), trans('auth.cancel')))])]);
 }
예제 #2
0
 /**
  * @param Tag $t
  * @param User $user
  * @return mixed
  */
 protected function renderEditButton($t, $user)
 {
     if ($this->getLoggedUser() === $user || $this->getLoggedUser()->hasRole(Roles::ADMIN)) {
         /** @noinspection PhpMethodParametersCountMismatchInspection */
         return $t->div(a::c1ass('vd_info'), a::style('top: 3px; right:3px;'), $t->a(a::c1ass('btn btn-sm btn-default'), $t->i(a::c1ass('fa fa-pencil append-icon')), trans('menu.edit')));
     } else {
         return '';
     }
 }
예제 #3
0
 public function render()
 {
     $t = new Tag();
     $dataToggle = "data-toggle";
     $className = $this->getClass();
     $iconPath = $this->getIcon();
     $counterValue = $this->getCounter() != null ? $this->getCounter()->getValue() : null;
     /** @noinspection PhpMethodParametersCountMismatchInspection */
     return $t->li(a::c1ass("dropdown {$className}-menu"), $t->a(a::href('#'), a::c1ass('dropdown-toggle'), a::$dataToggle('dropdown'), $this->prepareAriaFor($className), $this->prepareContentFor($className, $iconPath), $this->getCounter()), $t->ul(a::c1ass('dropdown-menu'), $this->makeAList($counterValue, $t)));
 }
예제 #4
0
 /**
  * @param Tag $t
  * @param Activity $activity
  * @return string
  */
 private function renderObjectName($t, $activity)
 {
     if ($activity->getIssue() !== null) {
         /** @noinspection PhpMethodParametersCountMismatchInspection */
         return $t->a(a::style('font-weight: bold;'), a::href('/issue/' . $activity->getIssue()->getNumber()), $activity->getIssue()->getNumber());
     } else {
         if ($activity->getWikiPage() !== null) {
             /** @noinspection PhpMethodParametersCountMismatchInspection */
             return $t->a(a::style('font-weight: bold;'), a::href('/wiki/' . $activity->getWikiPage()->getId()), $activity->getWikiPage()->getName());
         }
     }
 }
예제 #5
0
파일: AuthView.php 프로젝트: maveius/solvre
 private function createMenuItem($item, $icon, Tag $t)
 {
     if (AccessHelper::exists($item) && AccessHelper::hasPermission($item, $this->getLoggedUser())) {
         /** @noinspection PhpMethodParametersCountMismatchInspection */
         return $t->li($item === $this->getActive() ? a::c1ass('active') : '', [$t->a(a::href('/' . strtolower($item)), $t->i(a::c1ass('fa fa-' . strtolower($icon))), $t->span(trans('menu.' . strtolower($item))))]);
     } else {
         return '';
     }
 }
예제 #6
0
 /**
  * @return string
  */
 public function render()
 {
     $t = new Tag();
     $iconClass = $this->getNotificationTemplate()->getIconClass();
     $colorClass = $this->getNotificationTemplate()->getColorClass();
     return $t->li($t->a(a::href($this->getUrl()), $t->i(a::c1ass("fa {$iconClass} text-{$colorClass}")), $this->getNotificationTemplate()->getDescription()));
 }