Change owner of page - Bludit 3.14.1

Post Reply
arikurumo
Jr. Bludit
Posts: 1
Joined: Fri Jun 16, 2023 7:25 pm
Been thanked: 1 time

Hi,
for my need i changed the created page owner form field in "edit-content.php" file. Maybe it could be worked into the future.

before

Code: Select all

268		// Username
269		echo Bootstrap::formInputTextBlock(array(
270			   'name'=>'',
271			   'label'=>$L->g('Author'),
272			   'placeholder'=>'',
273			   'value'=>$page->username(),
274			   'tip'=>'',
275			   'disabled'=>true
276		));
after

Code: Select all

268		// Username
269		if (checkRole(array('admin'), false)) {
270			// Users
271			$options = array();
272			try {
273				foreach ($users->keys() as $option) {
274         			$options[$option] = $option;
275             		}
276			} catch (Exception $e) {
277		   		// continue
278			}
279			echo Bootstrap::formSelectBlock(array(
280				   'name'=>'username',
281				   'label'=>$L->g('Author'),
282				   'options'=>$options,
283				   'selected'=>$page->username(),
284				   'tip'=>''
285			));
286		} else {
287			echo Bootstrap::formInputTextBlock(array(
288				   'name'=>'username',
289				   'label'=>$L->g('Author'),
290				   'placeholder'=>'',
291				   'value'=>$page->username(),
292				   'tip'=>'',
293				   'disabled'=>true
294			));
295		}
Post Reply